I have a simple antlr rule to catch a phrase like “running.exception=2.j=15” and I want to identify the value is initialized to which is 2 in this case.
However, ANTLR is looking at 2. as a float. Is there anyway to make it identify it as an int?
My rule:
exception
:
(
ID*
'.exception='
INT
'.'
ID*
);
Try something like this:
which would parse the input
"0.12 .34 56. 78"like this: