Some bugfixes, some new features.#96
Some bugfixes, some new features.#96maxcalandrelli wants to merge 34 commits intogoccmack:masterfrom
Conversation
awalterschulze
left a comment
There was a problem hiding this comment.
Sorry for the LONG wait.
I have been away on a very busy holiday and I am only now starting to catch up with emails.
This is a VERY big diff, which makes it very hard to review.
Would you mind breaking it up into diffs that each accomplish one thing on your list.
I am especially excited about "gocc now parses its own grammar and produces a working parser for itself" and most of the other things on your list also sound very cool.
The hope is that by pushing one feature at a time, we can properly and more easily review your diffs. This way we will also get more engagement from the other maintainers, since we will need two to approve.
I know this will take a lot of effort to untangle and I am really sorry to ask this of you.
But I am also very excited to see how you accomplished all these things.
Maybe you can also comment here about how you got started working on this and tell us a bit about yourself. I really look forward to reviewing your smaller diffs and I am really impressed with the goals you achieved.
| /* Syntax elements */ | ||
|
|
||
| << import "github.com/goccmack/gocc/example/astx/ast" >> | ||
| << import "github.com/maxcalandrelli/gocc/example/astx/ast" >> |
There was a problem hiding this comment.
This needs to say goccmack
There was a problem hiding this comment.
@maxcalandrelli you can make this work locally by doing the following:
$ cd $GOPATH/github.com/maxcalandrelli/gocc
$ go mod tidy
$ go mod edit --replace github.com/goccmack/gocc=./
just remember not to commit the replace in your go.mod
Changes summary:
- gocc now parses its own grammar and produces a working parser for itself
- bugfixes in handling of dots and regdefids in the lexical analyzer
- eliminated ambiguity between literals and labels of productions
- added the ability to specify negative char and char ranges to lexer
- added a user defined context as a parameter to parser
- added functions shorthand substitutions for SDT placeholders
- added the ability to parse only the longest possible prefix of data, returning the consumed bytes
- added support for a simple form of context-sensitive (non deterministic) parsing by invoking a different lexer/parser pair while scanning