-
可以参考一下我以前的小玩具:https://github.com/vczh/tinymoe
具体的技术细节我已经实践过了,肯定是没问题的。主要想法就是,把输入的脚本的自定义符号先提取出来,然后在内存中当场生成一个GLR parser,再把输入的脚本parse一遍,就得到了一颗AST。处理局部符号的时候,一边parse一边改parser就好了。
🤪
-
I'm posting this here because it's a related question:
With the bison/yacc grammar shown bellow how could I get an AST like this:
```
+ input
+ grammar
+ rules_or_grammar_declaration/0[rule…
-
_Originally posted by @mingodad in https://github.com/yhirose/cpp-peglib/issues/200#issuecomment-1146186960_
See this comment https://github.com/ChrisHixon/chpeg/issues/4#issuecomment-1146185093 fo…
-
See https://lists.w3.org/Archives/Public/public-ixml/2022Jan/0030.html and ensuing thread.
In the current spec, two passages are relevant:
> If more than one parse results, one is chosen; it is …
-
## 🐛 Bug
Installing conda-forge napari with the pyside2 backend (which occurred when making an env with stardist-napari) results in an error when opening any sample image:
`AttributeError: 'Canvas…
-
K Version
---------
```
% kompile --version
K version: v5.2.21-44-gd7d340bd4f
Build date: Thu Jan 20 01:52:53 UTC 2022
```
Description
-----------
`kparse` is truncating the output…
-
Given the sample file:
```
infixr ++++
```
HLint head (GHC 9.2) fails with:
```
*** Exception: ghc-9.2.1.exe: panic! (the 'impossible' happened)
(GHC version 9.2.1:
Parser shou…
-
I'm getting trouble fully understanding the trace output, I'm trying to find why this grammar http://ingmarschlecht.de/gamsToLatex/ that I converted to `peg` understood by `peglib` (see bellow) and it…
-
With the hint in https://github.com/simonmar/happy/issues/173#issuecomment-778661448, the `--glr` mode can be tested again.
- [x] Fix generated `Makefile` to drop `happy` options `--ghc --coerce` w…
-
Using tree-sitter-cli 0.19.4.
Consider a basic language consisting of a series of definitions:
```tla
foo == 1 + 2
bar == 3 + 4
```
Each definition is not delimited; this would not be a proble…