Skip to content

Typeset a single grammar block with multiple productions #536

@sgraf812

Description

@sgraf812

I'd like to typeset several productions of a grammar at once, such that it displays roughly as

term ::= ...
  | term + term
  | term * term
  | term / term

I tried the subjectively intuitive thing, writing one grammar block and separating each production by a newline:

```grammar
$_:term + $_:term
$_:term * $_:term
$_:term / $_:term
```

But that displays as

term ::= ...
  | term + term
    term * term
    term / term

and actually parses everything as one big production, it seems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions