|Grammar problems email@example.com (Michael Gerhardt) (2001-01-26)|
|Re: Grammar problems firstname.lastname@example.org (Sebastian Moleski \(SurakWare\)) (2001-01-28)|
|Re: Grammar problems email@example.com (mahesha) (2001-02-01)|
|From:||"Michael Gerhardt" <firstname.lastname@example.org>|
|Date:||26 Jan 2001 17:04:39 -0500|
|Organization:||Customer of UUNET Deutschland GmbH|
|Posted-Date:||26 Jan 2001 17:04:38 EST|
Before I start to explain my problem its time to say, that I am an
absolute beginner in this topic, so please be so kind and do not hit
me with a hammer, when I ask stupid questions...
I started generating a parser in a standard grammar with the compiler
generator coco. I do not not know if anybody is used to this tool, but
my main problem is in the grammar itself. I need to describe in which
it is allowed that Identifiers (variable names, etc.) CAN be called
like keywords. I do not know who made this specification, but this is
a severe problem for me. I wrote the complete grammar and after runnig
through a sample of code the error occured: Compilation error: keyword
Any help would be great, because I am going mad on this topic...
[There's no good answer. Parser generators don't get along well with
languages that don't have reserved words. I've written Fortran parsers
in yacc, but they needed an enormous amount of kludgery to feed hints
from the parser back into the lexer. -John]
Return to the
Search the comp.compilers archives again.