Skip to content

Official Demo Parse Question: WebIDL parse, type of all tokens is null #75

Description

@AntsKnows

When try official demo at http://lab.antlr.org/ , select WebIDL, click run, then i can see that any WebIDL was parsed into
enumValueListComma.
And the type of each identifiers is null or IDENTIFIER_WEBIDL.
See as:
image

Then i build a local cpp-language demo:

  1. Download WebIDL.g4 from https://github.com/antlr/grammars-v4/blob/master/webidl/WebIDL.g4
  2. run Antlr4 WebIDL.g4 -Dlanguage=Cpp
  3. Use it to parse
interface mixin GPUObjectBase {
    attribute USVString label;
};

4.output : "line 1:0 no viable alternative at input 'interface'" or other error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions