Set Handling in the Lexer/Parser

Is there any reason why set forms aren't differentiated in the lexer, in the same way that metadata is? Given the following rules:

mLC = "{"
mRC = "}"
mSHARP = "#"
mUP = "^"

why not add


instead of using lookahead in the parser?

Comment actions Permalink

Hi Ian.

There is no any preference in this choice. The macro was just created for the one case, but someone forgot to do the same for another.


Comment actions Permalink

OK, cool. I’ll have a look add updating the lexer with this rule then. It may take me a while as I’ll need to read up on JFlex a bit first, but I think that it's a cleaner solution and should make it easier to write code that manipulates braced forms.


Please sign in to leave a comment.