Commit 42c947ca authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ grammar refinements (allow name and type as identifiers, '-' in identifiers

parent c83bffd0
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1020,7 +1020,7 @@ Assignment returns tdl::Assignment:

//## ValueConverter Rules (Pseudo-terminals)

//TODO: why does this strip quotes when it is a single word?
//DONE: why does this strip quotes when it is a single word? -> added custom value converter
EString:
    STRING
    // | ID
@@ -1034,6 +1034,8 @@ EString:

Identifier:
    ID 
    //implementation specific
    | 'name' | 'type' //TODO: exclude other keywords to the extent possible?
;

GRIdentifier:
@@ -1882,3 +1884,9 @@ Then:
KIdentifier:
    ID | 'sends' | 'receives' | 'triggers' | 'in'
;

//TODO: document?
@Override 
//terminal ID: '^'?('a'..'z'|'A'..'Z'|'_') (ALPHANUM | (('-'|':') ALPHANUM))*;
terminal ID: '^'?('a'..'z'|'A'..'Z'|'_') (ALPHANUM | (('-') ALPHANUM))*;
terminal fragment ALPHANUM: ('a'..'z'|'A'..'Z'|'_'|'0'..'9');
 No newline at end of file