Skip to content
forked from jmikkola/parsego

Parser-combinator in Go

License

Notifications You must be signed in to change notification settings

reflect/parsego

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status GoDoc Go Report Card MIT licensed

parsego

A simple, easy to use parser-combinator written in Golang.

Example usage:

package main

import "fmt"
import "github.com/jmikkola/parsego/parser"

func main() {
    p := parser.Sequence(
        parser.Digits(),
        parser.Maybe(
            parser.Sequence(
                parser.Char('.'),
                parser.Digits())))
    result, err := parser.ParseString(p, "1234.567")
    if err != nil {
        fmt.Println("failed to parse", err)
    } else {
        fmt.Println("parsed", result)
    }
}

See examples/ for more examples.

About

Parser-combinator in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.5%
  • Other 1.5%