Typeset a single `grammar` block with multiple productions
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 384
- Forks
- 124
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 10
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue's grammar block example in Verso and inspect how consecutive productions are parsed and rendered. Done means separate productions display as alternatives, with each line after the first prefixed by |, rather than being treated as one production.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100