{
  "version": 3,
  "sources": ["../../../src/parser/lexer.ts"],
  "sourcesContent": [
    "/**\n * Lexer for tokenizing formula strings\n */\n\nimport type { FormulaError } from '../core/types.mjs';\n\n/**\n * Token types for formula lexing\n */\nexport type TokenType =\n  | 'NUMBER'\n  | 'STRING'\n  | 'BOOLEAN'\n  | 'IDENTIFIER'\n  | 'FUNCTION'\n  | 'OPERATOR'\n  | 'LPAREN'\n  | 'RPAREN'\n  | 'LBRACE'\n  | 'RBRACE'\n  | 'LBRACKET'\n  | 'RBRACKET'\n  | 'COMMA'\n  | 'SEMICOLON'\n  | 'COLON'\n  | 'DOLLAR'\n  | 'EXCLAMATION'\n  | 'AT'\n  | 'HASH'\n  | 'INFINITY'\n  | 'ERROR'\n  | 'EOF'\n  | 'WHITESPACE';\n\n/**\n * Token interface\n */\nexport interface Token {\n  type: TokenType;\n  value: string;\n  position: {\n    start: number;\n    end: number;\n  };\n}\n\n/**\n * Lexer class for tokenizing formula strings\n */\nexport class Lexer {\n  private input: string;\n  private position: number;\n  private tokens: Token[];\n  \n  constructor(input: string) {\n    this.input = input;\n    this.position = 0;\n    this.tokens = [];\n  }\n  \n  /**\n   * Tokenize the entire input string\n   */\n  tokenize(): Token[] {\n    this.tokens = [];\n    this.position = 0;\n    \n    while (this.position < this.input.length) {\n      const token = this.nextToken();\n      if (token && token.type !== 'WHITESPACE') {\n        this.tokens.push(token);\n      }\n    }\n    \n    // Add EOF token\n    this.tokens.push({\n      type: 'EOF',\n      value: '',\n      position: { start: this.position, end: this.position }\n    });\n    \n    return this.tokens;\n  }\n  \n  /**\n   * Get the next token from the input\n   */\n  private nextToken(): Token | null {\n    const start = this.position;\n    \n    // Check for single-character tokens\n    const char = this.input[this.position];\n    if (char === undefined) {\n      return null;\n    }\n    \n    // Skip whitespace\n    if (this.isWhitespace()) {\n      return this.readWhitespace();\n    }\n    \n    switch (char) {\n      case '(':\n        this.position++;\n        return { type: 'LPAREN', value: char, position: { start, end: this.position } };\n      case ')':\n        this.position++;\n        return { type: 'RPAREN', value: char, position: { start, end: this.position } };\n      case '{':\n        this.position++;\n        return { type: 'LBRACE', value: char, position: { start, end: this.position } };\n      case '}':\n        this.position++;\n        return { type: 'RBRACE', value: char, position: { start, end: this.position } };\n      case '[':\n        this.position++;\n        return { type: 'LBRACKET', value: char, position: { start, end: this.position } };\n      case ']':\n        this.position++;\n        return { type: 'RBRACKET', value: char, position: { start, end: this.position } };\n      case ',':\n        this.position++;\n        return { type: 'COMMA', value: char, position: { start, end: this.position } };\n      case ';':\n        this.position++;\n        return { type: 'SEMICOLON', value: char, position: { start, end: this.position } };\n      case ':':\n        this.position++;\n        return { type: 'COLON', value: char, position: { start, end: this.position } };\n      case '$':\n        this.position++;\n        return { type: 'DOLLAR', value: char, position: { start, end: this.position } };\n      case '!':\n        this.position++;\n        return { type: 'EXCLAMATION', value: char, position: { start, end: this.position } };\n      case '@':\n        this.position++;\n        return { type: 'AT', value: char, position: { start, end: this.position } };\n      case '\"':\n        return this.readString();\n      case \"'\":\n        return this.readSheetName();\n      case '#':\n        // Check if it's a table selector or an error\n        if (this.position + 1 < this.input.length) {\n          const nextChar = this.input[this.position + 1];\n          if (nextChar && this.isAlpha(nextChar)) {\n            // Might be a table selector (#Headers, #Data, etc.) or error\n            const lookahead = this.peekSelector();\n            if (lookahead) {\n              this.position++;\n              return { type: 'HASH', value: char, position: { start, end: this.position } };\n            }\n          }\n        }\n        return this.readError();\n      case '+':\n      case '-':\n        // Always treat as operator - parser will handle unary operators\n        this.position++;\n        return { type: 'OPERATOR', value: char, position: { start, end: this.position } };\n      case '*':\n      case '/':\n      case '^':\n      case '&':\n      case '%':\n        this.position++;\n        return { type: 'OPERATOR', value: char, position: { start, end: this.position } };\n      case '=':\n        this.position++;\n        return { type: 'OPERATOR', value: char, position: { start, end: this.position } };\n      case '<':\n        if (this.position + 1 < this.input.length && this.input[this.position + 1] === '>') {\n          this.position += 2;\n          return { type: 'OPERATOR', value: '<>', position: { start, end: this.position } };\n        }\n        if (this.position + 1 < this.input.length && this.input[this.position + 1] === '=') {\n          this.position += 2;\n          return { type: 'OPERATOR', value: '<=', position: { start, end: this.position } };\n        }\n        this.position++;\n        return { type: 'OPERATOR', value: char, position: { start, end: this.position } };\n      case '>':\n        if (this.position + 1 < this.input.length && this.input[this.position + 1] === '=') {\n          this.position += 2;\n          return { type: 'OPERATOR', value: '>=', position: { start, end: this.position } };\n        }\n        this.position++;\n        return { type: 'OPERATOR', value: char, position: { start, end: this.position } };\n    }\n    \n    // Check for numbers\n    if (char && this.isDigit(char)) {\n      return this.readNumber();\n    }\n    \n    // Check for decimal numbers starting with .\n    if (char === '.') {\n      const nextChar = this.input[this.position + 1];\n      if (this.position + 1 < this.input.length && nextChar !== undefined && this.isDigit(nextChar)) {\n        return this.readNumber();\n      }\n      // Otherwise it's an error\n      this.position++;\n      return { type: 'ERROR', value: char, position: { start, end: this.position } };\n    }\n    \n    // Check for identifiers (cell references, function names, boolean values)\n    if (char && (this.isAlpha(char) || char === '_' || this.isIdentifierChar(char))) {\n      return this.readIdentifier();\n    }\n    \n    // Unknown character\n    this.position++;\n    return { type: 'ERROR', value: char, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Read a whitespace token\n   */\n  private readWhitespace(): Token {\n    const start = this.position;\n    while (this.position < this.input.length && this.isWhitespace()) {\n      this.position++;\n    }\n    return {\n      type: 'WHITESPACE',\n      value: this.input.substring(start, this.position),\n      position: { start, end: this.position }\n    };\n  }\n  \n  /**\n   * Read a number token\n   */\n  private readNumber(): Token {\n    const start = this.position;\n    let hasDecimal = false;\n    let hasExponent = false;\n    \n    // Check for sign\n    let currentChar = this.input[this.position];\n    if (currentChar === '+' || currentChar === '-') {\n      this.position++;\n    }\n    \n    // Read integer part\n    while (this.position < this.input.length) {\n      currentChar = this.input[this.position];\n      if (currentChar && this.isDigit(currentChar)) {\n        this.position++;\n      } else {\n        break;\n      }\n    }\n    \n    // Read decimal part\n    if (this.position < this.input.length) {\n      currentChar = this.input[this.position];\n      if (currentChar === '.') {\n        hasDecimal = true;\n        this.position++;\n        while (this.position < this.input.length) {\n          currentChar = this.input[this.position];\n          if (currentChar && this.isDigit(currentChar)) {\n            this.position++;\n          } else {\n            break;\n          }\n        }\n      }\n    }\n    \n    // Read exponent part\n    if (this.position < this.input.length) {\n      currentChar = this.input[this.position];\n      if (currentChar === 'E' || currentChar === 'e') {\n        hasExponent = true;\n        this.position++;\n        \n        // Optional sign\n        if (this.position < this.input.length) {\n          currentChar = this.input[this.position];\n          if (currentChar === '+' || currentChar === '-') {\n            this.position++;\n          }\n        }\n        \n        // Exponent digits\n        while (this.position < this.input.length) {\n          currentChar = this.input[this.position];\n          if (currentChar && this.isDigit(currentChar)) {\n            this.position++;\n          } else {\n            break;\n          }\n        }\n      }\n    }\n    \n    const value = this.input.substring(start, this.position);\n    return { type: 'NUMBER', value, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Read a string token (enclosed in double quotes)\n   */\n  private readString(): Token {\n    const start = this.position;\n    this.position++; // Skip opening quote\n    \n    let value = '';\n    while (this.position < this.input.length) {\n      const char = this.input[this.position];\n      \n      if (char === '\"') {\n        // Check for escaped quote\n        if (this.position + 1 < this.input.length && this.input[this.position + 1] === '\"') {\n          value += '\"';\n          this.position += 2;\n        } else {\n          // End of string\n          this.position++;\n          break;\n        }\n      } else {\n        value += char;\n        this.position++;\n      }\n    }\n    \n    return { type: 'STRING', value, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Read a sheet name (enclosed in single quotes)\n   */\n  private readSheetName(): Token {\n    const start = this.position;\n    this.position++; // Skip opening quote\n    \n    let value = \"'\";\n    while (this.position < this.input.length) {\n      const char = this.input[this.position];\n      \n      if (char === \"'\") {\n        // Check for escaped quote\n        if (this.position + 1 < this.input.length && this.input[this.position + 1] === \"'\") {\n          value += \"''\";\n          this.position += 2;\n        } else {\n          // End of sheet name\n          value += char;\n          this.position++;\n          break;\n        }\n      } else {\n        value += char;\n        this.position++;\n      }\n    }\n    \n    // This is actually part of an identifier (sheet reference)\n    return { type: 'IDENTIFIER', value: value, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Read an error token (e.g., #DIV/0!)\n   */\n  private readError(): Token {\n    const start = this.position;\n    this.position++; // Skip #\n    \n    // Read until we hit a non-alphanumeric character or special error characters\n    while (this.position < this.input.length) {\n      const char = this.input[this.position];\n      if (char && (this.isAlnum(char) || char === '/' || char === '!' || char === '?')) {\n        this.position++;\n      } else {\n        break;\n      }\n    }\n    \n    const value = this.input.substring(start, this.position);\n    return { type: 'ERROR', value, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Read an identifier (cell reference, function name, boolean)\n   */\n  private readIdentifier(): Token {\n    const start = this.position;\n    \n    // Read identifier characters\n    while (this.position < this.input.length) {\n      const char = this.input[this.position];\n      if (char && (this.isAlnum(char) || char === '_' || char === '.' || this.isIdentifierChar(char))) {\n        this.position++;\n      } else {\n        break;\n      }\n    }\n    \n    const value = this.input.substring(start, this.position);\n    \n    // Check if it's followed by an opening parenthesis (function call)\n    let lookahead = this.position;\n    while (lookahead < this.input.length) {\n      const lookChar = this.input[lookahead];\n      if (lookChar && this.isWhitespaceChar(lookChar)) {\n        lookahead++;\n      } else {\n        break;\n      }\n    }\n    \n    if (lookahead < this.input.length) {\n      const lookChar = this.input[lookahead];\n      if (lookChar === '(') {\n        return { type: 'FUNCTION', value: value.toUpperCase(), position: { start, end: this.position } };\n      }\n    }\n    \n    // Check if it's a boolean (only if not a function)\n    if (value.toUpperCase() === 'TRUE' || value.toUpperCase() === 'FALSE') {\n      return { type: 'BOOLEAN', value: value.toUpperCase(), position: { start, end: this.position } };\n    }\n    \n    // Check if it's INFINITY\n    if (value.toUpperCase() === 'INFINITY') {\n      return { type: 'INFINITY', value: value.toUpperCase(), position: { start, end: this.position } };\n    }\n    \n    return { type: 'IDENTIFIER', value, position: { start, end: this.position } };\n  }\n  \n  /**\n   * Check if current position is whitespace\n   */\n  private isWhitespace(): boolean {\n    const char = this.input[this.position];\n    return this.position < this.input.length && char !== undefined && this.isWhitespaceChar(char);\n  }\n  \n  /**\n   * Check if a character is whitespace\n   */\n  private isWhitespaceChar(char: string): boolean {\n    return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n  }\n  \n  /**\n   * Check if a character is a digit\n   */\n  private isDigit(char: string): boolean {\n    return char >= '0' && char <= '9';\n  }\n  \n  /**\n   * Check if a character is alphabetic\n   */\n  private isAlpha(char: string): boolean {\n    // Basic ASCII letters\n    if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {\n      return true;\n    }\n    \n    // Unicode letter categories using regex\n    // This includes letters from all languages and special symbols like µ\n    return /\\p{L}/u.test(char);\n  }\n  \n  /**\n   * Check if a character is alphanumeric\n   */\n  private isAlnum(char: string): boolean {\n    return this.isAlpha(char) || this.isDigit(char);\n  }\n  \n  /**\n   * Check if a character can be part of an identifier\n   * This includes letters, certain symbols that are commonly used in column names\n   */\n  private isIdentifierChar(char: string): boolean {\n    // Check for specific Unicode symbols that are commonly used in column names\n    // We need to be very selective to avoid breaking operator parsing\n    // Include: µ (micro), ° (degree), currency symbols, Greek letters, and other common scientific symbols\n    // Exclude: mathematical operators like +, -, =, <, >, etc.\n    const code = char.charCodeAt(0);\n    \n    // µ (micro symbol)\n    if (code === 0x00B5) return true;\n    \n    // ° (degree symbol)\n    if (code === 0x00B0) return true;\n    \n    // Currency symbols (but not $ which is handled separately)\n    if (/\\p{Sc}/u.test(char) && char !== '$') return true;\n    \n    // Greek letters and other letter-like symbols that aren't basic ASCII\n    // This excludes mathematical operators\n    if (code > 127 && /\\p{L}/u.test(char)) return true;\n    \n    return false;\n  }\n  \n  /**\n   * Peek ahead to check if we have a table selector\n   */\n  private peekSelector(): boolean {\n    const selectors = ['All', 'Data', 'Headers', 'ThisRow'];\n    const currentPos = this.position + 1; // Skip the #\n    \n    for (const selector of selectors) {\n      if (this.input.substring(currentPos, currentPos + selector.length).toUpperCase() === selector.toUpperCase()) {\n        // Check that the next character is not alphanumeric (to avoid matching #DataSomething)\n        const nextPos = currentPos + selector.length;\n        if (nextPos >= this.input.length || !this.isAlnum(this.input[nextPos]!)) {\n          return true;\n        }\n      }\n    }\n    \n    return false;\n  }\n}\n\n/**\n * Quick tokenization function\n */\nexport function tokenize(input: string): Token[] {\n  const lexer = new Lexer(input);\n  return lexer.tokenize();\n}\n\n/**\n * Token stream for parser consumption\n */\nexport class TokenStream {\n  private tokens: Token[];\n  private position: number;\n  \n  constructor(tokens: Token[]) {\n    this.tokens = tokens;\n    this.position = 0;\n  }\n  \n  /**\n   * Peek at current token without consuming\n   */\n  peek(): Token {\n    if (this.position >= this.tokens.length || this.tokens.length === 0) {\n      // Return a default EOF token if no tokens\n      return { type: 'EOF', value: '', position: { start: 0, end: 0 } };\n    }\n    return this.tokens[this.position]!;\n  }\n  \n  /**\n   * Peek ahead by n tokens\n   */\n  peekAhead(n: number): Token | null {\n    const pos = this.position + n;\n    if (pos >= this.tokens.length || pos < 0) {\n      return null;\n    }\n    return this.tokens[pos] ?? null;\n  }\n  \n  /**\n   * Peek at the next token without consuming\n   */\n  peekNext(): Token | null {\n    const pos = this.position + 1;\n    if (pos >= this.tokens.length) {\n      return null;\n    }\n    return this.tokens[pos] ?? null;\n  }\n  \n  /**\n   * Consume current token and advance\n   */\n  consume(): Token {\n    const token = this.peek();\n    if (this.position < this.tokens.length - 1) {\n      this.position++;\n    }\n    return token;\n  }\n  \n  /**\n   * Check if current token matches type\n   */\n  match(type: TokenType): boolean {\n    return this.peek().type === type;\n  }\n  \n  /**\n   * Check if current token matches value\n   */\n  matchValue(value: string): boolean {\n    return this.peek().value === value;\n  }\n  \n  /**\n   * Consume token if it matches type\n   */\n  consumeIf(type: TokenType): Token | null {\n    if (this.match(type)) {\n      return this.consume();\n    }\n    return null;\n  }\n  \n  /**\n   * Check if at end of stream\n   */\n  isAtEnd(): boolean {\n    return this.peek().type === 'EOF';\n  }\n  \n  /**\n   * Get current position in stream\n   */\n  getPosition(): number {\n    return this.position;\n  }\n  \n  /**\n   * Set position in stream\n   */\n  setPosition(position: number): void {\n    this.position = Math.max(0, Math.min(position, this.tokens.length - 1));\n  }\n  \n  /**\n   * Get all tokens\n   */\n  getTokens(): Token[] {\n    return this.tokens;\n  }\n}\n"
  ],
  "mappings": ";AAiDO,MAAM,MAAM;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EAER,WAAW,CAAC,OAAe;AAAA,IACzB,KAAK,QAAQ;AAAA,IACb,KAAK,WAAW;AAAA,IAChB,KAAK,SAAS,CAAC;AAAA;AAAA,EAMjB,QAAQ,GAAY;AAAA,IAClB,KAAK,SAAS,CAAC;AAAA,IACf,KAAK,WAAW;AAAA,IAEhB,OAAO,KAAK,WAAW,KAAK,MAAM,QAAQ;AAAA,MACxC,MAAM,QAAQ,KAAK,UAAU;AAAA,MAC7B,IAAI,SAAS,MAAM,SAAS,cAAc;AAAA,QACxC,KAAK,OAAO,KAAK,KAAK;AAAA,MACxB;AAAA,IACF;AAAA,IAGA,KAAK,OAAO,KAAK;AAAA,MACf,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU,EAAE,OAAO,KAAK,UAAU,KAAK,KAAK,SAAS;AAAA,IACvD,CAAC;AAAA,IAED,OAAO,KAAK;AAAA;AAAA,EAMN,SAAS,GAAiB;AAAA,IAChC,MAAM,QAAQ,KAAK;AAAA,IAGnB,MAAM,OAAO,KAAK,MAAM,KAAK;AAAA,IAC7B,IAAI,SAAS,WAAW;AAAA,MACtB,OAAO;AAAA,IACT;AAAA,IAGA,IAAI,KAAK,aAAa,GAAG;AAAA,MACvB,OAAO,KAAK,eAAe;AAAA,IAC7B;AAAA,IAEA,QAAQ;AAAA,WACD;AAAA,QACH,KAAK;AAAA,QACL,OAAO,EAAE,MAAM,UAAU,OAAO,MAAM,UAAU,EAAE,OAAO,KAAK,KAAK,SAAS,EAAE;AAAA,WAC3E;AAAA,QACH,KAAK;AAAA,QACL,OAAO,EAAE,MAAM,UAAU,OAAO,MAAM,UAAU,EA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