basparser

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset

func Reset()

Types

type InputLex

type InputLex struct {
	// contains filtered or unexported fields
}

func NewInputLex

func NewInputLex(input io.ByteScanner, debug bool) *InputLex

func (*InputLex) Error

func (l *InputLex) Error(s string)

func (*InputLex) Errors

func (l *InputLex) Errors() int

func (*InputLex) Lex

func (l *InputLex) Lex(lval *InputSymType) int

func (*InputLex) Reduced

func (l *InputLex) Reduced(rule, state int, lval *InputSymType) (stop bool)

Reduced is hook for recording a reduction. https://godoc.org/modernc.org/goyacc Optionally the argument to yyParse may implement the following interface: Reduced(rule, state int, lval *yySymType) (stop bool) // Client should copy *lval.

type ParserResult

type ParserResult struct {
	Root           []node.Node
	LineNumbers    map[string]node.LineNumber // used by GOTO GOSUB etc
	LibReadData    bool
	LibGosubReturn bool
	LibMath        bool
	Baslib         bool
	ForStack       []*node.NodeFor
	WhileStack     []*node.NodeWhile
	CountFor       int
	CountNext      int
	ArrayTable     map[string]node.ArraySymbol
	CountGosub     int
	CountReturn    int
	CountWhile     int
	CountWend      int
	CountIf        int
	FuncTable      map[string]node.FuncSymbol
	Imports        map[string]struct{}
	Declarations   []string
	RestoreTable   map[string]int
	DataOffset     int
	TypeTable      []int
	Graphics       bool
}
var (
	//Result = newResult()
	Result ParserResult
)

parser auxiliary variables

func Run

func Run(label string, input io.Reader) (ParserResult, int, int)

Jump to

Keyboard shortcuts

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