-
Notifications
You must be signed in to change notification settings - Fork 48
Some bugfixes, some new features. #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to say goccmack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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