UNPKG

puzzlescript

Version:

Play PuzzleScript games in your terminal!

537 lines (525 loc) 101 kB
// Generated automatically by nearley, version 2.20.1 // http://github.com/Hardmath123/nearley // Bypasses TS6133. Allow declared but unused functions. // @ts-ignore function id(d: any[]): any { return d[0]; } // tslint:disable // Disable all linting because the file is autogenerated (& out of our control) import * as ast from './astTypes' const debugBlackList = new Set<string>([]) const debugWhiteList = new Set<string>([]) const toDebug = (name: string, fn?: (fields: any[]) => any) => { if (process.env.NODE_ENV == 'debug-parser' || debugWhiteList.has(name)) { // Skip debug mode for any items on the blacklist if (debugBlackList.has(name)) { return null } // return either the custom function provided, or the default one for debugging return fn || function (args) { return {type: name, args: args} } } else { return null // use the non-debug function } } const nuller = (a: any) => null // const debugRule = (msg) => (a) => { debugger; console.log(msg, a); return a } const concatChars = ([a]: string[][]) => a.join('') const extractFirst = <T>(ary: T[][]) => ary.map(subArray => { if (subArray.length !== 1) { throw new Error(`BUG: Expected items to only have one element (usually used in listOf[...])`) } else { return subArray[0] } }) const extractSecond = <T>(ary: T[][]) => ary.map(subArray => { if (subArray.length < 2) { throw new Error(`BUG: Expected items to have at least 2 elements (usually used in listOf[...])`) } else { return subArray[1] } }) const extractThird = <T>(ary: T[][]) => ary.map(subArray => { if (subArray.length < 3) { throw new Error(`BUG: Expected items to have at least 3 elements (usually used in listOf[...])`) } else { return subArray[2] } }) function nonemptyListOf<T>([first, rest]: any[]/*[T, T[][]]*/) { const f = first as T const r = rest as T[][] return [f].concat(r.map(([_1, child]) => child)) } const upperId = ([id]: string[]) => id.toUpperCase() const TILE_MODIFIERS = new Set([ '...', // This one isn't a modifier but we do not allow it so that we match ellipsis rules in a different rule 'AGAIN', // This is another hack. Some people write `[]->[AGAIN]` rather than `[]->[]AGAIN` 'DEBUGGER', // Another hack. Ensure that this is not accidentally used as a tile name 'NO', 'LEFT', 'RIGHT', 'UP', 'DOWN', 'RANDOMDIR', 'RANDOM', 'STATIONARY', 'MOVING', 'ACTION', 'VERTICAL', 'HORIZONTAL', 'PERPENDICULAR', 'PARALLEL', 'ORTHOGONAL', '^', '<', '>', 'V', ]) interface NearleyToken { value: any; [key: string]: any; }; interface NearleyLexer { reset: (chunk: string, info: any) => void; next: () => NearleyToken | undefined; save: () => any; formatError: (token: never) => string; has: (tokenType: string) => boolean; }; interface NearleyRule { name: string; symbols: NearleySymbol[]; postprocess?: (d: any[], loc?: number, reject?: {}) => any; }; type NearleySymbol = string | { literal: any } | { test: (token: any) => boolean }; interface Grammar { Lexer: NearleyLexer | undefined; ParserRules: NearleyRule[]; ParserStart: string; }; const grammar: Grammar = { Lexer: undefined, ParserRules: [ {"name": "main$ebnf$1", "symbols": []}, {"name": "main$ebnf$1", "symbols": ["main$ebnf$1", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$2", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$2", "symbols": ["main$ebnf$2", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$3$macrocall$2", "symbols": ["t_OBJECTS"]}, {"name": "main$ebnf$3$macrocall$3", "symbols": ["Sprite"]}, {"name": "main$ebnf$3$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$3$macrocall$1$ebnf$1", "symbols": ["main$ebnf$3$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$3$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$3$macrocall$1$ebnf$2", "symbols": ["main$ebnf$3$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$3$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$3$macrocall$1$ebnf$3", "symbols": ["main$ebnf$3$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$3$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$3$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$3$macrocall$3"]}, {"name": "main$ebnf$3$macrocall$1$ebnf$4", "symbols": ["main$ebnf$3$macrocall$1$ebnf$4", "main$ebnf$3$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$3$macrocall$1", "symbols": ["_", "main$ebnf$3$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$3$macrocall$2", "lineTerminator", "_", "main$ebnf$3$macrocall$1$ebnf$2", "main$ebnf$3$macrocall$1$ebnf$3", "main$ebnf$3$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$3", "symbols": ["main$ebnf$3$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$3", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$4$macrocall$2", "symbols": ["t_LEGEND"]}, {"name": "main$ebnf$4$macrocall$3", "symbols": ["LegendTile"]}, {"name": "main$ebnf$4$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$4$macrocall$1$ebnf$1", "symbols": ["main$ebnf$4$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$4$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$4$macrocall$1$ebnf$2", "symbols": ["main$ebnf$4$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$4$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$4$macrocall$1$ebnf$3", "symbols": ["main$ebnf$4$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$4$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$4$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$4$macrocall$3"]}, {"name": "main$ebnf$4$macrocall$1$ebnf$4", "symbols": ["main$ebnf$4$macrocall$1$ebnf$4", "main$ebnf$4$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$4$macrocall$1", "symbols": ["_", "main$ebnf$4$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$4$macrocall$2", "lineTerminator", "_", "main$ebnf$4$macrocall$1$ebnf$2", "main$ebnf$4$macrocall$1$ebnf$3", "main$ebnf$4$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$4", "symbols": ["main$ebnf$4$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$4", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$5$macrocall$2", "symbols": ["t_SOUNDS"]}, {"name": "main$ebnf$5$macrocall$3", "symbols": ["SoundItem"]}, {"name": "main$ebnf$5$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$5$macrocall$1$ebnf$1", "symbols": ["main$ebnf$5$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$5$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$5$macrocall$1$ebnf$2", "symbols": ["main$ebnf$5$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$5$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$5$macrocall$1$ebnf$3", "symbols": ["main$ebnf$5$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$5$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$5$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$5$macrocall$3"]}, {"name": "main$ebnf$5$macrocall$1$ebnf$4", "symbols": ["main$ebnf$5$macrocall$1$ebnf$4", "main$ebnf$5$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$5$macrocall$1", "symbols": ["_", "main$ebnf$5$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$5$macrocall$2", "lineTerminator", "_", "main$ebnf$5$macrocall$1$ebnf$2", "main$ebnf$5$macrocall$1$ebnf$3", "main$ebnf$5$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$5", "symbols": ["main$ebnf$5$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$5", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$6$macrocall$2", "symbols": ["t_COLLISIONLAYERS"]}, {"name": "main$ebnf$6$macrocall$3", "symbols": ["CollisionLayerItem"]}, {"name": "main$ebnf$6$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$6$macrocall$1$ebnf$1", "symbols": ["main$ebnf$6$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$6$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$6$macrocall$1$ebnf$2", "symbols": ["main$ebnf$6$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$6$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$6$macrocall$1$ebnf$3", "symbols": ["main$ebnf$6$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$6$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$6$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$6$macrocall$3"]}, {"name": "main$ebnf$6$macrocall$1$ebnf$4", "symbols": ["main$ebnf$6$macrocall$1$ebnf$4", "main$ebnf$6$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$6$macrocall$1", "symbols": ["_", "main$ebnf$6$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$6$macrocall$2", "lineTerminator", "_", "main$ebnf$6$macrocall$1$ebnf$2", "main$ebnf$6$macrocall$1$ebnf$3", "main$ebnf$6$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$6", "symbols": ["main$ebnf$6$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$6", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$7$macrocall$2", "symbols": ["t_RULES"]}, {"name": "main$ebnf$7$macrocall$3", "symbols": ["RuleItem"]}, {"name": "main$ebnf$7$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$7$macrocall$1$ebnf$1", "symbols": ["main$ebnf$7$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$7$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$7$macrocall$1$ebnf$2", "symbols": ["main$ebnf$7$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$7$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$7$macrocall$1$ebnf$3", "symbols": ["main$ebnf$7$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$7$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$7$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$7$macrocall$3"]}, {"name": "main$ebnf$7$macrocall$1$ebnf$4", "symbols": ["main$ebnf$7$macrocall$1$ebnf$4", "main$ebnf$7$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$7$macrocall$1", "symbols": ["_", "main$ebnf$7$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$7$macrocall$2", "lineTerminator", "_", "main$ebnf$7$macrocall$1$ebnf$2", "main$ebnf$7$macrocall$1$ebnf$3", "main$ebnf$7$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$7", "symbols": ["main$ebnf$7$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$7", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$8$macrocall$2", "symbols": ["t_WINCONDITIONS"]}, {"name": "main$ebnf$8$macrocall$3", "symbols": ["WinConditionItem"]}, {"name": "main$ebnf$8$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$8$macrocall$1$ebnf$1", "symbols": ["main$ebnf$8$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$8$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$8$macrocall$1$ebnf$2", "symbols": ["main$ebnf$8$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$8$macrocall$1$ebnf$3", "symbols": ["lineTerminator"]}, {"name": "main$ebnf$8$macrocall$1$ebnf$3", "symbols": ["main$ebnf$8$macrocall$1$ebnf$3", "lineTerminator"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$8$macrocall$1$ebnf$4", "symbols": []}, {"name": "main$ebnf$8$macrocall$1$ebnf$4$subexpression$1", "symbols": ["main$ebnf$8$macrocall$3"]}, {"name": "main$ebnf$8$macrocall$1$ebnf$4", "symbols": ["main$ebnf$8$macrocall$1$ebnf$4", "main$ebnf$8$macrocall$1$ebnf$4$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$8$macrocall$1", "symbols": ["_", "main$ebnf$8$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$8$macrocall$2", "lineTerminator", "_", "main$ebnf$8$macrocall$1$ebnf$2", "main$ebnf$8$macrocall$1$ebnf$3", "main$ebnf$8$macrocall$1$ebnf$4"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$8", "symbols": ["main$ebnf$8$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$8", "symbols": [], "postprocess": () => null}, {"name": "main$ebnf$9$macrocall$2", "symbols": ["t_LEVELS"]}, {"name": "main$ebnf$9$macrocall$3", "symbols": ["LevelItem"]}, {"name": "main$ebnf$9$macrocall$1$ebnf$1", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$9$macrocall$1$ebnf$1", "symbols": ["main$ebnf$9$macrocall$1$ebnf$1", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$9$macrocall$1$ebnf$2", "symbols": [{"literal":"="}]}, {"name": "main$ebnf$9$macrocall$1$ebnf$2", "symbols": ["main$ebnf$9$macrocall$1$ebnf$2", {"literal":"="}], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$9$macrocall$1$ebnf$3", "symbols": []}, {"name": "main$ebnf$9$macrocall$1$ebnf$3$subexpression$1", "symbols": ["main$ebnf$9$macrocall$3"]}, {"name": "main$ebnf$9$macrocall$1$ebnf$3", "symbols": ["main$ebnf$9$macrocall$1$ebnf$3", "main$ebnf$9$macrocall$1$ebnf$3$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "main$ebnf$9$macrocall$1", "symbols": ["_", "main$ebnf$9$macrocall$1$ebnf$1", "lineTerminator", "_", "main$ebnf$9$macrocall$2", "lineTerminator", "_", "main$ebnf$9$macrocall$1$ebnf$2", "lineTerminator", "main$ebnf$9$macrocall$1$ebnf$3"], "postprocess": toDebug('Section', function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return {type: 'SECTION', name: name, items: extractFirst(extractFirst(items)) } }) || function ([_0, _1, _2, _3, name, _5, _6, _7, _8, items]) { return extractFirst(extractFirst(items)) } }, {"name": "main$ebnf$9", "symbols": ["main$ebnf$9$macrocall$1"], "postprocess": id}, {"name": "main$ebnf$9", "symbols": [], "postprocess": () => null}, {"name": "main", "symbols": ["main$ebnf$1", "_", "Title", "main$ebnf$2", "OptionalMetaData", "main$ebnf$3", "main$ebnf$4", "main$ebnf$5", "main$ebnf$6", "main$ebnf$7", "main$ebnf$8", "main$ebnf$9"], "postprocess": toDebug('Section') || function([_0, _1, title, _2, metadata, sprites, legendItems, sounds, collisionLayers, rules, winConditions, levelsAsSingleArray]) { const levels = [] let currentMapLevel = null for (const levelRowItem of levelsAsSingleArray || []) { switch (levelRowItem.type) { case 'LEVEL_ROW': if (currentMapLevel) { currentMapLevel.push(levelRowItem) } else { currentMapLevel = [levelRowItem] } break case 'LEVEL_MESSAGE': if (currentMapLevel) { levels.push({type: 'LEVEL_MAP', cells: currentMapLevel.map(row => row.cells), _sourceOffset: currentMapLevel[0]._sourceOffset}) currentMapLevel = null } levels.push(levelRowItem) break case 'LEVEL_SEPARATOR': if (currentMapLevel) { levels.push({type: 'LEVEL_MAP', cells: currentMapLevel.map(row => row.cells), _sourceOffset: currentMapLevel[0]._sourceOffset}) currentMapLevel = null } break default: throw new Error(`BUG: Unsupported level row type "${levelRowItem.type}"`) } } // add the last level if (currentMapLevel) { levels.push({type: 'LEVEL_MAP', cells: currentMapLevel.map(row => row.cells), _sourceOffset: currentMapLevel[0]._sourceOffset}) currentMapLevel = null } return { title: title.value, metadata: metadata.value, sprites: sprites || [], legendItems: legendItems || [], sounds: sounds || [], collisionLayers: collisionLayers || [], rules: rules || [], winConditions: winConditions || [], levels: levels } } }, {"name": "_$ebnf$1", "symbols": []}, {"name": "_$ebnf$1$subexpression$1", "symbols": ["whitespaceChar"]}, {"name": "_$ebnf$1$subexpression$1", "symbols": ["multiLineComment"]}, {"name": "_$ebnf$1", "symbols": ["_$ebnf$1", "_$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "_", "symbols": ["_$ebnf$1"], "postprocess": toDebug('whitespace') || nuller}, {"name": "__$ebnf$1$subexpression$1", "symbols": ["whitespaceChar"]}, {"name": "__$ebnf$1$subexpression$1", "symbols": ["multiLineComment"]}, {"name": "__$ebnf$1", "symbols": ["__$ebnf$1$subexpression$1"]}, {"name": "__$ebnf$1$subexpression$2", "symbols": ["whitespaceChar"]}, {"name": "__$ebnf$1$subexpression$2", "symbols": ["multiLineComment"]}, {"name": "__$ebnf$1", "symbols": ["__$ebnf$1", "__$ebnf$1$subexpression$2"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "__", "symbols": ["__$ebnf$1"], "postprocess": toDebug('whitespace') || nuller}, {"name": "multiLineComment$ebnf$1", "symbols": []}, {"name": "multiLineComment$ebnf$1", "symbols": ["multiLineComment$ebnf$1", "textOrComment"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "multiLineComment", "symbols": [{"literal":"("}, "multiLineComment$ebnf$1", {"literal":")"}], "postprocess": toDebug('multiLineComment') || nuller}, {"name": "textOrComment", "symbols": ["multiLineComment"], "postprocess": nuller}, {"name": "textOrComment", "symbols": [/[^\(\)]/], "postprocess": nuller}, {"name": "whitespaceChar", "symbols": [{"literal":" "}]}, {"name": "whitespaceChar", "symbols": [{"literal":"\t"}]}, {"name": "newline", "symbols": [{"literal":"\n"}]}, {"name": "digit", "symbols": [/[0-9]/], "postprocess": id}, {"name": "hexDigit", "symbols": [/[0-9a-fA-F]/], "postprocess": id}, {"name": "letter", "symbols": [/[^\n \(\)]/], "postprocess": id}, {"name": "integer$ebnf$1", "symbols": ["digit"]}, {"name": "integer$ebnf$1", "symbols": ["integer$ebnf$1", "digit"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "integer", "symbols": ["integer$ebnf$1"], "postprocess": ([chars]) => parseInt(chars.join(''), 10)}, {"name": "word$ebnf$1", "symbols": [/[^\n \(]/]}, {"name": "word$ebnf$1", "symbols": ["word$ebnf$1", /[^\n \(]/], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "word", "symbols": ["word$ebnf$1"], "postprocess": toDebug('WORD') || concatChars}, {"name": "words$macrocall$2", "symbols": ["word"]}, {"name": "words$macrocall$3$ebnf$1", "symbols": ["whitespaceChar"]}, {"name": "words$macrocall$3$ebnf$1", "symbols": ["words$macrocall$3$ebnf$1", "whitespaceChar"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "words$macrocall$3", "symbols": ["words$macrocall$3$ebnf$1"]}, {"name": "words$macrocall$1$ebnf$1", "symbols": []}, {"name": "words$macrocall$1$ebnf$1$subexpression$1", "symbols": ["words$macrocall$3", "words$macrocall$2"]}, {"name": "words$macrocall$1$ebnf$1", "symbols": ["words$macrocall$1$ebnf$1", "words$macrocall$1$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "words$macrocall$1", "symbols": ["words$macrocall$2", "words$macrocall$1$ebnf$1"], "postprocess": toDebug('nonemptyListOf') || nonemptyListOf}, {"name": "words", "symbols": ["words$macrocall$1"], "postprocess": toDebug('WORDS') || function ([a]) { return extractFirst(a).join(' ') }}, {"name": "lineTerminator", "symbols": ["_", "newline"], "postprocess": toDebug('lineTerminator') || nuller}, {"name": "sourceCharacter", "symbols": [/[^\n ]/]}, {"name": "nonVarChar", "symbols": ["whitespaceChar"]}, {"name": "nonVarChar", "symbols": ["newline"]}, {"name": "nonVarChar", "symbols": [{"literal":"["}]}, {"name": "nonVarChar", "symbols": [{"literal":"]"}]}, {"name": "nonVarChar", "symbols": [{"literal":"("}]}, {"name": "nonVarChar", "symbols": [{"literal":")"}]}, {"name": "nonVarChar", "symbols": [{"literal":"|"}]}, {"name": "nonVarChar", "symbols": [{"literal":"."}]}, {"name": "decimal", "symbols": ["decimalWithLeadingNumber"]}, {"name": "decimal", "symbols": ["decimalWithLeadingPeriod"]}, {"name": "decimalWithLeadingNumber$ebnf$1", "symbols": ["digit"]}, {"name": "decimalWithLeadingNumber$ebnf$1", "symbols": ["decimalWithLeadingNumber$ebnf$1", "digit"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "decimalWithLeadingNumber$ebnf$2$subexpression$1$ebnf$1", "symbols": ["digit"]}, {"name": "decimalWithLeadingNumber$ebnf$2$subexpression$1$ebnf$1", "symbols": ["decimalWithLeadingNumber$ebnf$2$subexpression$1$ebnf$1", "digit"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "decimalWithLeadingNumber$ebnf$2$subexpression$1", "symbols": [{"literal":"."}, "decimalWithLeadingNumber$ebnf$2$subexpression$1$ebnf$1"]}, {"name": "decimalWithLeadingNumber$ebnf$2", "symbols": ["decimalWithLeadingNumber$ebnf$2$subexpression$1"], "postprocess": id}, {"name": "decimalWithLeadingNumber$ebnf$2", "symbols": [], "postprocess": () => null}, {"name": "decimalWithLeadingNumber", "symbols": ["decimalWithLeadingNumber$ebnf$1", "decimalWithLeadingNumber$ebnf$2"], "postprocess": ([firstDigit, rest]) => { if (rest) { return Number.parseFloat(`${firstDigit[0]}.${rest[1].join('')}`) } else { return Number.parseInt(firstDigit[0], 10) } } }, {"name": "decimalWithLeadingPeriod$ebnf$1", "symbols": ["digit"]}, {"name": "decimalWithLeadingPeriod$ebnf$1", "symbols": ["decimalWithLeadingPeriod$ebnf$1", "digit"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "decimalWithLeadingPeriod", "symbols": [{"literal":"."}, "decimalWithLeadingPeriod$ebnf$1"], "postprocess": ([_1, digits]) => { return Number.parseInt(digits.join(''), 10) }}, {"name": "colorHex8", "symbols": [{"literal":"#"}, "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit"], "postprocess": (a, _sourceOffset) => { return {type:ast.COLOR_TYPE.HEX8, value: a.join(''), _sourceOffset} }}, {"name": "colorHex6", "symbols": [{"literal":"#"}, "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit", "hexDigit"], "postprocess": (a, _sourceOffset) => { return {type:ast.COLOR_TYPE.HEX6, value: a.join(''), _sourceOffset} }}, {"name": "colorHex4", "symbols": [{"literal":"#"}, "hexDigit", "hexDigit", "hexDigit", "hexDigit"], "postprocess": ([hash, c1, c2, c3, c4], _sourceOffset) => { return {type:ast.COLOR_TYPE.HEX8, value: `#${c1}${c1}${c2}${c2}${c3}${c3}${c4}${c4}`, _sourceOffset} }}, {"name": "colorHex3", "symbols": [{"literal":"#"}, "hexDigit", "hexDigit", "hexDigit"], "postprocess": ([hash, c1, c2, c3], _sourceOffset) => { return {type:ast.COLOR_TYPE.HEX6, value: `#${c1}${c1}${c2}${c2}${c3}${c3}`, _sourceOffset} }}, {"name": "colorNameOrHex", "symbols": ["colorHex8"], "postprocess": id}, {"name": "colorNameOrHex", "symbols": ["colorHex6"], "postprocess": id}, {"name": "colorNameOrHex", "symbols": ["colorHex4"], "postprocess": id}, {"name": "colorNameOrHex", "symbols": ["colorHex3"], "postprocess": id}, {"name": "colorNameOrHex", "symbols": ["colorName"], "postprocess": id}, {"name": "colorName", "symbols": [/[^\n #\(0-9\.]/, "word"], "postprocess": toDebug('COLOR_NAME') || function ([first, rest], _sourceOffset) { return {type:ast.COLOR_TYPE.NAME, value: [first].concat(rest).join(''), _sourceOffset} }}, {"name": "legendVariableChar", "symbols": [/[^\n\ \=]/]}, {"name": "ruleVariableChar", "symbols": [/[^(?=\.\.\.)\n \=\[\]\|]/]}, {"name": "ruleVariableName$ebnf$1", "symbols": ["ruleVariableChar"]}, {"name": "ruleVariableName$ebnf$1", "symbols": ["ruleVariableName$ebnf$1", "ruleVariableChar"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "ruleVariableName", "symbols": ["ruleVariableName$ebnf$1"], "postprocess": concatChars}, {"name": "lookupRuleVariableName$ebnf$1", "symbols": [/[^\n \=\[\]\|]/]}, {"name": "lookupRuleVariableName$ebnf$1", "symbols": ["lookupRuleVariableName$ebnf$1", /[^\n \=\[\]\|]/], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "lookupRuleVariableName", "symbols": ["lookupRuleVariableName$ebnf$1"], "postprocess": ([a], offset, reject) => { const str = a.join('') if (TILE_MODIFIERS.has(str.toUpperCase())) { return reject } else { return str } } }, {"name": "collisionVariableChar", "symbols": [/[^(?=\.\.\.)\ \n\=\[\]\|\,]/]}, {"name": "collisionVariableName$ebnf$1", "symbols": ["collisionVariableChar"]}, {"name": "collisionVariableName$ebnf$1", "symbols": ["collisionVariableName$ebnf$1", "collisionVariableChar"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "collisionVariableName", "symbols": ["collisionVariableName$ebnf$1"], "postprocess": concatChars}, {"name": "lookupCollisionVariableName", "symbols": ["collisionVariableName"], "postprocess": id}, {"name": "t_DEBUGGER", "symbols": ["t_DEBUGGER_ADD"], "postprocess": id}, {"name": "t_DEBUGGER", "symbols": ["t_DEBUGGER_REMOVE"], "postprocess": id}, {"name": "t_DEBUGGER", "symbols": ["t_DEBUGGER_DEFAULT"], "postprocess": id}, {"name": "t_DEBUGGER_DEFAULT$subexpression$1", "symbols": [/[dD]/, /[eE]/, /[bB]/, /[uU]/, /[gG]/, /[gG]/, /[eE]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_DEBUGGER_DEFAULT", "symbols": ["t_DEBUGGER_DEFAULT$subexpression$1"], "postprocess": upperId}, {"name": "t_DEBUGGER_ADD$subexpression$1", "symbols": [/[dD]/, /[eE]/, /[bB]/, /[uU]/, /[gG]/, /[gG]/, /[eE]/, /[rR]/, {"literal":"_"}, /[aA]/, /[dD]/, /[dD]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_DEBUGGER_ADD", "symbols": ["t_DEBUGGER_ADD$subexpression$1"], "postprocess": upperId}, {"name": "t_DEBUGGER_REMOVE$subexpression$1", "symbols": [/[dD]/, /[eE]/, /[bB]/, /[uU]/, /[gG]/, /[gG]/, /[eE]/, /[rR]/, {"literal":"_"}, /[rR]/, /[eE]/, /[mM]/, /[oO]/, /[vV]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_DEBUGGER_REMOVE", "symbols": ["t_DEBUGGER_REMOVE$subexpression$1"], "postprocess": upperId}, {"name": "t_OBJECTS$subexpression$1", "symbols": [/[oO]/, /[bB]/, /[jJ]/, /[eE]/, /[cC]/, /[tT]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_OBJECTS", "symbols": ["t_OBJECTS$subexpression$1"], "postprocess": upperId}, {"name": "t_LEGEND$subexpression$1", "symbols": [/[lL]/, /[eE]/, /[gG]/, /[eE]/, /[nN]/, /[dD]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_LEGEND", "symbols": ["t_LEGEND$subexpression$1"], "postprocess": upperId}, {"name": "t_SOUNDS$subexpression$1", "symbols": [/[sS]/, /[oO]/, /[uU]/, /[nN]/, /[dD]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SOUNDS", "symbols": ["t_SOUNDS$subexpression$1"], "postprocess": upperId}, {"name": "t_COLLISIONLAYERS$subexpression$1", "symbols": [/[cC]/, /[oO]/, /[lL]/, /[lL]/, /[iI]/, /[sS]/, /[iI]/, /[oO]/, /[nN]/, /[lL]/, /[aA]/, /[yY]/, /[eE]/, /[rR]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_COLLISIONLAYERS", "symbols": ["t_COLLISIONLAYERS$subexpression$1"], "postprocess": upperId}, {"name": "t_RULES$subexpression$1", "symbols": [/[rR]/, /[uU]/, /[lL]/, /[eE]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RULES", "symbols": ["t_RULES$subexpression$1"], "postprocess": upperId}, {"name": "t_WINCONDITIONS$subexpression$1", "symbols": [/[wW]/, /[iI]/, /[nN]/, /[cC]/, /[oO]/, /[nN]/, /[dD]/, /[iI]/, /[tT]/, /[iI]/, /[oO]/, /[nN]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_WINCONDITIONS", "symbols": ["t_WINCONDITIONS$subexpression$1"], "postprocess": upperId}, {"name": "t_LEVELS$subexpression$1", "symbols": [/[lL]/, /[eE]/, /[vV]/, /[eE]/, /[lL]/, /[sS]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_LEVELS", "symbols": ["t_LEVELS$subexpression$1"], "postprocess": upperId}, {"name": "t_RIGID$subexpression$1", "symbols": [/[rR]/, /[iI]/, /[gG]/, /[iI]/, /[dD]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RIGID", "symbols": ["t_RIGID$subexpression$1"], "postprocess": upperId}, {"name": "t_LATE$subexpression$1", "symbols": [/[lL]/, /[aA]/, /[tT]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_LATE", "symbols": ["t_LATE$subexpression$1"], "postprocess": upperId}, {"name": "t_RANDOM$subexpression$1", "symbols": [/[rR]/, /[aA]/, /[nN]/, /[dD]/, /[oO]/, /[mM]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RANDOM", "symbols": ["t_RANDOM$subexpression$1"], "postprocess": upperId}, {"name": "t_RANDOMDIR$subexpression$1", "symbols": [/[rR]/, /[aA]/, /[nN]/, /[dD]/, /[oO]/, /[mM]/, /[dD]/, /[iI]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RANDOMDIR", "symbols": ["t_RANDOMDIR$subexpression$1"], "postprocess": upperId}, {"name": "t_ACTION$subexpression$1", "symbols": [/[aA]/, /[cC]/, /[tT]/, /[iI]/, /[oO]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ACTION", "symbols": ["t_ACTION$subexpression$1"], "postprocess": upperId}, {"name": "t_STARTLOOP$subexpression$1", "symbols": [/[sS]/, /[tT]/, /[aA]/, /[rR]/, /[tT]/, /[lL]/, /[oO]/, /[oO]/, /[pP]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_STARTLOOP", "symbols": ["t_STARTLOOP$subexpression$1"], "postprocess": upperId}, {"name": "t_ENDLOOP$subexpression$1", "symbols": [/[eE]/, /[nN]/, /[dD]/, /[lL]/, /[oO]/, /[oO]/, /[pP]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ENDLOOP", "symbols": ["t_ENDLOOP$subexpression$1"], "postprocess": upperId}, {"name": "t_UP$subexpression$1", "symbols": [/[uU]/, /[pP]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_UP", "symbols": ["t_UP$subexpression$1"], "postprocess": upperId}, {"name": "t_DOWN$subexpression$1", "symbols": [/[dD]/, /[oO]/, /[wW]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_DOWN", "symbols": ["t_DOWN$subexpression$1"], "postprocess": upperId}, {"name": "t_LEFT$subexpression$1", "symbols": [/[lL]/, /[eE]/, /[fF]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_LEFT", "symbols": ["t_LEFT$subexpression$1"], "postprocess": upperId}, {"name": "t_RIGHT$subexpression$1", "symbols": [/[rR]/, /[iI]/, /[gG]/, /[hH]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RIGHT", "symbols": ["t_RIGHT$subexpression$1"], "postprocess": upperId}, {"name": "t_ARROW_UP$subexpression$1", "symbols": [{"literal":"^"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ARROW_UP", "symbols": ["t_ARROW_UP$subexpression$1"], "postprocess": upperId}, {"name": "t_ARROW_DOWN$subexpression$1", "symbols": [/[vV]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ARROW_DOWN", "symbols": ["t_ARROW_DOWN$subexpression$1"], "postprocess": upperId}, {"name": "t_ARROW_LEFT$subexpression$1", "symbols": [{"literal":"<"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ARROW_LEFT", "symbols": ["t_ARROW_LEFT$subexpression$1"], "postprocess": upperId}, {"name": "t_ARROW_RIGHT$subexpression$1", "symbols": [{"literal":">"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ARROW_RIGHT", "symbols": ["t_ARROW_RIGHT$subexpression$1"], "postprocess": upperId}, {"name": "t_MOVING$subexpression$1", "symbols": [/[mM]/, /[oO]/, /[vV]/, /[iI]/, /[nN]/, /[gG]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_MOVING", "symbols": ["t_MOVING$subexpression$1"], "postprocess": upperId}, {"name": "t_ORTHOGONAL$subexpression$1", "symbols": [/[oO]/, /[rR]/, /[tT]/, /[hH]/, /[oO]/, /[gG]/, /[oO]/, /[nN]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ORTHOGONAL", "symbols": ["t_ORTHOGONAL$subexpression$1"], "postprocess": upperId}, {"name": "t_PERPENDICULAR$subexpression$1", "symbols": [/[pP]/, /[eE]/, /[rR]/, /[pP]/, /[eE]/, /[nN]/, /[dD]/, /[iI]/, /[cC]/, /[uU]/, /[lL]/, /[aA]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_PERPENDICULAR", "symbols": ["t_PERPENDICULAR$subexpression$1"], "postprocess": upperId}, {"name": "t_PARALLEL$subexpression$1", "symbols": [/[pP]/, /[aA]/, /[rR]/, /[aA]/, /[lL]/, /[lL]/, /[eE]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_PARALLEL", "symbols": ["t_PARALLEL$subexpression$1"], "postprocess": upperId}, {"name": "t_STATIONARY$subexpression$1", "symbols": [/[sS]/, /[tT]/, /[aA]/, /[tT]/, /[iI]/, /[oO]/, /[nN]/, /[aA]/, /[rR]/, /[yY]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_STATIONARY", "symbols": ["t_STATIONARY$subexpression$1"], "postprocess": upperId}, {"name": "t_HORIZONTAL$subexpression$1", "symbols": [/[hH]/, /[oO]/, /[rR]/, /[iI]/, /[zZ]/, /[oO]/, /[nN]/, /[tT]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_HORIZONTAL", "symbols": ["t_HORIZONTAL$subexpression$1"], "postprocess": upperId}, {"name": "t_VERTICAL$subexpression$1", "symbols": [/[vV]/, /[eE]/, /[rR]/, /[tT]/, /[iI]/, /[cC]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_VERTICAL", "symbols": ["t_VERTICAL$subexpression$1"], "postprocess": upperId}, {"name": "t_ARROW_ANY", "symbols": ["t_ARROW_UP"], "postprocess": upperId}, {"name": "t_ARROW_ANY", "symbols": ["t_ARROW_DOWN"], "postprocess": upperId}, {"name": "t_ARROW_ANY", "symbols": ["t_ARROW_LEFT"], "postprocess": upperId}, {"name": "t_ARROW_ANY", "symbols": ["t_ARROW_RIGHT"], "postprocess": upperId}, {"name": "t_AGAIN$subexpression$1", "symbols": [/[aA]/, /[gG]/, /[aA]/, /[iI]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_AGAIN", "symbols": ["t_AGAIN$subexpression$1"], "postprocess": upperId}, {"name": "t_CANCEL$subexpression$1", "symbols": [/[cC]/, /[aA]/, /[nN]/, /[cC]/, /[eE]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_CANCEL", "symbols": ["t_CANCEL$subexpression$1"], "postprocess": upperId}, {"name": "t_CHECKPOINT$subexpression$1", "symbols": [/[cC]/, /[hH]/, /[eE]/, /[cC]/, /[kK]/, /[pP]/, /[oO]/, /[iI]/, /[nN]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_CHECKPOINT", "symbols": ["t_CHECKPOINT$subexpression$1"], "postprocess": upperId}, {"name": "t_RESTART$subexpression$1", "symbols": [/[rR]/, /[eE]/, /[sS]/, /[tT]/, /[aA]/, /[rR]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RESTART", "symbols": ["t_RESTART$subexpression$1"], "postprocess": upperId}, {"name": "t_UNDO$subexpression$1", "symbols": [/[uU]/, /[nN]/, /[dD]/, /[oO]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_UNDO", "symbols": ["t_UNDO$subexpression$1"], "postprocess": upperId}, {"name": "t_WIN$subexpression$1", "symbols": [/[wW]/, /[iI]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_WIN", "symbols": ["t_WIN$subexpression$1"], "postprocess": upperId}, {"name": "t_MESSAGE$subexpression$1", "symbols": [/[mM]/, /[eE]/, /[sS]/, /[sS]/, /[aA]/, /[gG]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_MESSAGE", "symbols": ["t_MESSAGE$subexpression$1"], "postprocess": upperId}, {"name": "t_ELLIPSIS$subexpression$1", "symbols": [{"literal":"."}, {"literal":"."}, {"literal":"."}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ELLIPSIS", "symbols": ["t_ELLIPSIS$subexpression$1"], "postprocess": upperId}, {"name": "t_AND$subexpression$1", "symbols": [/[aA]/, /[nN]/, /[dD]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_AND", "symbols": ["t_AND$subexpression$1"], "postprocess": upperId}, {"name": "t_OR$subexpression$1", "symbols": [/[oO]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_OR", "symbols": ["t_OR$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX0$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"0"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX0", "symbols": ["t_SFX0$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX1$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"1"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX1", "symbols": ["t_SFX1$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX2$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"2"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX2", "symbols": ["t_SFX2$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX3$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"3"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX3", "symbols": ["t_SFX3$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX4$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"4"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX4", "symbols": ["t_SFX4$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX5$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"5"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX5", "symbols": ["t_SFX5$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX6$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"6"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX6", "symbols": ["t_SFX6$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX7$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"7"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX7", "symbols": ["t_SFX7$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX8$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"8"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX8", "symbols": ["t_SFX8$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX9$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"9"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX9", "symbols": ["t_SFX9$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX10$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"1"}, {"literal":"0"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX10", "symbols": ["t_SFX10$subexpression$1"], "postprocess": upperId}, {"name": "t_SFX_LETTERS$subexpression$1", "symbols": [/[sS]/, /[fF]/, /[xX]/, {"literal":"_"}], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SFX_LETTERS$ebnf$1", "symbols": ["letter"]}, {"name": "t_SFX_LETTERS$ebnf$1", "symbols": ["t_SFX_LETTERS$ebnf$1", "letter"], "postprocess": (d) => d[0].concat([d[1]])}, {"name": "t_SFX_LETTERS", "symbols": ["t_SFX_LETTERS$subexpression$1", "t_SFX_LETTERS$ebnf$1"], "postprocess": (a, _sourceOffset) => { return a.join('') }}, {"name": "t_SFX", "symbols": ["t_SFX_LETTERS"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX10"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX0"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX1"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX2"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX3"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX4"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX5"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX6"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX7"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX8"], "postprocess": upperId}, {"name": "t_SFX", "symbols": ["t_SFX9"], "postprocess": upperId}, {"name": "t_TITLE$subexpression$1", "symbols": [/[tT]/, /[iI]/, /[tT]/, /[lL]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_TITLE", "symbols": ["t_TITLE$subexpression$1"], "postprocess": upperId}, {"name": "t_AUTHOR$subexpression$1", "symbols": [/[aA]/, /[uU]/, /[tT]/, /[hH]/, /[oO]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_AUTHOR", "symbols": ["t_AUTHOR$subexpression$1"], "postprocess": upperId}, {"name": "t_HOMEPAGE$subexpression$1", "symbols": [/[hH]/, /[oO]/, /[mM]/, /[eE]/, /[pP]/, /[aA]/, /[gG]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_HOMEPAGE", "symbols": ["t_HOMEPAGE$subexpression$1"], "postprocess": upperId}, {"name": "t_YOUTUBE$subexpression$1", "symbols": [/[yY]/, /[oO]/, /[uU]/, /[tT]/, /[uU]/, /[bB]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_YOUTUBE", "symbols": ["t_YOUTUBE$subexpression$1"], "postprocess": upperId}, {"name": "t_ZOOMSCREEN$subexpression$1", "symbols": [/[zZ]/, /[oO]/, /[oO]/, /[mM]/, /[sS]/, /[cC]/, /[rR]/, /[eE]/, /[eE]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_ZOOMSCREEN", "symbols": ["t_ZOOMSCREEN$subexpression$1"], "postprocess": upperId}, {"name": "t_FLICKSCREEN$subexpression$1", "symbols": [/[fF]/, /[lL]/, /[iI]/, /[cC]/, /[kK]/, /[sS]/, /[cC]/, /[rR]/, /[eE]/, /[eE]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_FLICKSCREEN", "symbols": ["t_FLICKSCREEN$subexpression$1"], "postprocess": upperId}, {"name": "t_REQUIRE_PLAYER_MOVEMENT$subexpression$1", "symbols": [/[rR]/, /[eE]/, /[qQ]/, /[uU]/, /[iI]/, /[rR]/, /[eE]/, {"literal":"_"}, /[pP]/, /[lL]/, /[aA]/, /[yY]/, /[eE]/, /[rR]/, {"literal":"_"}, /[mM]/, /[oO]/, /[vV]/, /[eE]/, /[mM]/, /[eE]/, /[nN]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_REQUIRE_PLAYER_MOVEMENT", "symbols": ["t_REQUIRE_PLAYER_MOVEMENT$subexpression$1"], "postprocess": upperId}, {"name": "t_RUN_RULES_ON_LEVEL_START$subexpression$1", "symbols": [/[rR]/, /[uU]/, /[nN]/, {"literal":"_"}, /[rR]/, /[uU]/, /[lL]/, /[eE]/, /[sS]/, {"literal":"_"}, /[oO]/, /[nN]/, {"literal":"_"}, /[lL]/, /[eE]/, /[vV]/, /[eE]/, /[lL]/, {"literal":"_"}, /[sS]/, /[tT]/, /[aA]/, /[rR]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_RUN_RULES_ON_LEVEL_START", "symbols": ["t_RUN_RULES_ON_LEVEL_START$subexpression$1"], "postprocess": upperId}, {"name": "t_COLOR_PALETTE$subexpression$1", "symbols": [/[cC]/, /[oO]/, /[lL]/, /[oO]/, /[rR]/, {"literal":"_"}, /[pP]/, /[aA]/, /[lL]/, /[eE]/, /[tT]/, /[tT]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_COLOR_PALETTE", "symbols": ["t_COLOR_PALETTE$subexpression$1"], "postprocess": upperId}, {"name": "t_BACKGROUND_COLOR$subexpression$1", "symbols": [/[bB]/, /[aA]/, /[cC]/, /[kK]/, /[gG]/, /[rR]/, /[oO]/, /[uU]/, /[nN]/, /[dD]/, {"literal":"_"}, /[cC]/, /[oO]/, /[lL]/, /[oO]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_BACKGROUND_COLOR", "symbols": ["t_BACKGROUND_COLOR$subexpression$1"], "postprocess": upperId}, {"name": "t_TEXT_COLOR$subexpression$1", "symbols": [/[tT]/, /[eE]/, /[xX]/, /[tT]/, {"literal":"_"}, /[cC]/, /[oO]/, /[lL]/, /[oO]/, /[rR]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_TEXT_COLOR", "symbols": ["t_TEXT_COLOR$subexpression$1"], "postprocess": upperId}, {"name": "t_REALTIME_INTERVAL$subexpression$1", "symbols": [/[rR]/, /[eE]/, /[aA]/, /[lL]/, /[tT]/, /[iI]/, /[mM]/, /[eE]/, {"literal":"_"}, /[iI]/, /[nN]/, /[tT]/, /[eE]/, /[rR]/, /[vV]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_REALTIME_INTERVAL", "symbols": ["t_REALTIME_INTERVAL$subexpression$1"], "postprocess": upperId}, {"name": "t_KEY_REPEAT_INTERVAL$subexpression$1", "symbols": [/[kK]/, /[eE]/, /[yY]/, {"literal":"_"}, /[rR]/, /[eE]/, /[pP]/, /[eE]/, /[aA]/, /[tT]/, {"literal":"_"}, /[iI]/, /[nN]/, /[tT]/, /[eE]/, /[rR]/, /[vV]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_KEY_REPEAT_INTERVAL", "symbols": ["t_KEY_REPEAT_INTERVAL$subexpression$1"], "postprocess": upperId}, {"name": "t_AGAIN_INTERVAL$subexpression$1", "symbols": [/[aA]/, /[gG]/, /[aA]/, /[iI]/, /[nN]/, {"literal":"_"}, /[iI]/, /[nN]/, /[tT]/, /[eE]/, /[rR]/, /[vV]/, /[aA]/, /[lL]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_AGAIN_INTERVAL", "symbols": ["t_AGAIN_INTERVAL$subexpression$1"], "postprocess": upperId}, {"name": "t_NOACTION$subexpression$1", "symbols": [/[nN]/, /[oO]/, /[aA]/, /[cC]/, /[tT]/, /[iI]/, /[oO]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_NOACTION", "symbols": ["t_NOACTION$subexpression$1"], "postprocess": upperId}, {"name": "t_NOUNDO$subexpression$1", "symbols": [/[nN]/, /[oO]/, /[uU]/, /[nN]/, /[dD]/, /[oO]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_NOUNDO", "symbols": ["t_NOUNDO$subexpression$1"], "postprocess": upperId}, {"name": "t_NORESTART$subexpression$1", "symbols": [/[nN]/, /[oO]/, /[rR]/, /[eE]/, /[sS]/, /[tT]/, /[aA]/, /[rR]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_NORESTART", "symbols": ["t_NORESTART$subexpression$1"], "postprocess": upperId}, {"name": "t_THROTTLE_MOVEMENT$subexpression$1", "symbols": [/[tT]/, /[hH]/, /[rR]/, /[oO]/, /[tT]/, /[tT]/, /[lL]/, /[eE]/, {"literal":"_"}, /[mM]/, /[oO]/, /[vV]/, /[eE]/, /[mM]/, /[eE]/, /[nN]/, /[tT]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_THROTTLE_MOVEMENT", "symbols": ["t_THROTTLE_MOVEMENT$subexpression$1"], "postprocess": upperId}, {"name": "t_NOREPEAT_ACTION$subexpression$1", "symbols": [/[nN]/, /[oO]/, /[rR]/, /[eE]/, /[pP]/, /[eE]/, /[aA]/, /[tT]/, {"literal":"_"}, /[aA]/, /[cC]/, /[tT]/, /[iI]/, /[oO]/, /[nN]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_NOREPEAT_ACTION", "symbols": ["t_NOREPEAT_ACTION$subexpression$1"], "postprocess": upperId}, {"name": "t_SCANLINE$subexpression$1", "symbols": [/[sS]/, /[cC]/, /[aA]/, /[nN]/, /[lL]/, /[iI]/, /[nN]/, /[eE]/], "postprocess": function(d) {return d.join(""); }}, {"name": "t_SCANLINE", "symbols": ["t_SCANLINE$subexpression$1"], "postprocess": upperId}, {"name": "t_VERBOSE_LOGGIN