Skip to content

Conversation

@maxcalandrelli
Copy link

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

@maxcalandrelli maxcalandrelli changed the title Some bugfix, some new feature. Some bugfixes, some new features. Oct 26, 2019
Copy link
Collaborator

@awalterschulze awalterschulze left a 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" >>
Copy link
Collaborator

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants