Skip to content

Commit

Permalink
Rename numeric literal terminal symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
romildo committed Oct 9, 2016
1 parent a855739 commit 04ca8c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/cup/parser.cup
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package parse;

terminal LITINT;
terminal LITNUM;
terminal PLUS, MINUS, TIMES, DIV;
terminal LPAREN, RPAREN;

Expand Down
2 changes: 1 addition & 1 deletion src/main/jflex/lexer.jflex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import java_cup.runtime.ComplexSymbolFactory;

[ \t\f\n\r]+ { /* skip */ }

[0-9]+ ("." [0-9]+)? { return tok(LITINT, yytext()); }
[0-9]+ ("." [0-9]+)? { return tok(LITNUM, new Double(yytext())); }

"+" { return tok(PLUS); }
"-" { return tok(MINUS); }
Expand Down

0 comments on commit 04ca8c0

Please sign in to comment.