Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 1x 39x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const SPACE = /(?<SPACE>\s+|#.*|\/[*](?:.|\n)*?[*]\/)/; SPACE.skip = true;
const NUMBER = /(?<NUMBER>[-+]?\d+\.?\d*(?:[eE][-+]?\d+)?)/; NUMBER.value = x => Number(x);
const STRING = /(?<STRING>"(?:[^"\\]|\\.)*")/;
const WORD = /(?<WORD>[^\s(),"]+)/;
const LP = /(?<LP>\()/;
const RP = /(?<RP>\))/;
const COMMA = /(?<COMMA>,)/;
const ARRAY = /(?<ARRAY>\[)/;
/** Tokens object: definitions */
const tokens = [
SPACE,
NUMBER,
STRING,
WORD,
LP,
RP,
COMMA,
ARRAY,
];
const { nearleyLexer } = require("@ull-esit-pl-2324/lexer-generator-solution-esther-medina-quintero");
let lexer = nearleyLexer(tokens);
debugger;
module.exports = { lexer };
|