Skip to content

Instantly share code, notes, and snippets.

@kfsone
Created March 17, 2021 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfsone/6f6d57ad7dbf37045e226d014a3681aa to your computer and use it in GitHub Desktop.
Save kfsone/6f6d57ad7dbf37045e226d014a3681aa to your computer and use it in GitHub Desktop.
make install
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
go install .
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
make -C example regenerate
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example'
make -C astx regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'
gocc ast.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'
make -C bools regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/bools'
gocc -a example.bnf
4 LR-1 conflicts
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/bools'
make -C calc regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/calc'
gocc calc.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/calc'
make -C errormsg regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/errormsg'
gocc example.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/errormsg'
make -C errorrecovery regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/errorrecovery'
gocc er.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/errorrecovery'
make -C mail regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/mail'
gocc mail.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/mail'
make -C nolexer regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/nolexer'
gocc -no_lexer nolexer.bnf
warning: undefined symbol "name" used in productions ["Hello"]
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/nolexer'
make -C rr regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/rr'
gocc -a rr.bnf
1 LR-1 conflicts
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/rr'
make -C sr regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/sr'
gocc -a sr.bnf
1 LR-1 conflicts
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/sr'
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example'
make -C internal/test regenerate
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/internal/test'
make -C t1 regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/internal/test/t1'
gocc t1.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/internal/test/t1'
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/internal/test'
make gofmt
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
gofmt -l -s -w .
example/bools/parser/productionstable.go
example/calc/parser/productionstable.go
example/errormsg/parser/productionstable.go
example/nolexer/parser/productionstable.go
example/rr/parser/productionstable.go
internal/test/t1/parser/productionstable.go
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
go get golang.org/x/tools/cmd/goimports
goimports -w .
go test -v ./...
? github.com/goccmack/gocc [no test files]
=== RUN TestPass
input: a b c d e f
output: [a b c d e f]
--- PASS: TestPass (0.00s)
=== RUN TestFail
input: a b ; d e f
Parsing failed as expected: 1:5: error: expected either "$" or id; got: unknown/invalid token ";"
--- PASS: TestFail (0.00s)
PASS
ok github.com/goccmack/gocc/example/astx (cached)
? github.com/goccmack/gocc/example/astx/ast [no test files]
? github.com/goccmack/gocc/example/astx/errors [no test files]
? github.com/goccmack/gocc/example/astx/lexer [no test files]
? github.com/goccmack/gocc/example/astx/parser [no test files]
? github.com/goccmack/gocc/example/astx/token [no test files]
? github.com/goccmack/gocc/example/astx/util [no test files]
=== RUN TestOr
--- PASS: TestOr (0.00s)
=== RUN TestAnd
--- PASS: TestAnd (0.00s)
=== RUN TestSubString
--- PASS: TestSubString (0.00s)
=== RUN TestLess
--- PASS: TestLess (0.00s)
=== RUN TestMixed
--- PASS: TestMixed (0.00s)
=== RUN TestGroup
--- PASS: TestGroup (0.00s)
=== RUN TestGroupMixed
--- PASS: TestGroupMixed (0.00s)
PASS
ok github.com/goccmack/gocc/example/bools (cached)
? github.com/goccmack/gocc/example/bools/ast [no test files]
? github.com/goccmack/gocc/example/bools/errors [no test files]
? github.com/goccmack/gocc/example/bools/lexer [no test files]
? github.com/goccmack/gocc/example/bools/parser [no test files]
? github.com/goccmack/gocc/example/bools/token [no test files]
? github.com/goccmack/gocc/example/bools/util [no test files]
=== RUN Test1
--- PASS: Test1 (0.00s)
PASS
ok github.com/goccmack/gocc/example/calc (cached)
? github.com/goccmack/gocc/example/calc/errors [no test files]
? github.com/goccmack/gocc/example/calc/lexer [no test files]
? github.com/goccmack/gocc/example/calc/parser [no test files]
? github.com/goccmack/gocc/example/calc/token [no test files]
? github.com/goccmack/gocc/example/calc/util [no test files]
=== RUN TestParsedErrors_passes
=== RUN TestParsedErrors_passes/var_abcd_=_123;
=== RUN TestParsedErrors_passes/__var_____:=__abcd__;
=== RUN TestParsedErrors_passes/var_a__=_1.23_;
=== RUN TestParsedErrors_passes/var_x;
--- PASS: TestParsedErrors_passes (0.00s)
--- PASS: TestParsedErrors_passes/var_abcd_=_123; (0.00s)
--- PASS: TestParsedErrors_passes/__var_____:=__abcd__; (0.00s)
--- PASS: TestParsedErrors_passes/var_a__=_1.23_; (0.00s)
--- PASS: TestParsedErrors_passes/var_x; (0.00s)
=== RUN TestParsedError_errors
=== RUN TestParsedError_errors/var_a_=_1
=== RUN TestParsedError_errors/var_a_=_1_
=== RUN TestParsedError_errors/let_a_=_1;
=== RUN TestParsedError_errors/var_=_1;
=== RUN TestParsedError_errors/var___=_;
=== RUN TestParsedError_errors/var_xyz_=_{}
--- PASS: TestParsedError_errors (0.00s)
--- PASS: TestParsedError_errors/var_a_=_1 (0.00s)
errormsg_test.go:72: 1:10: error: expected ";"; got: end-of-file
--- PASS: TestParsedError_errors/var_a_=_1_ (0.00s)
errormsg_test.go:72: 1:10: error: expected ";"; got: unknown/invalid token "\n"
--- PASS: TestParsedError_errors/let_a_=_1; (0.00s)
errormsg_test.go:72: 1:1: error: expected var; got: "let"
--- PASS: TestParsedError_errors/var_=_1; (0.00s)
errormsg_test.go:72: 1:5: error: expected either identifier or "_"; got: "="
--- PASS: TestParsedError_errors/var___=_; (0.00s)
errormsg_test.go:72: 1:9: error: expected one of identifier, "_", float, or integer; got: ";"
--- PASS: TestParsedError_errors/var_xyz_=_{} (0.00s)
errormsg_test.go:72: 1:11: error: expected one of identifier, "_", float, or integer; got: unknown/invalid token "{"
=== RUN TestParsedErrors_ExtraTokens
--- PASS: TestParsedErrors_ExtraTokens (0.00s)
errormsg_test.go:80: 1:14: error: expected "$"; got: "oops"
=== RUN TestErrors_DescribeExpected
--- PASS: TestErrors_DescribeExpected (0.00s)
=== RUN TestErrors_DescribeToken
=== RUN TestErrors_DescribeToken/eof
=== RUN TestErrors_DescribeToken/eof#01
=== RUN TestErrors_DescribeToken/eof#02
--- PASS: TestErrors_DescribeToken (0.00s)
--- PASS: TestErrors_DescribeToken/eof (0.00s)
--- PASS: TestErrors_DescribeToken/eof#01 (0.00s)
--- PASS: TestErrors_DescribeToken/eof#02 (0.00s)
=== RUN TestErrors_Error
=== RUN TestErrors_Error/custom_error
=== RUN TestErrors_Error/no_tokens
=== RUN TestErrors_Error/unexpected_EOF
=== RUN TestErrors_Error/nominal_error
--- PASS: TestErrors_Error (0.00s)
--- PASS: TestErrors_Error/custom_error (0.00s)
--- PASS: TestErrors_Error/no_tokens (0.00s)
--- PASS: TestErrors_Error/unexpected_EOF (0.00s)
--- PASS: TestErrors_Error/nominal_error (0.00s)
PASS
ok github.com/goccmack/gocc/example/errormsg (cached)
? github.com/goccmack/gocc/example/errormsg/errors [no test files]
? github.com/goccmack/gocc/example/errormsg/lexer [no test files]
? github.com/goccmack/gocc/example/errormsg/parser [no test files]
? github.com/goccmack/gocc/example/errormsg/token [no test files]
? github.com/goccmack/gocc/example/errormsg/util [no test files]
=== RUN TestFail
input: a b ; d e f
output: [
a
1:5: error: expected one of "$", id or error; got: unknown/invalid token ";"
d
e
f
]
--- PASS: TestFail (0.00s)
PASS
ok github.com/goccmack/gocc/example/errorrecovery (cached)
? github.com/goccmack/gocc/example/errorrecovery/ast [no test files]
? github.com/goccmack/gocc/example/errorrecovery/errors [no test files]
? github.com/goccmack/gocc/example/errorrecovery/lexer [no test files]
? github.com/goccmack/gocc/example/errorrecovery/parser [no test files]
? github.com/goccmack/gocc/example/errorrecovery/token [no test files]
? github.com/goccmack/gocc/example/errorrecovery/util [no test files]
=== RUN Test1
--- PASS: Test1 (0.00s)
=== RUN Test2
--- PASS: Test2 (0.00s)
PASS
ok github.com/goccmack/gocc/example/mail (cached)
? github.com/goccmack/gocc/example/mail/lexer [no test files]
? github.com/goccmack/gocc/example/mail/token [no test files]
? github.com/goccmack/gocc/example/mail/util [no test files]
=== RUN Test1
hiya world
--- PASS: Test1 (0.00s)
=== RUN Test2
hello world
--- PASS: Test2 (0.00s)
PASS
ok github.com/goccmack/gocc/example/nolexer (cached)
? github.com/goccmack/gocc/example/nolexer/errors [no test files]
? github.com/goccmack/gocc/example/nolexer/parser [no test files]
? github.com/goccmack/gocc/example/nolexer/scanner [no test files]
? github.com/goccmack/gocc/example/nolexer/token [no test files]
? github.com/goccmack/gocc/example/nolexer/util [no test files]
=== RUN Test
src: `a`; exp: `B `
src: `a a`; exp: `A1 `
src: `a a a`; exp: `A1 `
src: `c a`; exp: `A1 `
src: `c a a a a`; exp: `A1 `
--- PASS: Test (0.00s)
PASS
ok github.com/goccmack/gocc/example/rr (cached)
? github.com/goccmack/gocc/example/rr/errors [no test files]
? github.com/goccmack/gocc/example/rr/lexer [no test files]
? github.com/goccmack/gocc/example/rr/parser [no test files]
? github.com/goccmack/gocc/example/rr/token [no test files]
? github.com/goccmack/gocc/example/rr/util [no test files]
=== RUN Test1
--- PASS: Test1 (0.00s)
=== RUN Test2
--- PASS: Test2 (0.00s)
=== RUN Test3
--- PASS: Test3 (0.00s)
PASS
ok github.com/goccmack/gocc/example/sr (cached)
? github.com/goccmack/gocc/example/sr/ast [no test files]
? github.com/goccmack/gocc/example/sr/errors [no test files]
? github.com/goccmack/gocc/example/sr/lexer [no test files]
? github.com/goccmack/gocc/example/sr/parser [no test files]
? github.com/goccmack/gocc/example/sr/token [no test files]
? github.com/goccmack/gocc/example/sr/util [no test files]
? github.com/goccmack/gocc/internal/ast [no test files]
? github.com/goccmack/gocc/internal/config [no test files]
? github.com/goccmack/gocc/internal/frontend/errors [no test files]
? github.com/goccmack/gocc/internal/frontend/parser [no test files]
=== RUN Test1
--- PASS: Test1 (0.00s)
=== RUN Test2
--- PASS: Test2 (0.00s)
PASS
ok github.com/goccmack/gocc/internal/frontend/scanner (cached)
? github.com/goccmack/gocc/internal/frontend/token [no test files]
? github.com/goccmack/gocc/internal/io [no test files]
? github.com/goccmack/gocc/internal/lexer/gen/golang [no test files]
=== RUN TestDisjunctSets0
--- PASS: TestDisjunctSets0 (0.00s)
=== RUN TestDisjunctSets1
--- PASS: TestDisjunctSets1 (0.00s)
=== RUN TestDisjunctSets2
--- PASS: TestDisjunctSets2 (0.00s)
=== RUN TestDisjunctSets3
--- PASS: TestDisjunctSets3 (0.00s)
=== RUN TestDisjunctSets4
--- PASS: TestDisjunctSets4 (0.00s)
=== RUN TestDisjunctSets5
--- PASS: TestDisjunctSets5 (0.00s)
=== RUN TestDisjunctSets6
--- PASS: TestDisjunctSets6 (0.00s)
=== RUN TestDisjunctSets7
--- PASS: TestDisjunctSets7 (0.00s)
=== RUN TestDisjunctSets8
--- PASS: TestDisjunctSets8 (0.00s)
=== RUN TestDisjunctSets9
--- PASS: TestDisjunctSets9 (0.00s)
=== RUN TestDisjunctSets10
--- PASS: TestDisjunctSets10 (0.00s)
=== RUN TestDisjunctSets11
--- PASS: TestDisjunctSets11 (0.00s)
=== RUN TestDisjunctSets12
--- PASS: TestDisjunctSets12 (0.00s)
=== RUN TestDisjunctSets13
--- PASS: TestDisjunctSets13 (0.00s)
=== RUN TestDisjunctSets14
--- PASS: TestDisjunctSets14 (0.00s)
=== RUN Test1
--- PASS: Test1 (0.00s)
=== RUN Test2
--- PASS: Test2 (0.00s)
=== RUN Test3
--- PASS: Test3 (0.00s)
=== RUN Test4
--- PASS: Test4 (0.00s)
=== RUN Test5
--- PASS: Test5 (0.00s)
=== RUN TestItemPos1
--- PASS: TestItemPos1 (0.00s)
=== RUN TestItemPosClone1
--- PASS: TestItemPosClone1 (0.00s)
=== RUN TestItemPos2
--- PASS: TestItemPos2 (0.00s)
PASS
ok github.com/goccmack/gocc/internal/lexer/items (cached)
? github.com/goccmack/gocc/internal/lexer/symbols [no test files]
? github.com/goccmack/gocc/internal/parser/first [no test files]
? github.com/goccmack/gocc/internal/parser/gen [no test files]
? github.com/goccmack/gocc/internal/parser/gen/golang [no test files]
? github.com/goccmack/gocc/internal/parser/lr1/action [no test files]
testing: warning: no tests to run
PASS
ok github.com/goccmack/gocc/internal/parser/lr1/items (cached) [no tests to run]
? github.com/goccmack/gocc/internal/parser/symbols [no test files]
=== RUN Test1
--- PASS: Test1 (0.00s)
=== RUN Test2
--- PASS: Test2 (0.00s)
=== RUN Test3
--- PASS: Test3 (0.00s)
PASS
ok github.com/goccmack/gocc/internal/test/t1 (cached)
? github.com/goccmack/gocc/internal/test/t1/errors [no test files]
? github.com/goccmack/gocc/internal/test/t1/lexer [no test files]
? github.com/goccmack/gocc/internal/test/t1/parser [no test files]
? github.com/goccmack/gocc/internal/test/t1/token [no test files]
? github.com/goccmack/gocc/internal/test/t1/util [no test files]
=== RUN TestEmptyKeyword
--- PASS: TestEmptyKeyword (0.11s)
PASS
ok github.com/goccmack/gocc/internal/test/t2 (cached)
? github.com/goccmack/gocc/internal/token [no test files]
? github.com/goccmack/gocc/internal/token/gen [no test files]
? github.com/goccmack/gocc/internal/token/gen/golang [no test files]
? github.com/goccmack/gocc/internal/util [no test files]
? github.com/goccmack/gocc/internal/util/gen [no test files]
? github.com/goccmack/gocc/internal/util/gen/golang [no test files]
? github.com/goccmack/gocc/internal/util/md [no test files]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment