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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
b4d6f0b8
Commit
b4d6f0b8
authored
Apr 6, 2009
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
c84fbd60
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
contrib/MathEval/scanner.l
+6
-0
6 additions, 0 deletions
contrib/MathEval/scanner.l
contrib/MathEval/scanner.yy.cpp
+24
-18
24 additions, 18 deletions
contrib/MathEval/scanner.yy.cpp
with
30 additions
and
18 deletions
contrib/MathEval/scanner.l
+
6
−
0
View file @
b4d6f0b8
...
...
@@ -34,6 +34,12 @@
#define YY_INPUT( buffer, result, max_size ) \
{ result = input_from_string (buffer, max_size); }
/* Added by Gmsh for MSVC */
#if defined(WIN32)
#define isatty(arg) -1
#define YY_NO_UNISTD_H
#endif
/* Variables used to communicate with code using scanner. */
extern SymbolTable *matheval_symbol_table; /* Evaluator symbol table. */
extern char *matheval_input_string; /* String representing function. */
...
...
This diff is collapsed.
Click to expand it.
contrib/MathEval/scanner.yy.cpp
+
24
−
18
View file @
b4d6f0b8
...
...
@@ -556,6 +556,12 @@ char *metext;
#define YY_INPUT( buffer, result, max_size ) \
{ result = input_from_string (buffer, max_size); }
/* Added by Gmsh for MSVC */
#if defined(WIN32)
#define isatty(arg) -1
#define YY_NO_UNISTD_H
#endif
/* Variables used to communicate with code using scanner. */
extern
SymbolTable
*
matheval_symbol_table
;
/* Evaluator symbol table. */
extern
char
*
matheval_input_string
;
/* String representing function. */
...
...
@@ -563,7 +569,7 @@ extern char *matheval_input_string; /* String representing function. */
/* Read next max_size character from string into buffer. */
static
int
input_from_string
(
char
*
buffer
,
int
max_size
);
/* Token definitions. */
#line 5
6
7 "scanner.yy.cpp"
#line 57
3
"scanner.yy.cpp"
#define INITIAL 0
...
...
@@ -716,10 +722,10 @@ YY_DECL
register
char
*
yy_cp
,
*
yy_bp
;
register
int
yy_act
;
#line 5
2
"scanner.l"
#line 5
8
"scanner.l"
#line 72
3
"scanner.yy.cpp"
#line 72
9
"scanner.yy.cpp"
if
(
!
(
yy_init
)
)
{
...
...
@@ -804,12 +810,12 @@ do_action: /* This label is used only to access EOF actions. */
case
1
:
YY_RULE_SETUP
#line
54
"scanner.l"
#line
60
"scanner.l"
YY_BREAK
case
2
:
YY_RULE_SETUP
#line
5
6 "scanner.l"
#line 6
2
"scanner.l"
{
/* Create node representing constant with appropriate value. */
melval
.
node
=
node_create
(
'c'
,
atof
(
metext
));
...
...
@@ -818,7 +824,7 @@ YY_RULE_SETUP
YY_BREAK
case
3
:
YY_RULE_SETUP
#line 6
2
"scanner.l"
#line 6
8
"scanner.l"
{
/* Find symbol table record corresponding to function name. */
melval
.
record
=
symbol_table_lookup
(
matheval_symbol_table
,
metext
);
...
...
@@ -827,7 +833,7 @@ YY_RULE_SETUP
YY_BREAK
case
4
:
YY_RULE_SETUP
#line
68
"scanner.l"
#line
74
"scanner.l"
{
Record
*
record
;
/* Symbol table record. */
/* Inserty variable into symbol table. */
...
...
@@ -838,49 +844,49 @@ YY_RULE_SETUP
YY_BREAK
case
5
:
YY_RULE_SETUP
#line
76
"scanner.l"
#line
82
"scanner.l"
{
return
'+'
;
}
YY_BREAK
case
6
:
YY_RULE_SETUP
#line 8
0
"scanner.l"
#line 8
6
"scanner.l"
{
return
'-'
;
}
YY_BREAK
case
7
:
YY_RULE_SETUP
#line
84
"scanner.l"
#line
90
"scanner.l"
{
return
'*'
;
}
YY_BREAK
case
8
:
YY_RULE_SETUP
#line
88
"scanner.l"
#line
94
"scanner.l"
{
return
'/'
;
}
YY_BREAK
case
9
:
YY_RULE_SETUP
#line 9
2
"scanner.l"
#line 9
8
"scanner.l"
{
return
'^'
;
}
YY_BREAK
case
10
:
YY_RULE_SETUP
#line
96
"scanner.l"
#line
102
"scanner.l"
{
return
'('
;
}
YY_BREAK
case
11
:
YY_RULE_SETUP
#line 10
0
"scanner.l"
#line 10
6
"scanner.l"
{
return
')'
;
}
...
...
@@ -888,17 +894,17 @@ YY_RULE_SETUP
case
12
:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 10
4
"scanner.l"
#line 1
1
0 "scanner.l"
{
return
'\n'
;
}
YY_BREAK
case
13
:
YY_RULE_SETUP
#line 1
08
"scanner.l"
#line 1
14
"scanner.l"
ECHO
;
YY_BREAK
#line 90
2
"scanner.yy.cpp"
#line 90
8
"scanner.yy.cpp"
case
YY_STATE_EOF
(
INITIAL
)
:
yyterminate
();
...
...
@@ -1884,7 +1890,7 @@ void mefree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 1
08
"scanner.l"
#line 1
14
"scanner.l"
...
...
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