Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Anders Blomdell
LabComm
Commits
0a409467
Commit
0a409467
authored
9 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
fixed quoted string pattern in scanner
parent
5eef8a7f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/2014/LabCommScanner.flex
+7
-7
7 additions, 7 deletions
compiler/2014/LabCommScanner.flex
with
7 additions
and
7 deletions
compiler/2014/LabCommScanner.flex
+
7
−
7
View file @
0a409467
...
...
@@ -6,13 +6,13 @@ import se.lth.control.labcomm2014.compiler.LabCommParser.Terminals;
%%
%public
%final
%public
%final
%class LabCommScanner
%extends Scanner
%type Symbol
%function nextToken
%type Symbol
%function nextToken
%yylexthrow Scanner.Exception
%unicode
...
...
@@ -47,12 +47,12 @@ EndOfLineComment = "//" {InputCharacter}* {LineTerminator}?
Identifier = [[:letter:]_]([[:letter:]_[:digit:]])*
StringLiteral = [:jletterdigit:]*
DecimalNumeral = 0 | {NonZeroDigit} {Digits}?
DecimalNumeral = 0 | {NonZeroDigit} {Digits}?
Digits = {Digit}+
Digit = 0 | {NonZeroDigit}
NonZeroDigit = [1-9]
QuotedString = "\""
{InputCharacter}*
"\""
QuotedString = "\""
~
"\""
%%
...
...
@@ -84,7 +84,7 @@ QuotedString = "\"" {InputCharacter}* "\""
";" { return sym(Terminals.SEMICOLON); }
":" { return sym(Terminals.COLON); }
"," { return sym(Terminals.COMMA); }
{Identifier} { return sym(Terminals.IDENTIFIER); }
{QuotedString} { return sym(Terminals.QUOTEDSTRING); }
}
...
...
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