[e-lang] Bug: three adjacent colons in printed ENodes
Kevin Reid
kpreid at mac.com
Sat Sep 15 08:56:19 EDT 2007
? e`def a : ::"" := c`
# value: e`def a :::"" := c`
? e`def a :::"" := c`
# syntax error:
# def a :::"" := c
# ^
The obvious printed form fails to parse since the lexer is producing
[::,:] rather than [:,::].
The fix is obvious: arrange for a space or parentheses to be
inserted. But how should the printer know to do this?
Should an artificial precedence level be introduced?
Should guard-syntax printing look 'down' to see if the guard
expression will start with ":"?
Should the syntax used for arbitrary nouns be changed?
Should the lexer's interpretation of ":::" be changed?
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list