For Programmers: Free Programming Magazines  


Home > Archive > Compilers > February 2006 > writing ambiguous grammar...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author writing ambiguous grammar...
chareraous@hotmail.com

2006-02-17, 3:59 am

Hi,

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]


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com