declaration/expression
Tim Matthews
tim.matthews7 at gmail.com
Tue Jun 23 21:15:15 PDT 2009
Ellery Newcomer wrote:
>
> To restate my question, if I'm a parser and I see
>
> Identifier ( Identifier ) ;
>
> which do I interpret it as?
>
> Type ( NewSymbol ) ;
> FunctionName ( Argument ) ;
>
After some incremental parsing iterations you should be able to
gradually resolve dependencies for each expression. If it's not
ambiguous on what the source is trying to describe and all its
dependencies are resolved then you add the new types that it may be
declaring to a collection of parsed types. Repeat until everything can
be passed and eventually you should know exactly what the first ID is
(type, func etc). IIRC opCall can not be declared static.
Sorry if I am completely missing the point but this doesn't seem complex
(in a problem solving sense but the code writing may be tedious)
More information about the Digitalmars-d
mailing list