comparison libinterp/parse-tree/lex.ll @ 19818:a3577622952c

avoid some GCC unused parameter warnings * oct-tex-lexer.in.ll (octave_tex_alloc, octave_tex_realloc, octave_tex_free): New functions. Disable flex generated versions. * lex.ll (octave_alloc, octave_realloc, octave_free): New functions. Disable flex generated versions.
author John W. Eaton <jwe@octave.org>
date Fri, 20 Feb 2015 03:53:38 -0500
parents 4197fc428c7d
children 1c9ed5b4c73d
comparison
equal deleted inserted replaced
19817:2dd6d5bdf11d 19818:a3577622952c
33 33
34 %option prefix = "octave_" 34 %option prefix = "octave_"
35 %option noyywrap 35 %option noyywrap
36 %option reentrant 36 %option reentrant
37 %option bison-bridge 37 %option bison-bridge
38
39 %option noyyalloc
40 %option noyyrealloc
41 %option noyyfree
38 42
39 %top { 43 %top {
40 #ifdef HAVE_CONFIG_H 44 #ifdef HAVE_CONFIG_H
41 #include <config.h> 45 #include <config.h>
42 #endif 46 #endif
1710 return LEXICAL_ERROR; 1714 return LEXICAL_ERROR;
1711 } 1715 }
1712 } 1716 }
1713 1717
1714 %% 1718 %%
1719
1720 void *
1721 octave_alloc (yy_size_t size, yyscan_t)
1722 {
1723 return malloc (size);
1724 }
1725
1726 void *
1727 octave_realloc (void *ptr, yy_size_t size, yyscan_t)
1728 {
1729 return realloc (ptr, size);
1730 }
1731
1732 void
1733 octave_free (void *ptr, yyscan_t)
1734 {
1735 free (ptr);
1736 }
1715 1737
1716 static void 1738 static void
1717 display_character (char c) 1739 display_character (char c)
1718 { 1740 {
1719 if (isgraph (c)) 1741 if (isgraph (c))