Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
2b9036d5
Commit
2b9036d5
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix gcc warning
parent
41404bbf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathEval/scanner.cpp
+21
-19
21 additions, 19 deletions
MathEval/scanner.cpp
MathEval/scanner.l
+2
-0
2 additions, 0 deletions
MathEval/scanner.l
with
23 additions
and
19 deletions
MathEval/scanner.cpp
+
21
−
19
View file @
2b9036d5
...
@@ -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-0
1-08 20:15:12
geuzaine Exp $
* $Header: /cvsroot/gmsh/MathEval/scanner.cpp,v 1.
7
2005-0
3-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 47
4
"scanner.cpp"
#line 47
6
"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 5
0
"scanner.l"
#line 5
2
"scanner.l"
#line 6
28
"scanner.cpp"
#line 6
30
"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 5
2
"scanner.l"
#line 5
4
"scanner.l"
YY_BREAK
YY_BREAK
case
2
:
case
2
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 5
4
"scanner.l"
#line 5
6
"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 6
0
"scanner.l"
#line 6
2
"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 6
6
"scanner.l"
#line 6
8
"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 7
4
"scanner.l"
#line 7
6
"scanner.l"
{
{
return
'+'
;
return
'+'
;
}
}
YY_BREAK
YY_BREAK
case
6
:
case
6
:
YY_RULE_SETUP
YY_RULE_SETUP
#line
7
8 "scanner.l"
#line 8
0
"scanner.l"
{
{
return
'-'
;
return
'-'
;
}
}
YY_BREAK
YY_BREAK
case
7
:
case
7
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 8
2
"scanner.l"
#line 8
4
"scanner.l"
{
{
return
'*'
;
return
'*'
;
}
}
YY_BREAK
YY_BREAK
case
8
:
case
8
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 8
6
"scanner.l"
#line 8
8
"scanner.l"
{
{
return
'/'
;
return
'/'
;
}
}
YY_BREAK
YY_BREAK
case
9
:
case
9
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 9
0
"scanner.l"
#line 9
2
"scanner.l"
{
{
return
'^'
;
return
'^'
;
}
}
YY_BREAK
YY_BREAK
case
10
:
case
10
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 9
4
"scanner.l"
#line 9
6
"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 10
2
"scanner.l"
#line 10
4
"scanner.l"
{
{
return
'\n'
;
return
'\n'
;
}
}
YY_BREAK
YY_BREAK
case
13
:
case
13
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 10
6
"scanner.l"
#line 10
8
"scanner.l"
ECHO
;
ECHO
;
YY_BREAK
YY_BREAK
#line 80
6
"scanner.cpp"
#line 80
8
"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 10
6
"scanner.l"
#line 10
8
"scanner.l"
#undef mewrap
#undef mewrap
...
...
This diff is collapsed.
Click to expand it.
MathEval/scanner.l
+
2
−
0
View file @
2b9036d5
...
@@ -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 ) \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment