Skip to content

Simple grammar error #77

@jtejido

Description

@jtejido

Hi,

Just wanted to test something simple at first. I'd like to test a program that only start with the word 'fsm' and it out an error saying "<missing 'fsm'>"

the grammar to be tested:

grammar Fsm;

fsm
    :   'fsm' ID
    ;

ID
    :   Letter
    ;

fragment
Letter
    :  '\u0024'           /* $   */ |
       '\u0041'..'\u005a' /* A-Z */ |
       '\u005f'           /* _   */ |
       '\u0061'..'\u007a' /* a-z */ |
       '\u00c0'..'\u00d6' |
       '\u00d8'..'\u00f6' |
       '\u00f8'..'\u00ff' |
       '\u0100'..'\u1fff' |
       '\u3040'..'\u318f' |
       '\u3300'..'\u337f' |
       '\u3400'..'\u3d2d' |
       '\u4e00'..'\u9fff' |
       '\uf900'..'\ufaff'
    ;

The simple test is:
fsm Test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions