- Where Developers Learn, Share, & Build Careers
I have 2 problems:
In my ANTLR parser, I have this light rule:
Message: msg_content (COMMA msg_content) * - & gt; ^ (MSG_CTS msg_content +); In my grammar tree, how can I use the collected msg_content tokens? $ Msg_content.text is returning a blank exception.
More generally, can you please provide me some guidelines, how can I use my zested AST tree? I basically want to walk on nodes and create Java classes for different things like
I have this simple tree that prints:
(MSG (agent) For some Java class "agent" I have fields with "A", "B" and some content fields, which are X, Y
I have seen: "Interfacing AST with Java" and "Expression Evaluator" from the ANLR Online Manual, but I do not get enough to implement them for my problem if you can provide a simple example. If so, it would be very useful!
Please help ... Thanks!
View all the included rules and code It is impossible to leave without comment. IMEprop = "text">
Can you edit your question and include an inherent example I, or anyone else, who can re-error / Can generate?
(MSG (agents AB) (MSG_CTS xy))
I have some java class "agent" fields with "agent" A, B and some content Will play with the field, which is X, Y.
Take a look at this list of tutorials: Not all expression evaluators are about. Indicates how to use custom node classes in paid walkers.
Also see how it uses custom node-class in Paid Walkers.
Comments
Post a Comment