Index

Interfaces

Type aliases

Variables

Functions

Type aliases

NearleySymbol

NearleySymbol: string | object | object

Variables

Lexer

Lexer: Lexer | undefined = undefined

ParserRules

ParserRules: NearleyRule[] = [{"name": "BracketExpr", "symbols": [{"literal":"<"}, "Modifier", "ModKey", {"literal":">"}], "postprocess": bexpr=>bexpr.slice(1,-1)},{"name": "BracketExpr", "symbols": [{"literal":"<"}, "Key", {"literal":">"}], "postprocess": bexpr=>[{}].concat(bexpr.slice(1,-1))},{"name": "Modifier$ebnf$1", "symbols": [/[acmsACMS]/], "postprocess": id},{"name": "Modifier$ebnf$1", "symbols": [], "postprocess": () => null},{"name": "Modifier$ebnf$2", "symbols": [/[acmsACMS]/], "postprocess": id},{"name": "Modifier$ebnf$2", "symbols": [], "postprocess": () => null},{"name": "Modifier$ebnf$3", "symbols": [/[acmsACMS]/], "postprocess": id},{"name": "Modifier$ebnf$3", "symbols": [], "postprocess": () => null},{"name": "Modifier$ebnf$4", "symbols": [/[acmsACMS]/], "postprocess": id},{"name": "Modifier$ebnf$4", "symbols": [], "postprocess": () => null},{"name": "Modifier", "symbols": ["Modifier$ebnf$1", "Modifier$ebnf$2", "Modifier$ebnf$3", "Modifier$ebnf$4", {"literal":"-"}], "postprocess":/** For each modifier present,add its long name as an attribute set to true to an object */(mods, _, reject) => {const longNames = new Map([["A", "altKey"],["C", "ctrlKey"],["M", "metaKey"],["S", "shiftKey"],])let modifiersObj = {}for (let mod of mods) {if (mod === null || mod === "-") continuelet longName = longNames.get(mod.toUpperCase())if (longName) {// Reject if the same name is used twice.if (longName in modifiersObj) return rejectelse modifiersObj[longName] = true}}return modifiersObj}},{"name": "ModKey", "symbols": [{"literal":"<"}], "postprocess": id},{"name": "ModKey", "symbols": [{"literal":">"}], "postprocess": id},{"name": "ModKey", "symbols": [{"literal":"-"}], "postprocess": id},{"name": "ModKey", "symbols": ["Key"], "postprocess": id},{"name": "Key$ebnf$1", "symbols": [/[^\s<>-]/]},{"name": "Key$ebnf$1", "symbols": ["Key$ebnf$1", /[^\s<>-]/], "postprocess": (d) => d[0].concat([d[1]])},{"name": "Key", "symbols": ["Key$ebnf$1"], "postprocess": (key)=>key[0].join("")}]

ParserStart

ParserStart: string = "BracketExpr"

Functions

id

  • id(d: any[]): any
  • Parameters

    • d: any[]

    Returns any