regexparser

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package parser provides a lisp parser.

expr   := '(' <expr>* ')' | <number> | <string> | <symbol>
number := /[+-]?[0-9]+/ <fraction>? <exponent>?
fraction := '.' /[0-9]+/
exponent := e /[0-9]+/
string := '"' <strcontent> '"'
strcontent := /[^"]+/ | '\' '"'
symbol := /[^[:space:]]+/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader() lisp.Reader

NewReader returns a lisp.Reader.

func Parse

func Parse(env *lisp.LEnv, print bool, text []byte) (bool, error)

Parse parses a lisp expression.

func ParseLVal

func ParseLVal(text []byte) ([]*lisp.LVal, int, error)

ParseLVal parses LVal values from text and returns them. The number of bytes read is returned along with any error that was encountered in parsing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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