1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-18 00:37:06 -07:00

Make the decimal matching optional.

This commit is contained in:
Danila Fedorin 2017-07-28 09:52:14 -07:00
parent 0263086e10
commit a881640bf6

View File

@ -37,7 +37,7 @@ public class TreeBuilder {
lexer = new Lexer<TokenType>(){{
register(" ", TokenType.WHITESPACE);
register(",", TokenType.COMMA);
register("[0-9]+(\\.[0-9]+)?", TokenType.NUM);
register("[0-9]*(\\.[0-9]+)?", TokenType.NUM);
register("\\(", TokenType.OPEN_PARENTH);
register("\\)", TokenType.CLOSE_PARENTH);
}};