Generating "subparsers" form one grammar.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating "subparsers" form one grammar.

Petr Sezemský



Is there any way to generate "subparsers" in the same step as main parser? I
mean the case when Number.grammar contains for example

INT = <<-?[0-9]+>>
...
Number = Int | Real; // root node
...
Int = INT;
...

and the result should be NumberParser.java and IntParser.java also.

Thanks


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Generating "subparsers" form one grammar.

Per Cederberg
Not right now, no. But you could of course comment the Number
production in the grammar file...

Cheers,

/Per

On Fri, Jan 16, 2009 at 1:29 PM, Petr Sezemsky <[hidden email]> wrote:

>
>
>
> Is there any way to generate "subparsers" in the same step as main parser? I
> mean the case when Number.grammar contains for example
>
> INT = <<-?[0-9]+>>
> ...
> Number = Int | Real; // root node
> ...
> Int = INT;
> ...
>
> and the result should be NumberParser.java and IntParser.java also.
>
> Thanks
>
>
> _______________________________________________
> Grammatica-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users