A Multi-Package Go Repo Focused on Text Parsing, with Lexers, Parsers, and Related Utils
This repo aspires to be a useful toolset for creating hand-written lexers and parsers in Golang.
The modules within this repo are intended to work together, but are allowed to evolve separately.
The following packages are currently exported:
- github.com/tekwizely/go-parsing/lexer
- github.com/tekwizely/go-parsing/lexer/token
- github.com/tekwizely/go-parsing/parser
Base components of a lexical analyzer, enabling the creation of hand-written lexers for tokenizing textual content.
The tokenized data is suitable for processing with a parser.
Some Features of this Lexer:
- Rune-Centric
- Infinite Lookahead
- Mark / Reset Functionality
See go-parsing/lexer/examples/wordcount for an example program that utilizes the lexer.
Token-related types and interfaces used between the lexer and the parser.
Base components of a token analyzer, enabling the creation of hand-written parsers for generating Abstract Syntax Trees.
Some Features of this Parser:
- Infinite Lookahead
- Mark / Reset Functionality
See go-parsing/parser/examples/calc for an example program that utilizes the parser (and lexer).
The tekwizely/go-parsing
repo and all contained packages are released under the MIT License. See LICENSE
file.