Registry / serialization / llparse-frontend

llparse-frontend

JSON →
library3.0.0jsnpmunverified

Frontend for the LLParse compiler, version 3.0.0. This package provides the parsing and AST generation logic for llparse, an LL(1) parser generator for Node.js and browsers. It is part of a larger ecosystem that includes llparse-backend and llparse-util. The library is written in TypeScript and ships type definitions. It is actively maintained but still considered WIP. Key differentiators: designed for performance and low memory footprint, suitable for building efficient parsers. Released under MIT License.

npm install llparse-frontend
INSTALL
IMPORT
SIG · LLPARSE-FRONTEND
L
llparse-frontend
serializationjavascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import llparseFrontend from 'llparse-frontend'
const llparseFrontend = require('llparse-frontend')
ESM-only since v3
Frontend
import { Frontend } from 'llparse-frontend'
import Frontend from 'llparse-frontend'
Named export for the Frontend class
Options
import type { Options } from 'llparse-frontend'
import { Options } from 'llparse-frontend'
Use type import for TypeScript interfaces to avoid runtime overhead

Create a Frontend instance, parse an arithmetic expression, and log the AST.

import { Frontend } from 'llparse-frontend'; const frontend = new Frontend(); const code = '1 + 2 * 3'; const ast = frontend.parse(code); console.log(ast);
Debug
Known issues
breakingESM-only since version 3.0.0. CommonJS require() will not work.
fix
Use ES module imports (import ... from 'llparse-frontend') or downgrade to v2.x.
affects: >=3.0.0
gotchaThe library is WIP and the API may change without major version bump before reaching 4.0.0.
fix
Pin to exact version and test upgrades thoroughly.
affects: >=3.0.0
gotchaTypeScript types are provided but may not be fully accurate; always check the actual runtime behavior.
fix
Verify types against runtime, especially for complex grammars.
affects: >=3.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() with ESM-only package.
fix
Use dynamic import() or switch to ES modules in your project.
TypeError: frontend.parse is not a function
Frontend class not properly instantiated or import error.
fix
Ensure you are using the named export Frontend: import { Frontend } from 'llparse-frontend';
SyntaxError: Unexpected token
Provided code string has invalid syntax for the parser.
fix
Check the syntax of the input code; ensure it matches the expected grammar.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
llparse-frontend — npm install llparse-frontend · libregistry