Loading ...
Sorry, an error occurred while loading the content.
 

get the name of the node being constructed when in a rule

Expand Messages
  • patrick.hoffmann@caramail.com
    Hello! I have a simple question: how is it possible to get the name of the node of the tree being in construction, when in a rule of the Tree Parser? In fact,
    Message 1 of 1 , Jul 26, 2001
      Hello!

      I have a simple question: how is it possible to get the name of the
      node of the tree being in construction, when in a rule of the Tree
      Parser?

      In fact, we could use getAST(), and then getType(), surely. But I
      wonder if this doesn't take too much time:

      what I would like to do is this:

      I concatenate some elements, and, when I have single symbols
      successively, I want to put them in an array. But it is not so simple
      to know when an element is a single symbol: I need sometimes a great
      lookahead (there are different types of symbols, and, if they are
      suffixed, they aren't of type symbol any more, and so on)...
      So, if I could know, AFTER having recognized that an element is a
      single symbol, if the node is concatenation, I could do something!!..

      Thanks for your help
    Your message has been successfully submitted and would be delivered to recipients shortly.