types

package
v0.0.0-...-d4b45ed Latest Latest
Warning

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

Go to latest
Published: May 3, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Look rune

Look is a Lookahead character

View Source
var ST map[rune]rune

ST is a Symbol Table

Functions

func Abort

func Abort(s string)

Abort Reports Error and Halts

func Add

func Add(t1 rune) rune

Add Recognizes and Translates an Add

func AddEntry

func AddEntry(n rune, t rune)

AddEntry Adds Entry to Table

func Alloc

func Alloc(n, t rune)

Alloc Allocates Storage for a Variable

func AllocVar

func AllocVar(n, t rune)

AllocVar Generates Code for Allocation of a Variable

func Assignment

func Assignment()

Assignment Parses and Translates an Assignment Statement

func Block

func Block()

Block Parses and Transaltes a Block of Statements

func CheckDup

func CheckDup(n rune)

CheckDup Checks for a Duplicate Variable Name

func Clear

func Clear()

Clear Clears the Primary Register Note this is not defined in Chapter 14, but assuming the same function as from Chapter 12

func Convert

func Convert(source, dest rune, reg string)

Convert Convers a Data Item from One Type to Another

func Decl

func Decl()

Decl Parses and Translates a Data Declaration

func Divide

func Divide(t1 rune) rune

Divide Recognizes and Translates a Divide

func DumpTable

func DumpTable()

DumpTable Dumps the Sybol Table

func Emit

func Emit(s string)

Emit Ouputs a String with Tab

func EmitLn

func EmitLn(s string)

EmitLn Ouputs a String with Tab and CRLF

func Error

func Error(s string)

Error Reports an Error

func Expected

func Expected(s string)

Expected Reports What Was Expected

func Expression

func Expression() (typ rune)

Expression Parses and Translates an Expression

func Factor

func Factor() (typ rune)

Factor Parses and Translates a Factor

func Fin

func Fin()

Fin Skips Over an End-of-Line

func GenAdd

func GenAdd(size rune)

GenAdd Adds Top of Stack to Primary

func GenDiv

func GenDiv()

GenDiv Divides Top of Stack by Primary

func GenLongDiv

func GenLongDiv()

GenLongDiv Divides Top of Stack by Primary

func GenLongMult

func GenLongMult()

GenLongMult Multiplies Top of Stack by Primary (Long)

func GenMult

func GenMult()

GenMult Multiplies Top of Stack by Primary (Word)

func GenSub

func GenSub(size rune)

GenSub Subtracts Primary from Top of Stack

func GetChar

func GetChar()

GetChar Reads New Character From Input Stream

func GetName

func GetName() (r rune)

GetName Gets an Identifier

func GetNum

func GetNum() (val int64)

GetNum Gets a Number

func Go

func Go()

Go starts the execution of this chapter

func InTable

func InTable(n rune) bool

InTable Reports if a Variable is in the Table

func Init

func Init()

Init Initializes

func IsAddOp

func IsAddOp(r rune) bool

IsAddOp Recognizes an AddOp

func IsAlNum

func IsAlNum(r rune) bool

IsAlNum Recognizes an Alphanumeric Character

func IsAlpha

func IsAlpha(r rune) bool

IsAlpha Recognizes an Alpha Character

func IsDigit

func IsDigit(r rune) bool

IsDigit Recognizes a Decimal Digit

func IsMulOp

func IsMulOp(r rune) bool

IsMulOp Recognizes a MulOp

func IsOrOp

func IsOrOp(r rune) bool

IsOrOp Recognizes a Boolean OrOp

func IsRelOp

func IsRelOp(r rune) bool

IsRelOp Recognizes a RelOp

func IsVarType

func IsVarType(r rune) bool

IsVarType Recognizes a Legal Variable Type

func IsWhite

func IsWhite(r rune) bool

IsWhite Recognizes White Space

func Load

func Load(name rune) rune

Load Loads a Variable to the Primary Register

func LoadConst

func LoadConst(n int64, typ rune)

LoadConst Loads a Constant to the Primary Register

func LoadNum

func LoadNum(n int64) rune

LoadNum Loads a Constant to the Primary Register

func LoadVar

func LoadVar(name, typ rune)

LoadVar Loads a Variable to Primary Register

func Match

func Match(x rune)

Match Matches a Specific Input Character

func Move

func Move(size rune, source, dest string)

Move Generates a Move Instruction

func Multiply

func Multiply(t1 rune) rune

Multiply Recognizes and Translates a Multiply

func Pop

func Pop(size rune)

Pop Pops Stack into Secondary Register

func PopAdd

func PopAdd(t1, t2 rune) rune

PopAdd Generates Code to Add Primary to the Stack

func PopDiv

func PopDiv(t1, t2 rune) rune

PopDiv Generates Code to Divide Stack by the Primary

func PopMul

func PopMul(t1, t2 rune) rune

PopMul Generates Code to Multiply Primary by Stack

func PopSub

func PopSub(t1, t2 rune) rune

PopSub Generates Code to Subtract Primary from the Stack

func Promote

func Promote(t1, t2 rune, reg string) (typ rune)

Promote Promotes the Size of a Register Value

func Push

func Push(size rune)

Push Pushes Primary onto Stack

func SameType

func SameType(t1, t2 rune) rune

SameType Forces both Arguments to Same Type

func SkipWhite

func SkipWhite()

SkipWhite Skips Over Leading White Space

func Store

func Store(name, t1 rune)

Store Stores a Variable from the Primary Register

func StoreVar

func StoreVar(name, typ rune)

StoreVar Stores Primary to Variable

func Subtract

func Subtract(t1 rune) rune

Subtract Recognizes and Translates a Subtract

func Term

func Term() (typ rune)

Term Parses and Translates a Math Term

func TopDecls

func TopDecls()

TopDecls Parses and Translates Global Declarations

func TypeOf

func TypeOf(n rune) rune

TypeOf Reports Type of a Variable

func UnOp

func UnOp() rune

UnOp Processes a Term with Leading Unary Operator

func VarType

func VarType(name rune) rune

VarType Gets a Variable Type from the Symbol Table

Types

This section is empty.

Jump to

Keyboard shortcuts

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