This project has moved and is read-only. For the latest updates, please go here.

Conflict between numeric literal types

Sep 28, 2015 at 5:43 PM
Edited Sep 28, 2015 at 5:44 PM
I'm putting together a grammar for an existing language that has an object literal. All objects are numbered and represented as #<number>, e.g. #52 (I represent this as a numeric literal of int only, prefixed by #). The language also features basic integer and floating point numbers, represented by a basic numeric literal. Objects in this language can have properties and methods. The conflict I run into is that when I try to parse the expression "", the parser seems to decide that I must be trying to represent a floating point number and gives me the error "invalid character: '#'". This occurs even though I have the property member access defined in the language. If I use a variable (assuming it represents an object), such as "", the parser works just fine. Is there a way to indicate to the parser that my object literal should take precedence over the numeric literal, so that referencing the property on an object literal will work? Of course feel free to point out a more proper solution if you have one. Thank you in advance for any help :).
Sep 28, 2015 at 8:12 PM
I have found the root of my problem. I had the NoDotAfterInt flag specified in there. Silly mistake.
Marked as answer by WiredWiz on 9/28/2015 at 12:12 PM