Skip to content

Implement anonymous terminals in productions. #22

@pintarj

Description

@pintarj

Sometimes declaring terminals can be verbose. Consider this Generz code example (variable Expression is declared elsewhere):

terminal if
terminal brace_left /{/
terminal brace_right /}/

variable While {
    production if Expression brace_left Expression brace_right
}

It works, but is boilerplate. A less-verbose equivalent syntax can be obtained allowing regular-expressions to be used as production nodes. The upper example would be then transformed to:

variable While {
    production /if/ Expression /{/ Expression /}/
}

Implement this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions