og

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInterpreter

func RunInterpreter(compiler *OgCompiler)

Types

type ErrorHandler

type ErrorHandler struct {
	*antlr.DefaultErrorStrategy
}

func NewErrorHandler

func NewErrorHandler() *ErrorHandler

func (ErrorHandler) Recover

func (this ErrorHandler) Recover(p antlr.Parser, r antlr.RecognitionException)

type ErrorListener

type ErrorListener struct {
	*antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

func NewErrorListener

func NewErrorListener(filePath, source string) *ErrorListener

func (*ErrorListener) SyntaxError

func (this *ErrorListener) SyntaxError(rec antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

type Og

type Og struct {
	Config   *common.OgConfig
	Compiler *OgCompiler
}

func NewOg

func NewOg(config *common.OgConfig) *Og

func (Og) Build

func (this Og) Build() error

func (Og) Run

func (this Og) Run() error

func (Og) RunBinary

func (this Og) RunBinary() error

type OgCompiler

type OgCompiler struct {
	Config  *common.OgConfig
	Parser  *OgParser
	Preproc *OgPreproc
	Files   []*common.File
}

func NewOgCompiler

func NewOgCompiler(config *common.OgConfig) *OgCompiler

func (*OgCompiler) Compile

func (this *OgCompiler) Compile() error

func (*OgCompiler) ParseFile

func (this *OgCompiler) ParseFile(file *common.File) error

type OgParser

type OgParser struct {
	Config *common.OgConfig
}

func NewOgParser

func NewOgParser(config *common.OgConfig) *OgParser

func (*OgParser) Parse

func (this *OgParser) Parse(file *common.File) error

func (*OgParser) ParseInterpret

func (this *OgParser) ParseInterpret(file *common.File) error

func (*OgParser) ParseStmt

func (this *OgParser) ParseStmt(file *common.File) error

type OgPreproc

type OgPreproc struct {
}

func NewOgPreproc

func NewOgPreproc() *OgPreproc

func (*OgPreproc) Run

func (this *OgPreproc) Run(file *common.File)

type Pool

type Pool struct {
	Size     int
	Workers  []*Worker
	Total    int
	Finished int
	In       chan *common.File
	Out      chan error
}

func NewPool

func NewPool(size int, nbJobs int, cb WorkerCallback) *Pool

func (Pool) Print

func (this Pool) Print()

func (*Pool) Queue

func (this *Pool) Queue(job *common.File)

func (*Pool) Run

func (this *Pool) Run() error

type Worker

type Worker struct {
	In         chan *common.File
	Out        chan error
	Processing *common.File
	Job        WorkerCallback
}

func NewWorker

func NewWorker(i chan *common.File, out chan error, job WorkerCallback) *Worker

func (*Worker) Run

func (this *Worker) Run()

type WorkerCallback

type WorkerCallback (func(*common.File) error)

Jump to

Keyboard shortcuts

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