Documentation
¶
Index ¶
- Constants
- Variables
- func Abort(s string)
- func Add()
- func AddEntry(n string, t rune)
- func Alloc(n string)
- func Assignment()
- func Block()
- func BoolExpression()
- func BoolOr()
- func BoolTerm()
- func BoolXor()
- func Branch(l string)
- func BranchFalse(l string)
- func Clear()
- func Decl()
- func Divide()
- func DoIf()
- func DoRead()
- func DoWhile()
- func DoWrite()
- 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 FirstFactor()
- func FirstTerm()
- func GetChar()
- func GetName()
- func GetNum() (val int)
- 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 int)
- func LoadVar(name string)
- func Locate(n string) int
- func Lookup(table []string, s string, n int) int
- func Main()
- func Match(x rune)
- func MatchString(x string)
- func Multiply()
- func NegFactor()
- func Negate()
- func NewLabel() (out string)
- func NewLine()
- 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 Prog()
- func Prolog()
- func Push()
- 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 Term1()
- func TopDecls()
- func Undefined(n string)
- func WriteVar()
Constants ¶
View Source
const KWCode string = "xileweRWvbep"
KWCode is the Keyword Code
View Source
const MaxEntry = 100
MaxEntry is the number of Entries allowed in the Symbol Table
View Source
const NKW = 11
NKW is the Number of Keywords
View Source
const NKW1 = 12
NKW1 is the Number of Keywords + 1 (?)
Variables ¶
View Source
var KWList = []string{"IF", "ELSE", "ENDIF", "WHILE", "ENDWHILE", "READ",
"WRITE", "VAR", "BEGIN", "END", "PROGRAM"}
KWList is the Keyword List
View Source
var LCount int
LCount is a Label Counter
View Source
var Look rune
Look is a Lookahead character
View Source
var NEntry int
NEntry is the Next Entry in the Symbol Table
View Source
var ST []string
ST is the Symbol Table
View Source
var SType []rune
SType is the Symbol Type Table
View Source
var Token rune
Token is an Encoded Token
View Source
var Value string
Value is an Unencoded Token
Functions ¶
func BoolExpression ¶
func BoolExpression()
BoolExpression Parses and Translates a Boolean Expression
func LessOrEqual ¶
func LessOrEqual()
LessOrEqual Recognizes and Translates a Relational "Less Than or Equal"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.