Documentation
¶
Overview ¶
Package parser is the top-level entry point: source bytes in, ast.Mod out. The package wires the lexer, the pegen runtime, and (eventually) the generated parser table into a single Parse / ParseString surface that mirrors CPython's _PyPegen_run_parser entry point.
Until the generated parser table lands the entry points return a sentinel error; callers can program against the stable shape today and the body will fill in once parser_gen ships.
CPython: Parser/peg_api.c
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrParserNotImplemented = fmt.Errorf("parser: generated rule bodies not yet emitted")
ErrParserNotImplemented is returned by Parse / ParseString while the generated parser table is offline. The lexer and error surfaces still work; downstream code should detect this sentinel and route through a fixture-driven path until the real parser lands.
Functions ¶
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package errors holds the SyntaxError text panel and the helpers that turn (parser, token, message) into a structured *SyntaxError.
|
Package errors holds the SyntaxError text panel and the helpers that turn (parser, token, message) into a structured *SyntaxError. |
|
Package lexer ports cpython/Parser/lexer/ and cpython/Parser/tokenizer/ to Go.
|
Package lexer ports cpython/Parser/lexer/ and cpython/Parser/tokenizer/ to Go. |
|
Package pegen ports the runtime half of cpython 3.14 Parser/pegen.c and pegen.h.
|
Package pegen ports the runtime half of cpython 3.14 Parser/pegen.c and pegen.h. |
|
Package string ports cpython/Parser/string_parser.c.
|
Package string ports cpython/Parser/string_parser.c. |