calls

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 NumParams int

NumParams is the Number of Parameters

View Source
var Params map[rune]int

Params is a Table of Function Parameters

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 AddEntry

func AddEntry(name rune, t rune)

AddEntry Adds a New Entry to Symbol Table

func AddParam

func AddParam(name rune)

AddParam Adds a New Parameter to Table

func Alloc

func Alloc(n rune)

Alloc Allocates Storage for a Variable

func AssignOrProc

func AssignOrProc()

AssignOrProc Decides if a Statement is an Assignment or Procedure call

func Assignment

func Assignment(name rune)

Assignment Parses and Translates an Assignment Statement

func BeginBlock

func BeginBlock()

BeginBlock Parses and Translates a Begin-Block

func Call

func Call(name rune)

Call Generates code to Emit BSR instruction

func CallProc

func CallProc(name rune)

CallProc Processes a Procedure Call

func CheckVar

func CheckVar(name rune)

CheckVar Checks an Entry to Make Sure It's a Variable

func CleanStack

func CleanStack(n int)

CleanStack Adjusts the Stack Pointer Upwards by N bytes

func ClearParams

func ClearParams()

ClearParams Initializes Parameter Table to Null

func Decl

func Decl()

Decl Parses and Translates a Data Declaration

func DoBlock

func DoBlock()

DoBlock Parses and Translates a Block of Statements

func DoMain

func DoMain()

DoMain Parses and Translates a Main Program

func DoProc

func DoProc()

DoProc Parses and Translates a Procedure Declaration

func Duplicate

func Duplicate(n string)

Duplicate Reports a Duplicate Identifier

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 Epilog

func Epilog()

Epilog Writes the Epilog

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()

Expression Parses and Translates an Expression Vestigal Version

func Fin

func Fin()

Fin Skips Over an End-of-Line

func FormalList

func FormalList()

FormalList Processes the Formal Parameter List of a Procedure

func FormalParam

func FormalParam()

FormalParam Processes a Formal Parameter

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() (r rune)

GetNum Gets a Number

func Go

func Go()

Go starts the execution of this chapter

func InTable

func InTable(n rune) bool

InTable Looks for Symbol in 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 IsParam

func IsParam(n rune) bool

IsParam Sees if an Identifer is a Parameter

func IsRelOp

func IsRelOp(r rune) bool

IsRelOp Recognizes a RelOp

func IsWhite

func IsWhite(r rune) bool

IsWhite Recognizes White Space

func LoadParam

func LoadParam(n int)

LoadParam Loads a Parameter to the Primary Register

func LoadVar

func LoadVar(name rune)

LoadVar Loads a Variable to Primary Register

func Match

func Match(x rune)

Match Matches a Specific Input Character

func Param

func Param()

Param Processes an Actual Parameter

func ParamList

func ParamList() int

ParamList Processes the Parameter List for a Procedure Call

func ParamNumber

func ParamNumber(n rune) int

ParamNumber Finds the Parameter Number

func PostLabel

func PostLabel(l string)

PostLabel Posts a Label to Outputs

func ProcEpilog

func ProcEpilog()

ProcEpilog Writes the Epilog for a Procedure

func ProcProlog

func ProcProlog(n rune)

ProcProlog Writes the Prolog for a Procedure

func Prolog

func Prolog()

Prolog Writes the Prolog

func Push

func Push()

Push Pushes the Primary Register to the Stack

func Return

func Return()

Return Emits an RTS Instruction

func SkipWhite

func SkipWhite()

SkipWhite Skips Over Leading White Space

func StoreParam

func StoreParam(n int)

StoreParam Stores a Parameter from the Primary Register

func StoreVar

func StoreVar(name rune)

StoreVar Stores the Primary Register

func TopDecls

func TopDecls()

TopDecls Parses and Translates Global Declarations

func TypeOf

func TypeOf(n rune) rune

TypeOf Gets Type of Symbol

func Undefined

func Undefined(n string)

Undefined Reports an Undefined Identifier

Types

This section is empty.

Jump to

Keyboard shortcuts

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