Results 545 comments of David Neto

> Why would we want to shove the semantics into the type rule? The semantics seems different from the type, almost orthogonal. It's a judgement call. I was trying to...

Meh. Consider closing this without any changes. Except it's a good idea to make the tables consistent about "Notes" vs "Description"

Preliminaries: - WGSL is LALR(1) - Recursive descent is LL(*) - There are some LALR(1) languages which are not LL(1). - But WGSL's grammar might be transformable to LL(*). -...

With work in progress, I can remove left recursion in the grammar, then hoist up 'singular_expression' up into its ancestors all the way to `expression` and `element_count_expression`. The result is...

Dan told me a better way to do it: 1. eliminate immediate left recursion. * This produces rules of the form "X.rest" which is part of a right-recursive rewriting of...

Note that the removal of immediate left recursion changes the apparent associativity. When matching a non-empty `additive_expression.rest`, e.g plus multiplicative_expression additive_expression.rest there is always a left-hand side term that is...

Now without unreachable rules. [wgsl.recursive.txt](https://github.com/gpuweb/gpuweb/files/9284303/wgsl.recursive.txt)

Now collapsing cases like this: ``` A -> B | epsilon B -> ... | epsilon ``` By replacing all uses of A with B. This occurs for: ``` replacing...