|writing ambiguous grammar... email@example.com (2006-02-17)|
|Date:||17 Feb 2006 00:12:22 -0500|
|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]
Return to the
Search the comp.compilers archives again.