Skip to content

ast: Foos cannot be a list, since it precedes Foo #25

@mewmew

Description

@mewmew

I've been unable to find a good way of representing the following grammar:

CatchSwitchTerm -> CatchSwitchTerm
	: 'catchswitch' 'within' Scope=ExceptionScope '[' Handlers=(Label separator ',')+ ']' 'unwind' UnwindTarget=UnwindTarget Metadata=(',' MetadataAttachment)+?
;

%interface UnwindTarget;

UnwindTarget -> UnwindTarget
	: 'to' 'caller' -> UnwindToCaller
	| Label
;

As running the above grammar through Textmapper results in the following error:

$ make
ll.tm,2739: `Handlers` cannot be a list, since it precedes UnwindTarget
lalr: 0.221s, text: 0.521s, parser: 2170 states, 226KB
make: *** [Makefile:7: gen] Error 1

Any suggestions would be warmly welcome.

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