|Extended CFGs firstname.lastname@example.org (Ralph Boland) (2006-02-02)|
|Re: Extended CFGs cfc@shell01.TheWorld.com (Chris F Clark) (2006-02-03)|
|Re: Extended CFGs email@example.com (SM Ryan) (2006-02-03)|
|From:||"Ralph Boland" <firstname.lastname@example.org>|
|Date:||2 Feb 2006 11:46:36 -0500|
I am developing a parser generator tool which supports regular
expressions on the lefthand side of productions. My task is made
somewhat simpler if I disallow nullable production left hand sides. I
have been trying to come up with reasons why this might be a bad idea.
So far the only problem I have come up with is that of a nullable
terminal. For example, mulitplication in arithmetic can be a terminal
symbol such as '*' or may be implied by the juxtaposition of two
expressions. Thus we may write the multiplication of two variables B
and C by:
B * C
I might want to write productions to capture this idea as follows:
Mult --> MULT ? # ? means optional
Multiply --> Expression Mult Expression
where MULT is a token defined as:
MULT --> '*'
Now the Mult production is nullable and thus not allowed in my parser
generator. I have a workaround for this particular problem but
perhaps there are other problems.
CAN ANYONE POINT OUT FURTHER PROBLEMS RESULTING FROM DISALLOWING
May all your software be patent free.
Return to the
Search the comp.compilers archives again.