aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx/doc/NOTES.md
blob: b4d2ad3962a650fddcd373abb297e8a4a9fd0bb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
I'm convinced nobody actually uses parser generators in Rust:
* pomelo can't generate lexer (understandable, as it is a port of lemon and lemon can't do this either)
* pest can't do parse actions, you have to convert your parse tree to ast manually
* lalrpop can't do comments
  * and the day I wrote the line above it can
  * reports parsing errors as byte offsets
  * if you want to skip parsing one of the alternatives functional design gets quite awkward
* antlr4rust is untried and requires java to build
* no library supports island grammars

What to emit?
* SPIR-V
  * Better library support, easier to emit
  * Can by optimized by IGC
  * Can't do some things (not sure what exactly yet)
    * But we can work around things with inline VISA
* VISA
  * Quicker compilation