[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lookahead implementation



First of all, I apologize for my previous posts which were in HTML; I didn't realize that!

I noticed that the LOOKAHEAD feature described in the documentation is not yet implemented.  Is there any feeling for when it might get implemented?  Alternatively, perhaps someone can tell me how to construct a grammar that might not need it.  I have a language which allows the following:

DIR = 2*3 + 5   !an arithmetic type expression using symbol DIR

DIR 1 type=3+5 list=abc    !a command directive with some arguments

The problem is that both symbols and command names can be the same.  I was planning to look ahead to see if the identifier is followed by an equals sign to decide if the right hand side is an arithmetic expression or a series of keywords and arguments.  But without looking ahead, I am not sure how to otherwise distinguish them.  Any ideas?

Thanks

Roger
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm