-
parallel test harness runner landed!
-
we reviewed the content for creating a PR for the Grammar-WG to rust-lang/lang-team
-
@CAD is still working on the %% PR
-
@qmx is taking unit-testing as his next task
We've had a brief discussion on disambiguation, precedence tables as an option to solve this. Since GLL gives us parse forests, we have to figure out a way to pick one of the trees.
We have
$production(.$random_description?)(.$number_in_sequence)?.expected.
We test that all of the
.expected
files are in the parse forest. If$number_in_sequence
is omitted then this asserts uniqueness (the forest is a tree).Once we have a way to test the grammar with expectations, we can experiment with post-processing the parse forest and remove ambiguities; from that we hope to gain a declarative way of specifying disambiguation in
.rs
files. Eventually that may be converted into the.lyg
format.
We're making slow, but steady progress! PRs from @CAD97, @cramertj, and @ehuss!
- lykenware/gll maintenance.
- The overall consensus is that we need to wrap our brains around it ASAP, and reduce the bus factor.
- @cramertj started refactoring/cleaning up some bits, we should probably do the same until we get more clarity around how gll works.
- It's clear that we all miss @eddyb :D
- Removing the existing grammar from rust-lang/rust: #9
- We punted the topic for the next meeting, there was a suggestion of just moving the old grammar into our repo and linking to it.
- deal with the in-flight PRs
- setup travis for the repo
- mini-roadmap discussion
- @qmx parallelization with rayon, travis fixes, blacklist => toml.
- @CAD %% and |=
- @cramertj inline unit tests
- @centril removing grammar redundancies + spicing up repo structure
- @ehuss Making a PR to close issue #1 (charter), cleaning up + enhancing lexical spec in reference, use that to close #3 (lexical spec).
Summary for today's meeting
- @eddyb#0426 had nothing to report since no progress has been made
- @Centril#2862 worked on an RFC rust-lang/rfcs#2602 and tested out the GLL syntax, it felt good, https://github.com/Centril/rfcs/blob/rfc/attributes-galore/text/0000-attributes-galore.md#grammar particularly with the
Rule |= Additions;
formatting. @qmx#4460 agreed it was pleasant and that it was "BNF done right". - We call the notation in GLL: "lyg".
- Change file ending to
.lyg
after merging PR.
- Change file ending to
- @Centril#2862 felt that parameterized grammars could reduce some duplication with e.g.
Bounds<P> = elems:P* % "+" "+"?;
and similar things. - Cargo features should be tried out for nightly features
- @qmx#4460 needs to: "setup the initial test harness with rust-lang/rust vendored into the grammar repo as a submodule"
- @eddyb#0426 needs to do some stuff on the GLL side;
- @qmx#4460 will work on adding
%%
to GLL - Test harness is top prio;
- @Centril#2862 will work on improving @eddyb#0426's PR wrt. style and such things.
- @ehus might split some work with @qmx.
Last wednesday the wg-grammar team had it's biweekly meeting - here are the principal points:
- Progress report on @eddyb's PR
- how to deal with unstable features
- We're going to go with separate files and using
|=
for defining alternate rules. - when to merge @eddyb's PR?
- There's a blocker where GLL uses a lot of ram for parsing a single file - once @eddyb fixes this we'll merge the PR.
- We're going to go with separate files and using
- testing
- inline unit tests
- We've decided to go with tests in separate files, mimicking the grammar file tree structure, since this brings us the advantage of being able to even had AST/parse tree expectation files
- The initial proposed test file name scheme is
<Production>.<random_description>.<ext>
- testing against external corpus
- The initial testing corpus will be rust-lang/rust, once we get to a good place we'll extend this to maybe top 100 crates.io (stable)
- how to deal with ambiguity (declarative...)
- eddyb thinks that's too early to discuss this, we're punting this to the near future
- GLL
- formatting
- we asked for small changes on the overall feel for GLL grammars, GLL PR with the proposed changes.
FnArgs =
| Regular:FnArg+ % ","
| Variadic:"..."
| RegularAndVariadic:{ args:FnArg+ % "," "," "..." }
;
We're using leading |
and moving the other |
to the start of the line.
- syntax changes
- there were some discussions about using BNF-like
::=
for attribution of new rules but this went nowhere at least for now. - there were also discussions about having parameterized grammars
- there were some discussions about using BNF-like