[antlr-interest] Parsing a time expression

Ron Burk ronburk at gmail.com
Sat Apr 24 22:58:35 PDT 2010


I'm wondering if you meant to disallow spaces in your
"interval"s. If not, then if you allow (as it appears you intend):

 + 15/  7

Should that "7" be interpreted as the hours part of the
interval that starts with "15/" (meaning there's an error
because the user forgot to supply a second interval operand
to the '+') or should the "7" be interpreted as a second
interval (7 seconds)?

The grammar appears to be ambiguous.


More information about the antlr-interest mailing list