writing ambiguous grammar...

17 Feb 2006 00:12:22 -0500

          From comp.compilers

Related articles
writing ambiguous grammar... chareraous@hotmail.com (2006-02-17)
| List of all articles for this month |

From: chareraous@hotmail.com
Newsgroups: comp.compilers
Date: 17 Feb 2006 00:12:22 -0500
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 17 Feb 2006 00:12:22 EST


I want to write a grammar for recognization both of
IP Address and general text.

But if the string contains any ambiguous string such as "68.",
parser(lexer) may not be able to determine the string is
IP Address or just a general text.

which kind of grammar could distinguish the two different string?
I'll be appreciated for your help.
[Well, OK. Is this a string or an abbreviated IP address? 42.
Unless you have some context that tells you what to expect, neither a
computer parser nor a person can tell what it's supposed to be. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.