[antlr-interest] [comp.compilers.tools.pccts] Re: Is there a run-time parsing facility

sarkar_soumen sarkar_soumen at yahoo.com
Wed May 7 17:00:01 PDT 2003


Hi Michael,

I have interest in dynamic validation of ascii string which
is not XML. I already do this to some extent using bottom most
layer of syntactic hiearchy, namely, Java/C# support of
regular expression at runtime. Exploring to extend
the possibility of validation by loading grammar file at runtime.

There are other interesting applications possible in the
line of "scripting over AST or modified AST". Basically,
I wanted to get past the current idea of language processing
by "compile time/typing commitment". The field where I wanted
apply these ideas are "Model Driven Achitecture/Programming". I
have authored papers on "Model Driven Programming" (in other
words source code generation from models) using XML/XSLT
from the experience of generating 62% code in a J2EE project.
 
Exploring the idea of a generalized parsing/scripting
service along the lines I outlined earlier.

Hope this helps.

Soumen Sarkar. 

--- In antlr-interest at yahoogroups.com, "micheal_jor" 
<open.zone at v...> wrote:
> 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