parsergen-starter
Version:
A complete parser generator starter with PEG.js, optional Moo lexer, and VS Code integration
79 lines (74 loc) โข 1.62 kB
text/typescript
// src/index.ts
// ============================================
// ๐ ParserGen Main API Surface (Public Entry)
// ============================================
// ๐ง Grammar Compilation
export {
compileGrammar,
type CompiledGrammar,
} from './grammar/index';
// ๐ค Lexer and Tokenization
export {
type LexerRule,
type LexerState,
type Preprocessor,
type PreprocessorContext,
type LanguageSpec,
type ContextRule,
type LexerPlugin,
type TokenContext,
type ErrorRecoveryConfig,
type SourceLocation,
LexerError,
type ProfileReport,
type TokenPattern,
type PatternRule,
type PatternMatch,
type LexerConfig,
type Token,
TokenStream,
LanguageDetector,
TokenTree,
UniversalLexer,
LanguageSpecBuilder,
LanguageRegistry,
TokenAnalyzer,
IndentationPlugin,
ErrorRecoveryStrategy,
LexerProfiler,
} from './lexer/index';
// ๐ฅ Parsing and Input Handling
export {
parseInput,
parseWithSemanticAnalysis,
parseMultiple,
parseStream,
parseWithTimeout,
validateSyntax,
parseWithAdvancedRecovery,
createParser,
ASTWalker,
ASTTransformer,
SymbolTable,
DiagnosticCollector,
LanguageServer,
REPL,
StreamingParser,
ParserUtils,
PerformanceParser,
ASTNodeFactory,
type ParseError,
type ParseResult,
type SourceMapGenerator
} from './parser/index';
// ๐งพ Utilities and AST Helpers
export {
formatError,
formatLocation,
createASTNode,
traverseAST,
highlightSnippet,
type ASTNode,
type Location,
type ErrorFormatter,
} from './utils/index';