[antlr-interest] [comp.compilers.tools.pccts] Re: Is there a run-time parsing facility
micheal_jor
open.zone at virgin.net
Wed May 7 15:19:43 PDT 2003
Hi Soumen,
> From a dynamic grammar/automation end-user point of view I
> have the following "use cases":
>
> 1. I am receiving a text string. I just supply a correct
> grammar file. The text string passes or fails. If the
> text string fails, I get pointer to text string which
> fails showing corresponding parser/lexer rule.
What additional benefit does this provide beyond the generally
avaible behavior of raising exceptions?
> 2. If I supply a wrong grammar file, I get an exception
> showing where in grammar file the error occurs.
Given that run-time systems also have a compile-time capability, I'd
have thought it was sufficient to simply alert you to the fact that
there is an error. Grammar file debugging can and should be done
interactively *before* the grammar is actually used dynamically.
> 3. Validation of text string does not cause unbound loop.
> Probably max-loop is configurable.
Depends on (2) above.
> 4. If I provide grammar rule, I get text fragment for a valid
> text string. In other words I retrive text fragments by
> parser/lexer rules. For example I say give me the substrings
> corresponding to SQL DELETE statements.
Is that just a special use of a pretty-printing TreeParser?
> Implementation details should be hidden. As I understand a parser
> generator provides computational service by which a program
> understands text by systematically breaking it by parser/lexer
> rules. I just would like to avail this service without any
> compile time/typing commitment. If I require I am willing to
> do type commitment in the sense of dynamically using ANTLR types
> but NO compile time commitment. I do not wish to use any generated
> types (only type commitment is in terms of predefined ANTLR
> types).
>
> This may be difficult to do. I just wanted to clarify end user
> requirements on dynamic grammar/automation computational service.
>
> Regarding performance, this kind implementation may be horribly slow
> today but may not be in future.
Are you planning to build such a dynamic generation framework atop
ANTLR Soumen?
Cheers,
Micheal
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list