parsekit icon indicating copy to clipboard operation
parsekit copied to clipboard

Parsing Whitespace

Open siuying opened this issue 12 years ago • 0 comments

In my grammar, I try to add support of whitespace ...

combinator              = '>' | '~' | plus | S;

The grammar generate a parser, but the generated parser compiles with error:

Use of undeclared identifier 'TOKEN_KIND_BUILTIN_S'; did you mean 'TOKEN_KIND_BUILTIN_EOF'?
No visible @interface for 'CSSSelectorParser' declares the selector 'matchS:'

I noticed the whitespace token is TOKEN_KIND_BUILTIN_WHITESPACE and matchWhitespace:, so I try to write grammar like this:

combinator              = '>' | '~' | plus | Whitespace;

This is not a valid grammar however. Can you advice how I can properly use whitespace? Thanks a lot.

siuying avatar Jan 20 '14 04:01 siuying