Last active
June 10, 2019 16:49
-
-
Save shivansh/1567af5d80d91a326aec521264512359 to your computer and use it in GitHub Desktop.
Demo for buggy handling of comments in gocc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by gocc; DO NOT EDIT. | |
package parser | |
type ( | |
actionTable [numStates]actionRow | |
actionRow struct { | |
canRecover bool | |
actions [numSymbols]action | |
} | |
) | |
var actionTab = actionTable{ | |
actionRow{ // S0 | |
canRecover: false, | |
actions: [numSymbols]action{ | |
nil, // INVALID | |
nil, // $ | |
shift(2), // /* | |
nil, // test | |
nil, // */ | |
}, | |
}, | |
actionRow{ // S1 | |
canRecover: false, | |
actions: [numSymbols]action{ | |
nil, // INVALID | |
accept(true), // $ | |
nil, // /* | |
nil, // test | |
nil, // */ | |
}, | |
}, | |
actionRow{ // S2 | |
canRecover: false, | |
actions: [numSymbols]action{ | |
nil, // INVALID | |
nil, // $ | |
nil, // /* | |
shift(3), // test | |
nil, // */ | |
}, | |
}, | |
actionRow{ // S3 | |
canRecover: false, | |
actions: [numSymbols]action{ | |
nil, // INVALID | |
nil, // $ | |
nil, // /* | |
nil, // test | |
shift(4), // */ | |
}, | |
}, | |
actionRow{ // S4 | |
canRecover: false, | |
actions: [numSymbols]action{ | |
nil, // INVALID | |
reduce(1), // $, reduce: MLComment | |
nil, // /* | |
nil, // test | |
nil, // */ | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment