pratt

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

pratt

The pratt command is a stripped-down expression parser based on the Pratt parser. To help understand Pratt parsing, the command also provides a naive, recursive, right-associative expression parser and a naive, iterative, left-associative expression parser.

Try it with:

go run ./main.go '1 + 2 * 3'

svg command

The svg command is meant to be used with the pratt command. It generates and opens an SVG image of the expression tree in the default SVG viewer.

Try it with:

go install ./...
pratt '1 * 2 + 3 * 4' | svg -o

Installation

You can install by using the following command.

go install github.com/gozeloglu/pratt@latest

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL