How to access parser from token manager

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

How to access parser from token manager

by Artur Rataj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have yet another question: the actions for handling special tokens
end up in token manager class. Can the parser fields/methods be
accesses from there?

Best regards,
Artur

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


Re: How to access parser from token manager

by J.Chris Findlay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you are just using the token stream there are examples of how to
extract the specials from each token.

If you are using the AST generation and (like one of the examples) you
set up a post-node-creation event to "remember" the first and/or last
tokens that "belong" to each node, then from the node you can get back
to the token stream.
Note that this will cause the entire token stream to remain in memory
due to the first node holding a reference to it's start, and it's
start holding a reference to the next token etc..

On 6/29/08, Artur Rataj <arturrataj@...> wrote:

> I have yet another question: the actions for handling special tokens
>  end up in token manager class. Can the parser fields/methods be
>  accesses from there?
>
>  Best regards,
>  Artur
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@...
>  For additional commands, e-mail: users-help@...
>
>


--
 - J.Chris Findlay
   (c:

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

LightInTheBox - Buy quality products at wholesale price