[antlr-interest] Extract all rules/lexems/keywords of a Language.g into XML format?
Terence Parr
parrt at cs.usfca.edu
Sat Jun 11 09:33:17 PDT 2011
On Jun 11, 2011, at 7:40 AM, Ruslan Zasukhin wrote:
> On 6/11/11 3:16 AM, "Terence Parr" <parrt at cs.usfca.edu> wrote:
>
> Hi Terrence,
>
>> Hi. Let me be more specific...I am going to serialize entire grammar as an
>> augmented transition network into any generated parser or lexer. This will
>> improve your recovery and error messages. There will be an API to figure out
>> what could've come next. I won't be using XML.
>
> Okay, this sounds like feature, which will help us build
> a smart auto-completion list of next token ... Right?
yep.
>> As for the GUI widget, I'm providing a simple widget that, using reflection if
>> I remember correctly, pulls out the appropriate information from a
>> parser/lexer and then manages to automatically syntax highlight and flag
>> erroneous syntax. For semantics, the programmer would be on their own. It is a
>> cheap way for someone to get an editor for their DSL.
>
> I do not catch ... Widget Java only?
> What will do C++ developers :-)
Make their own. ;) It could be hooked up via sockets I guess.
> Actually we think not about GUI widget, but about
> Feature of ANTLR to produce XML file from any grammar
>
> Example:
>
> Exists
> cpp.g
> sql.g
> php.g
>
> We add into that .g or into antlr -switch
> output=xml
>
> and
>> antlr putput=xml cpp.g
>
> Will produce cpp.g.xml (or sql.g.xml, php.g.xml )
>
> Which will contain language from .g expressed in XML format...
> And may be reverse task XML to .g
>
> Strange task? :) I know ...
What is the goal?
Ter
More information about the antlr-interest
mailing list