[antlr-interest] antlr v4 wish list

Matt Fowles matt.fowles at gmail.com
Wed Mar 23 14:17:40 PDT 2011


Terence~

Better location management.

Tokens and Trees should both have methods for:

getStartLine()
getEndLine()
getStartCharPosition()
getEndCharPosition()

Trees should base them on the tokens that they include.  Synthetic
tokens should get them from the original token or the full production
they match when no original token is provide.  This is especially
useful for IDEs that do several layers of rewrite before they produce
an error, as it can be difficult to match the positions exactly if
things like desugaring have happened before an error is produced.

The methods for end position are important as IDEs use that to figure
out how far to draw the squiggle.

Matt

On Tue, Mar 22, 2011 at 5:45 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
> Howdy, I'm going to start augmenting ANTLR v3 significantly to create v4. The goal is backward compatibility; any new functionality, of course, will require altering or augmenting your grammars to take advantage of it. Here is my potential list of updates:
>
> http://www.antlr.org/wiki/display/ANTLR4/ANTLR+v4+Wish+list
>
> Anything to add or comment on?
>
> Ter
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list