gocc
gocc copied to clipboard
Parser / Scanner Generator
I am new to compiler creation. I am building IDE for developing for PLC. As a PLC language Structured Text will be used standard IEC 61131-3. This is Pascal like...
It seems that when I want to get the token's content text, I should use `token.Token.IdValue()` instead of `token.Token.StringValue()` ? `token.Token.StringValue()` will return the string without first and last letter,...
Curious. Any good reason against making [typeMap](https://github.com/goccmack/gocc/blob/master/internal/token/gen/golang/token.go#L90) and idMap public, so its contents can be accessed by the consumer? I've spent the past 6 hours trying to painfully retrieve a...
I am trying to serialize an AST object using gob with below function: //Encodes an object in gob func encodeToGob(object interface{}) (bytes.Buffer, error) { var gobData bytes.Buffer gob.Register(ast.StringToken{}) gob.Register(ast.Object{}) gob.Register(ast.Elements{})...
Hi. I have a use case where I am using gocc for a simple query language for my application. However, the end user of the application does not have in...
`$§` wil be replaces by the name of the entity on preparing SDT call
if not, panic: ```go {"1 + 0", 1} ... calc_test.go:28: Error in S7: INVALID(0,0), Pos(offset=4, line=1, column=5), expected one of: ( int64 calc_test.go:31: Error: 1 + 0 = %!d(). Expected...
The following steps are performed when an invalid input symbol is encountered - * In case the input reaches an invalid symbol, we save its error attribute and keep discarding...
#### [Reference](https://github.com/shivansh/gocc/blob/master/doc/gocc_user_guide.tex#L863) The aim of this issue is to make an attempt at explaining the behavior (mentioned in the reference above) demonstrated by error recovery implemented in `gocc`. ### Scenario...
As far as I understand, `gocc` halts after reporting the first encountered error. Using panic-mode error recovery it will be able to report more than one error at a time,...