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
dbe2b6e2
Commit
dbe2b6e2
authored
9 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
WiP: started adding intentions to parser
parent
5d955a0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
compiler/2014/LabCommParser.parser
+14
-1
14 additions, 1 deletion
compiler/2014/LabCommParser.parser
compiler/2014/LabCommScanner.flex
+3
-0
3 additions, 0 deletions
compiler/2014/LabCommScanner.flex
compiler/2014/Refactoring.jrag
+5
-0
5 additions, 0 deletions
compiler/2014/Refactoring.jrag
with
22 additions
and
1 deletion
compiler/2014/LabCommParser.parser
+
14
−
1
View file @
dbe2b6e2
...
...
@@ -54,7 +54,20 @@ List var_decl_list =
| var_decl_list.l var_decl.v {: return l.add(v); :}
;
List intentions = {: return new List(); :}
List intentions =
/* empty list */ {: return new List(); :}
| intention_list.l {: return l; :}
;
List intention_list =
intention.i {: return new List().add(i); :}
| intention_list.l intention.i {: return l.add(i); :}
;
String key = IDENTIFIER;
String stringliteral = IDENTIFIER;
Intention intention = LPAREN key.k COLON stringliteral.v RPAREN {: return new Intention(k,v); :};
TypeInstance type_instance =
intentions.i type.t IDENTIFIER {: return new TypeInstance(t, IDENTIFIER, i); :}
...
...
This diff is collapsed.
Click to expand it.
compiler/2014/LabCommScanner.flex
+
3
−
0
View file @
dbe2b6e2
...
...
@@ -76,7 +76,10 @@ NonZeroDigit = [1-9]
"}" { return sym(Terminals.RBRACE); }
"[" { return sym(Terminals.LBRACK); }
"]" { return sym(Terminals.RBRACK); }
"(" { return sym(Terminals.LPAREN); }
")" { return sym(Terminals.RPAREN); }
";" { return sym(Terminals.SEMICOLON); }
":" { return sym(Terminals.COLON); }
"," { return sym(Terminals.COMMA); }
{Identifier} { return sym(Terminals.IDENTIFIER); }
...
...
This diff is collapsed.
Click to expand it.
compiler/2014/Refactoring.jrag
+
5
−
0
View file @
dbe2b6e2
...
...
@@ -11,4 +11,9 @@ aspect Refactoring {
this(t, n, new List<Annotation>());
System.out.println("WARNING! TypeInstance(DataType, String) ignoring intention list");
}
public ConcreteType.ConcreteType(Type t, String n) {
this(t, n, new List<Intention>());
System.out.println("WARNING! ConcreteType(Type, String) ignoring intention list");
}
}
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