grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [Grammatica-users] How can I generate grammar at run-time?


From: Per Cederberg
Subject: Re: Re: [Grammatica-users] How can I generate grammar at run-time?
Date: Thu, 22 Apr 2010 11:20:11 +0200

Exactly. Grammatica reads EBNF-files (in the grammar format) and
builds a parser on the fly. The parser source code that it generates
*also* builds that same parser on the fly at initialization.

The limitation is of course that any run-time parser based on
Grammatica can only parse LL grammars.

Cheers,

/Per

2010/4/22 Oliver Gramberg <address@hidden>:
>
> Hi, Ламер,
>
>> thanks, but actually by saying "at run-time" I mean that
>> it is decided dynamically how to parse an input string. I
>> want to write flexible formatter of incoming documents of
>> different structures. And metadata from that texts will be
>> retrieved according to some files that contain grammar. It
>> would be useful for write another file of grammar, than
>> rewriting the code.
>
> I'm getting lost in the details here, but it still seems to me that
> Grammatica's "--parse" action does the same thing as you describe. Think
> about it: It reads a grammar, builds a parser on the fly, and parses an
> input according to that grammar, all in one go. Isn't that in principle what
> you want to do? So, even if you cannot use Grammatica as is, have a look at
> the sources--it's free, isn't it?--reuse the parser generator code on a high
> level and roll your own!
>
> What is your preferred programming language?
>
> Regards
> Oliver
>
> _______________________________________________
> Grammatica-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]