I'm trying to pick up COMMENT as a node in the AST tree, but it seems like it doesn't even try as long as <COMMENT> is defined as a token (in the beginning of the nBNF file).
I noticed that the Simple Example started with the following declaration for tokens, and, it seems to me, thus suppressing node generation from any of those tokens:
<TOKENS> ::= <WHITESPACE> |
<COMMENT> | <--- Huh?
token(<NUMBER>) |
token(<QUOTE>) token(<STRING_BODY>) token(<QUOTE>) |
token( keywords() ) |
token(<IDENTIFIER>);
What I'm at is that since EA recognizes the term COMMENT as a distinct model element, then why is a comment considered being only a "token" (and thus can't be picked up and stored in the model)?
I might be entirely off track here though. Am I missing the meaning of token vsv terms/named nodes? Something else? Or all of it? :)
I couldn't find a clear description in the help about how EA parser treats tokens compared to named nodes.
// Rolf