summaryrefslogtreecommitdiff
path: root/Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens
diff options
context:
space:
mode:
Diffstat (limited to 'Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens')
-rw-r--r--Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens39
1 files changed, 39 insertions, 0 deletions
diff --git a/Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens b/Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens
new file mode 100644
index 0000000..ccb798a
--- /dev/null
+++ b/Homework/cs5300/project-three/out/production/p3-parser/data/ExprLexer.tokens
@@ -0,0 +1,39 @@
+//
+// DO NOT MODIFY THIS FILE.
+//
+// This file describes the tokens that will be available to the parser
+// that uses the grammar described in Expr.cfg.
+
+lexer grammar ExprLexer;
+
+PLUS: '+' ;
+MINUS: '-' ;
+MULTIPLY: '*' ;
+DIVIDE: '/' ;
+OPAREN: '(' ;
+CPAREN: ')' ;
+
+FLOAT
+ : DIGIT+ '.' DIGIT+
+ ;
+
+INT
+ : DIGIT+
+ ;
+
+IDENTIFIER
+ : LETTER (LETTER | DIGIT)*
+ ;
+
+COMMENT
+ : ( '//' ~[\r\n]* '\r'? '\n'
+ | '/*' .*? '*/'
+ ) -> skip
+ ;
+
+WS
+ : (' ' | '\t' | '\n' | '\r' | '\f')+ -> skip
+ ;
+
+fragment LETTER : ('a'..'z' | 'A'..'Z');
+fragment DIGIT : ('0'..'9'); \ No newline at end of file