Skip to content

A Multi-Package Go Repo Focused on Text Parsing, with Lexers, Parsers, and Related Utils

License

Notifications You must be signed in to change notification settings

TekWizely/go-parsing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-parsing GoDoc MIT license

A Multi-Package Go Repo Focused on Text Parsing, with Lexers, Parsers, and Related Utils

Goal

This repo aspires to be a useful toolset for creating hand-written lexers and parsers in Golang.

Multi-Module Repo

The modules within this repo are intended to work together, but are allowed to evolve separately.

Exported Modules

The following packages are currently exported:


lexer (github | godoc)

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

Example

See go-parsing/lexer/examples/wordcount for an example program that utilizes the lexer.


lexer / token ( github | godoc)

Token-related types and interfaces used between the lexer and the parser.


parser (github | godoc)

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

Example

See go-parsing/parser/examples/calc for an example program that utilizes the parser (and lexer).


License

The tekwizely/go-parsing repo and all contained packages are released under the MIT License. See LICENSE file.

About

A Multi-Package Go Repo Focused on Text Parsing, with Lexers, Parsers, and Related Utils

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages