Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CompilerbauBlatt2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oscar Amaya Mohr
CompilerbauBlatt2
Commits
bb585047
Commit
bb585047
authored
2 years ago
by
Oscar Amaya Mohr
Browse files
Options
Downloads
Patches
Plain Diff
Update minako-lexic.l
parent
f13cb3ed
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
minako-lexic.l
+11
-11
11 additions, 11 deletions
minako-lexic.l
with
11 additions
and
11 deletions
minako-lexic.l
+
11
−
11
View file @
bb585047
...
@@ -11,7 +11,7 @@ void invalid_token() {
...
@@ -11,7 +11,7 @@ void invalid_token() {
}
}
%}
%}
%s
st
%s
STRING
BLOCK_COMMENT "/*"((("*"[^/])?)|[^*])*"*/"
BLOCK_COMMENT "/*"((("*"[^/])?)|[^*])*"*/"
LINE_COMMENT "//".*
LINE_COMMENT "//".*
...
@@ -37,21 +37,21 @@ printf return KW_PRINTF;
...
@@ -37,21 +37,21 @@ printf return KW_PRINTF;
return return KW_RETURN;
return return KW_RETURN;
void return KW_VOID;
void return KW_VOID;
while return KW_WHILE;
while return KW_WHILE;
&&
return AND;
"
&&
"
return AND;
\|\|
return OR;
"||"
return OR;
==
return EQ;
"
==
"
return EQ;
!=
return NEQ;
"
!=
"
return NEQ;
\
>=
return GEQ;
"
>=
"
return GEQ;
\
<=
return LEQ;
"
<=
"
return LEQ;
\>
return GRT;
">"
return GRT;
\<
return LSS;
"<"
return LSS;
{INT} yylval.intValue = atoi(yytext); return CONST_INT;
{INT} yylval.intValue = atoi(yytext); return CONST_INT;
{FLOAT} yylval.floatValue = atof(yytext); return CONST_FLOAT;
{FLOAT} yylval.floatValue = atof(yytext); return CONST_FLOAT;
true yylval.intValue = 1; return CONST_BOOLEAN;
true yylval.intValue = 1; return CONST_BOOLEAN;
false yylval.intValue = 0; return CONST_BOOLEAN;
false yylval.intValue = 0; return CONST_BOOLEAN;
\" BEGIN(
st
);
\" BEGIN(
STRING
);
<
st
>[^\n\"]*/\" yylval.string = yytext; BEGIN(INITIAL); return CONST_STRING;
<
STRING
>[^\n\"]*/\" yylval.string = yytext; BEGIN(INITIAL); return CONST_STRING;
{ID} yylval.string = yytext; return ID;
{ID} yylval.string = yytext; return ID;
{PUNCTUATION} return (int)(*yytext);
{PUNCTUATION} return (int)(*yytext);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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