Documentation ¶
Index ¶
- Constants
- Variables
- func Abort(s string)
- func Add()
- func AddEntry(n string, t rune)
- func Alloc()
- func Allocate(name string, val string)
- func Assignment()
- func Block()
- func BoolExpression()
- func BoolOr()
- func BoolTerm()
- func BoolXor()
- func Branch(l string)
- func BranchFalse(l string)
- func CheckDup(n string)
- func CheckIdent()
- func CheckTable(n string)
- func Clear()
- func CompareExpression()
- func Divide()
- func DoIf()
- func DoRead()
- func DoWhile()
- func DoWrite()
- func Duplicate(n string)
- func Emit(s string)
- func EmitLn(s string)
- func Epilog()
- func Equals()
- func Error(s string)
- func Expected(s string)
- func Expression()
- func Factor()
- func GetChar()
- func GetName()
- func GetNum()
- func GetOp()
- func Go()
- func Greater()
- func Header()
- func InTable(n string) bool
- func Init()
- func IsAddOp(r rune) bool
- func IsAlNum(r rune) bool
- func IsAlpha(r rune) bool
- func IsDigit(r rune) bool
- func IsMulOp(r rune) bool
- func IsOrOp(r rune) bool
- func IsRelOp(r rune) bool
- func IsWhite(r rune) bool
- func Less()
- func LessOrEqual()
- func LoadConst(n string)
- func LoadVar(name string)
- func Locate(n string) int
- func Lookup(table []string, s string, n int) int
- func MatchString(x string)
- func Multiply()
- func Negate()
- func NewLabel() (out string)
- func Next()
- func NextExpression()
- func NotEqual()
- func NotFactor()
- func NotIt()
- func PopAdd()
- func PopAnd()
- func PopCompare()
- func PopDiv()
- func PopMul()
- func PopOr()
- func PopSub()
- func PopXor()
- func PostLabel(l string)
- func Prolog()
- func Push()
- func ReadIt(name string)
- func ReadVar()
- func Relation()
- func Scan()
- func SetEqual()
- func SetGreater()
- func SetGreaterOrEqual()
- func SetLess()
- func SetLessOrEqual()
- func SetNEqual()
- func SkipWhite()
- func Store(name string)
- func Subtract()
- func Term()
- func TopDecls()
- func Undefined(n string)
- func WriteIt()
Constants ¶
const KWCode string = "xileweRWve"
KWCode is the Keyword Code
const MaxEntry = 100
MaxEntry is the number of Entries allowed in the Symbol Table
const NKW = 9
NKW is the Number of Keywords
const NKW1 = 10
NKW1 is the Number of Keywords + 1 (?)
Variables ¶
var KWList = []string{"IF", "ELSE", "ENDIF", "WHILE", "ENDWHILE", "READ",
"WRITE", "VAR", "END"}
KWList is the Keyword List
var LCount int
LCount is a Label Counter
var Look rune
Look is a Lookahead character
var NEntry int
NEntry is the Next Entry in the Symbol Table
var ST []string
ST is the Symbol Table
var SType []rune
SType is the Symbol Type Table
var Token rune
Token is an Encoded Token
var Value string
Value is an Unencoded Token
Functions ¶
func BoolExpression ¶
func BoolExpression()
BoolExpression Parses and Translates a Boolean Expression
func CheckDup ¶
func CheckDup(n string)
CheckDup Checks the Symbol Table for a Duplicate Identifier Reports an error if identifier is already in table.
func CheckIdent ¶
func CheckIdent()
CheckIdent Checks to Make Sure the Current Token is an Identifier
func CheckTable ¶
func CheckTable(n string)
CheckTable Checks to See if an Identifier is in the Symbol Table Reports an error if it's not.
func CompareExpression ¶
func CompareExpression()
CompareExpression Gets Another Expression and Compares
func LessOrEqual ¶
func LessOrEqual()
LessOrEqual Recognizes and Translates a Relational "Less Than or Equal"
Types ¶
This section is empty.