Skip to content

Commit

Permalink
Some extra tokens to support RML syntax.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1300 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
leist committed Oct 4, 2004
1 parent 382b3e8 commit 6e46caf
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions modelica_parser/src/modelica_lexer.g
Expand Up @@ -75,6 +75,24 @@ tokens {

// SUM = "sum" ;
// ARRAY = "array";

// Extra tokens for RML
ABSTYPE = "abstype";
// AND = "and";
AS = "as";
AXIOM = "axiom";
DATATYPE = "datatype";
FAIL = "fail";
LET = "let";
INTERFACE = "interface";
MODULE = "module";
OF = "of";
RELATION = "relation";
RULE = "rule";
VAL = "val";
WILD = "_";
WITH = "with";
WITHTYPE = "withtype";
}


Expand Down Expand Up @@ -105,8 +123,11 @@ LESSGT : "<>" ;
COLON : ':' ;
SEMICOLON : ';' ;
POWER : '^' ;


YIELDS : "=>" ;
AMPERSAND : "&" ;
PIPEBAR : "|" ;
COLONCOLON : "::" ;
DASHES : '-' '-' '-' ( '-' )* ;


WS :
Expand Down Expand Up @@ -138,6 +159,10 @@ IDENT options { testLiterals = true; paraphrase = "an identifier";} :
NONDIGIT (NONDIGIT | DIGIT)*
;

TYVARIDENT options { testLiterals = true; paraphrase = "a type identifier";} :
'\'' NONDIGIT (NONDIGIT | DIGIT)*
;

protected
NONDIGIT : ('_' | 'a'..'z' | 'A'..'Z');

Expand Down Expand Up @@ -184,3 +209,5 @@ ESC :





0 comments on commit 6e46caf

Please sign in to comment.