From fb3e1ebf371c002b9bb5ba9ef64f2eb285a83f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0torc?= <storcond@fit.cvut.cz> Date: Fri, 31 Mar 2023 14:59:37 +0200 Subject: [PATCH] cli: Add support for double into lexer --- alib2cli/src/grammar/AltCliLexer.g4 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/alib2cli/src/grammar/AltCliLexer.g4 b/alib2cli/src/grammar/AltCliLexer.g4 index c94ddd980..ed2dc3337 100644 --- a/alib2cli/src/grammar/AltCliLexer.g4 +++ b/alib2cli/src/grammar/AltCliLexer.g4 @@ -115,13 +115,10 @@ KW_ACTUAL_TYPE : 'actual_type'; KW_DECLARED_TYPE : 'declared_type'; KW_RETURNING : 'returning'; +fragment DIGIT: [0-9]; +INTEGER : DIGIT+; +DOUBLE: DIGIT+'.'DIGIT* | DIGIT*'.'DIGIT+; -// TODO: fix all operator -INTEGER : [0-9]+; - -//FILE : ([0-9] | [a-z] | [A-Z] | '/' | '.' | '-' | '~' | '~' | '_' | ':' | '\\')+ ; - -// TODO: Id IDENTIFIER : ([a-z] | [A-Z] | '_' ) ([0-9] | [a-z] | [A-Z] | '_' | ':' )* ; -- GitLab