We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In case of rule redeclaration the generator should return an error:
package main type parser Peg { } main <- (a)+ a <- 'a' a <- 'a'
The invalid grammar crashes the generator due to a segmentation fault:
romanscharkov@RomMac pegbug % peg grammar.peg panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1164e55] goroutine 1 [running]: github.com/pointlander/peg/tree.(*Tree).Compile(0xc000074000, 0xc00001a0e0, 0xe, 0xc00000c060, 0x2, 0x2, 0x1200e60, 0xc00000e030, 0x0, 0x0) /Users/romanscharkov/go/src/github.com/pointlander/peg/tree/peg.go:1506 +0x1475 main.main() /Users/romanscharkov/go/src/github.com/pointlander/peg/main.go:87 +0x575
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behavior
In case of rule redeclaration the generator should return an error:
Actual behavior
The invalid grammar crashes the generator due to a segmentation fault:
The text was updated successfully, but these errors were encountered: