[Issue 217] New - Interaction between TRACK_TOKENS and NODE_SCOPE_HOOK

View: New views
2 Messages — Rating Filter:   Alert me  

[Issue 217] New - Interaction between TRACK_TOKENS and NODE_SCOPE_HOOK

by tvernum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=217
                 Issue #|217
                 Summary|Interaction between TRACK_TOKENS and NODE_SCOPE_HOOK
               Component|javacc
                 Version|4.2
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|ENHANCEMENT
                Priority|P3
            Subcomponent|jjtree
             Assigned to|sreeni
             Reported by|tvernum






------- Additional comments from tvernum@... Sun Jan 25 00:29:51 +0000 2009 -------
With both TRACK_TOKENS and NODE_SCOPE_HOOK turned on, the generated jj file will
look something like this:

  jjtreeOpenNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
// Production rules
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
        jjtreeCloseNodeScope(jjtn000);
        jjtn000.jjtSetLastToken(getToken(0));
      }

Which means that the node that is passed to the open hook, has no idea of the
first token, and the close hook cannot be sure which is the last token.
This limits the amount of token processing that the node hooks can do.

At the very least the documentation should make this clear, although it would be
preferable if the hooks could make use of the node's token.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 217] Interaction between TRACK_TOKENS and NODE_SCOPE_HOOK

by paulcager :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=217



User paulcager changed the following:

                What    |Old value                 |New value
================================================================================
             Assigned to|sreeni                    |paulcager
--------------------------------------------------------------------------------




------- Additional comments from paulcager@... Wed Sep  9 18:03:48 +0000 2009 -------
Assigned to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...