[Mono-devel-list] Re: Keyword "partial"?
Robert Jordan
robertj at gmx.net
Tue Jul 5 04:58:29 EDT 2005
Sebastian Hoehn wrote:
> Hi,
>
> this is perhaps a little bit off-topic, but I wrote a parser for C# and it complains about the following declaration:
>
> bool partial = xyz;
>
> This is due to the fact that partial is "half a keyword" which indicates partial type definitions. Why does the mono compiler accept this? Is it correct behavior to accept this (it is obvious that this cannot be a partial typedef, but why is this)?
Like "get", "set", "value", "add", "remove" etc., "partial" is a
context-sensitive keyword. Your tokenizer must not recognize
them as global keywords. If you're using a bison based
parser, you can declare these tokens as strings:
%token PARTIAL "partial"
or simply use the string itself in productions.
Rob
More information about the Mono-devel-list
mailing list