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

Re: Lookahead implementation



On Tue, 6 Jan 2004, Roger Pomeroy wrote:

> DIR = 2*3 + 5   !an arithmetic type expression using symbol DIR
>
> DIR 1 type=3+5 list=abc    !a command directive with some arguments

This seems to be the same problem that Pohl was asking about a few days
back.  Why don't you parse DIR as simply an identifier in your abstract
syntax tree, then once you have the whole expression, decide if it was
actually a symbol or a command directive, using a type-inferring walker?

pat