Skip to content

Parsing Whitespace #29

Description

@siuying

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions