Skip to content
Snippets Groups Projects
Commit 2b9036d5 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix gcc warning
parent 41404bbf
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/gmsh/MathEval/scanner.cpp,v 1.6 2005-01-08 20:15:12 geuzaine Exp $ * $Header: /cvsroot/gmsh/MathEval/scanner.cpp,v 1.7 2005-03-17 22:45:00 geuzaine Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -458,6 +458,8 @@ char *yytext; ...@@ -458,6 +458,8 @@ char *yytext;
#include "parser.h" #include "parser.h"
#include "symbol_table.h" #include "symbol_table.h"
#define YY_ALWAYS_INTERACTIVE 1
/* Redefine macro to redirect scanner input from string instead of /* Redefine macro to redirect scanner input from string instead of
standard input. */ standard input. */
#define YY_INPUT( buffer, result, max_size ) \ #define YY_INPUT( buffer, result, max_size ) \
...@@ -470,7 +472,7 @@ extern char *matheval_input_string; /* String representing function. */ ...@@ -470,7 +472,7 @@ extern char *matheval_input_string; /* String representing function. */
/* Read next max_size character from string into buffer. */ /* Read next max_size character from string into buffer. */
static int input_from_string (char *buffer, int max_size); static int input_from_string (char *buffer, int max_size);
/* Token definitions. */ /* Token definitions. */
#line 474 "scanner.cpp" #line 476 "scanner.cpp"
/* Macros after this point can all be overridden by user definitions in /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
...@@ -621,10 +623,10 @@ YY_DECL ...@@ -621,10 +623,10 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 50 "scanner.l" #line 52 "scanner.l"
#line 628 "scanner.cpp" #line 630 "scanner.cpp"
if ( yy_init ) if ( yy_init )
{ {
...@@ -709,12 +711,12 @@ do_action: /* This label is used only to access EOF actions. */ ...@@ -709,12 +711,12 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 52 "scanner.l" #line 54 "scanner.l"
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 54 "scanner.l" #line 56 "scanner.l"
{ {
/* Create node representing constant with appropriate value. */ /* Create node representing constant with appropriate value. */
melval.node = node_create ('c', atof (metext)); melval.node = node_create ('c', atof (metext));
...@@ -723,7 +725,7 @@ YY_RULE_SETUP ...@@ -723,7 +725,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 60 "scanner.l" #line 62 "scanner.l"
{ {
/* Find symbol table record corresponding to function name. */ /* Find symbol table record corresponding to function name. */
melval.record = symbol_table_lookup (matheval_symbol_table, metext); melval.record = symbol_table_lookup (matheval_symbol_table, metext);
...@@ -732,7 +734,7 @@ YY_RULE_SETUP ...@@ -732,7 +734,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 66 "scanner.l" #line 68 "scanner.l"
{ {
Record *record; /* Symbol table record. */ Record *record; /* Symbol table record. */
/* Inserty variable into symbol table. */ /* Inserty variable into symbol table. */
...@@ -743,66 +745,66 @@ YY_RULE_SETUP ...@@ -743,66 +745,66 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 74 "scanner.l" #line 76 "scanner.l"
{ {
return '+'; return '+';
} }
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 78 "scanner.l" #line 80 "scanner.l"
{ {
return '-'; return '-';
} }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 82 "scanner.l" #line 84 "scanner.l"
{ {
return '*'; return '*';
} }
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 86 "scanner.l" #line 88 "scanner.l"
{ {
return '/'; return '/';
} }
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
#line 90 "scanner.l" #line 92 "scanner.l"
{ {
return '^'; return '^';
} }
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 94 "scanner.l" #line 96 "scanner.l"
{ {
return '('; return '(';
} }
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 98 "scanner.l" #line 100 "scanner.l"
{ {
return ')'; return ')';
} }
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 102 "scanner.l" #line 104 "scanner.l"
{ {
return '\n'; return '\n';
} }
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 106 "scanner.l" #line 108 "scanner.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 806 "scanner.cpp" #line 808 "scanner.cpp"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
yyterminate(); yyterminate();
...@@ -1688,7 +1690,7 @@ int main() ...@@ -1688,7 +1690,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 106 "scanner.l" #line 108 "scanner.l"
#undef mewrap #undef mewrap
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "parser.h" #include "parser.h"
#include "symbol_table.h" #include "symbol_table.h"
#define YY_ALWAYS_INTERACTIVE 1
/* Redefine macro to redirect scanner input from string instead of /* Redefine macro to redirect scanner input from string instead of
standard input. */ standard input. */
#define YY_INPUT( buffer, result, max_size ) \ #define YY_INPUT( buffer, result, max_size ) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment