Microsoft Small Basic

Program Listing: MBW599
' Small Basic Graphics Interpriter 0.3
' Copyright (c) 2012 Nonki Takahashi. All rights reseved.
'
' History :
' 0.31 2012/09/02 Added interpriter code.
' 0.3 2012/09/01 21:10:40 Code generated by Small Basic Compiler Compiler 0.3
'
title = "Small Basic Graphics Interpriter 0.3"
traceC = "False" ' trace call
traceX = "False" ' trace execution
debug = "False" ' debug
TextWindow.Title = title
GraphicsWindow.Left = 0
TextWindow.Left = Desktop.Width - 680
Lex_Init()
TextWindow.WriteLine("Enter statements (Graphics operations) below.")
TextWindow.WriteLine("")
While "True"
buf = TextWindow.Read()
TextWindow.ForegroundColor = "Green"
len = Text.GetLength(buf)
ptr = 1
Parse_State()
If ptr <= len Then
TextWindow.WriteLine("Syntax Error")
EndIf
If debug Then
Dump()
EndIf
TextWindow.ForegroundColor = "Gray"
EndWhile

Sub Dump
TextWindow.WriteLine("var -----")
TextWindow.WriteLine(var)
TextWindow.WriteLine("buf -----")
TextWindow.WriteLine(buf)
TextWindow.WriteLine("-----")
EndSub

Sub Lex_Init
UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LOWER = "abcdefghijklmnopqrstuvwxyz"
DIGIT = "0123456789"
FCHAR = UPPER + LOWER ' first charcters for label/variable/sub
TCHAR = FCHAR + DIGIT + "_" ' trailing characters for label/variable/sub
WQ = Text.GetCharacter(34) ' double quote
SQ = "'" ' single quote
CRLF = Text.GetCharacter(13) + Text.GetCharacter(10) ' carriage return + line feed
EndSub

Sub Lex_Label
' param buf - buffer
' param ptr - pointer
' return match - "True" if match
' return ptr - next pointer
' return label[] - label name array
' return val - label name
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Lex_Name()
If match And (Array.ContainsValue(label, val) = "False") Then
nLabel = nLabel + 1
label[nLabel] = val
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Lex_Name
' param buf - buffer
' param ptr - pointer
' return match - "True" if match
' return ptr - next pointer
' return name - name
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
ch = Text.GetSubText(buf, ptr, 1)
If Text.GetIndexOf(FCHAR, ch) > 0 Then
name = ch
ptr = ptr + 1
match = "True"
While match
ch = Text.GetSubText(buf, ptr, 1)
If Text.GetIndexOf(TCHAR, ch) > 0 Then
ptr = ptr + 1
name = name + ch
Else
match = "False"
EndIf
EndWhile
match = "True"
Else
name = ""
match = "False"
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Lex_Num
' param buf - buffer
' param ptr - pointer
' return match - "True"
' return ptr - next pointer
' return val - number
ch = Text.GetSubText(buf, ptr, 1)
If Text.GetIndexOf(DIGIT, ch) > 0 Then
val = ch
ptr = ptr + 1
match = "True"
While match
ch = Text.GetSubText(buf, ptr, 1)
If Text.GetIndexOf(DIGIT, ch) > 0 Then
ptr = ptr + 1
val = Text.Append(val, ch)
Else
match = "False"
EndIf
EndWhile
match = "True"
Else
val = ""
match = "False"
EndIf
EndSub

Sub Lex_Space0
' param buf - buffer
' param ptr - pointer
' return match - "True"
' return ptr - next pointer
txt = " "
match = "True"
While match
Lex_Text()
EndWhile
match = "True"
EndSub

Sub Lex_Space1
' param buf - buffer
' param ptr - pointer
' return match - "True"
' return ptr - next pointer
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = " "
Lex_Text()
If match Then
While match
Lex_Text()
EndWhile
match = "True"
Else
TextWindow.WriteLine("Syntax Error: space not found")
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Lex_Str
' param buf - buffer
' param ptr - pointer
' return match - "True"
' return ptr - next pointer
' return val - string
val = ""
Stack.PushValue("local", ptr)
txt = WQ
Lex_Text()
If match Then
ch = Text.GetSubText(buf, ptr, 1)
While ch <> WQ
val = val + ch
ptr = ptr + 1
ch = Text.GetSubText(buf, ptr, 1)
EndWhile
EndIf
If match Then
txt = WQ
Lex_Text()
EndIf
_ptr = Stack.PopValue("local")
If match = "False" Then
ptr = _ptr
EndIf
EndSub

Sub Lex_Text
' param buf - buffer
' param ptr - pointer
' param txt - text to lexical analysis
' return match - "True" if match
' return ptr - next pointer
If traceC Then
If txt = CRLF Then
_txt = "CRLF"
ElseIf txt = WQ Then
_txt = SQ + txt + SQ
Else
_txt = WQ + txt + WQ
EndIf
TextWindow.WriteLine(" " + ptr)
EndIf
txtlen = Text.GetLength(txt)
lotxt = Text.ConvertToLowerCase(txt)
lobuf = Text.ConvertToLowerCase(Text.GetSubText(buf, ptr, txtlen))
If lobuf = lotxt Then
match = "True"
ptr = ptr + txtlen
Else
match = "False"
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Lex_Var
' param buf - buffer
' param ptr - pointer
' return match - "True" if match
' return ptr - next pointer
' return var[] - variable name array
' return name - variable name
' return val - variable
Lex_Name()
If match Then
If Array.ContainsIndex(var, name) Then
val = var[name]
If val = "N/A" Then
val = ""
EndIf
Else
var[name] = "N/A"
val = ""
EndIf
EndIf
EndSub

' 2012/09/01 17:38:04 Code generated.
' by Small Basic Compiler Compiler 0.2

Sub Parse_Real
' real ::=
' [-]<_num>[.<_num>]
' return val - real ' 0.31
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "-"
Lex_Text()
If match Then ' 0.31
sign = "-" ' 0.31
Else ' 0.31
sign = "" ' 0.31
EndIf ' 0.31
match = "True"
If match Then
Lex_Num()
int = val ' 0.31
EndIf
If match Then
Stack.PushValue("ptr",ptr)
txt = "."
Lex_Text()
If match Then
Lex_Num()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then ' 0.31
frac = "." + val ' 0.31
Else ' 0.31
frac = "" ' 0.31
EndIf ' 0.31
match = "True"
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
val = sign + Text.Append(int, frac)
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

' 2012/08/31 14:51:32 Code generated.
' by Small Basic Compiler Compiler 0.1

Sub Parse_State
' state ::=
' []{||[]}[][_SQ*] ' 0.31
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
Lex_Space0()
If match Then
Parse_Ope() ' 0.31
If match = "False" Then
Parse_Let() ' 0.31
EndIf
If match = "False" Then
Lex_Space0()
EndIf
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Stack.PushValue("ptr",ptr)
txt = SQ ' 0.31
Lex_Text()
If match Then
_ptr = Text.GetIndexOf(buf, CRLF) ' 0.31
If _ptr = 0 Then
_ptr = len + 1
EndIf
ptr = _ptr
match = "True"
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
match = "True"
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Let
' let ::=
' {|<_var>}[]=[]
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
Parse_Prop() ' 0.31
If match Then ' 0.31
left = "prop" ' 0.31
EndIf '
If match = "False" Then
Lex_Var() ' 0.31
If match Then ' 0.31
left = "var" ' 0.31
varname = name ' 0.31
EndIf '
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = "="
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Expr() ' 0.31
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then '
If left = "prop" Then ' 0.31
If prop = "bg" Then ' 0.31
GraphicsWindow.BackgroundColor = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.BackgroundColor=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "bc" Then ' 0.31
GraphicsWindow.BrushColor = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.BrushColor=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "fb" Then ' 0.31
GraphicsWindow.FontBold = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.FontBold=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "fi" Then ' 0.31
GraphicsWindow.FontItalic = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.FontItalic=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "fn" Then ' 0.31
GraphicsWindow.FontName = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.FontName=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "fs" Then ' 0.31
GraphicsWindow.FontBold = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.FontSize=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "hi" Then ' 0.31
GraphicsWindow.Height = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.Height=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "le" Then ' 0.31
GraphicsWindow.Left = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.Left=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "pc" Then ' 0.31
GraphicsWindow.PenColor = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.PenColor=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "pw" Then ' 0.31
GraphicsWindow.PenWidth = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.PenWidth=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "ti" Then ' 0.31
GraphicsWindow.Title = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.Title=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "to" Then ' 0.31
GraphicsWindow.Top = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.Top=" + val) ' 0.31
EndIf ' 0.31
ElseIf prop = "wi" Then ' 0.31
GraphicsWindow.Width = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! GraphicsWindow.Width=" + val) ' 0.31
EndIf ' 0.31
EndIf ' 0.31
ElseIf left = "var" Then ' 0.31
var[varname] = val ' 0.31
If traceX Then ' 0.31
TextWindow.WriteLine("! " + varname + "=" + val) ' 0.31
EndIf ' 0.31
EndIf ' 0.31
EndIf ' 0.31
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Expr
' expr ::=
' [[]{+|-}[]]
' return val - value of expression
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
Parse_Term()
term = val ' 0.31
If match Then
Stack.PushValue("ptr",ptr)
Lex_Space0()
If match Then
txt = "+"
Lex_Text()
If match Then ' 0.31
op = "+" ' 0.31
EndIf ' 0.31
If match = "False" Then
txt = "-"
Lex_Text()
If match Then ' 0.31
op = "-" ' 0.31
EndIf ' 0.31
EndIf
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Stack.PushValue("local", term) ' 0.31
Parse_Term() ' 0.31
term = Stack.PopValue("local") ' 0.31
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then ' 0.31
If op = "+" Then ' 0.31
term = term + val ' 0.31
ElseIf op = "-" Then ' 0.31
term = term - val ' 0.31
EndIf ' 0.31
EndIf ' 0.31
match = "True"
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then ' 0.31
val = term ' 0.31
EndIf ' 0.31
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Term
' term ::=
' [[]{'*'|/}[]]
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
Parse_Factor()
factor = val ' 0.31
If match Then
Stack.PushValue("ptr",ptr)
Lex_Space0()
If match Then
txt = "*"
Lex_Text()
If match Then ' 0.31
op = "*" ' 0.31
EndIf ' 0.31
If match = "False" Then
txt = "/"
Lex_Text()
If match Then ' 0.31
op = "/" ' 0.31
EndIf ' 0.31
EndIf
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Stack.PushValue("local", factor) ' 0.31
Parse_Factor() ' 0.31
factor = Stack.PopValue("local") ' 0.31
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then ' 0.31
If op = "*" Then ' 0.31
factor = factor * val ' 0.31
ElseIf op = "/" Then ' 0.31
factor = factor / val ' 0.31
EndIf ' 0.31
EndIf
match = "True"
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then ' 0.31
val = factor ' 0.31
EndIf ' 0.31
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

' 2012/09/01 22:43:48 Code generated.
' by Small Basic Compiler Compiler 0.3

Sub Parse_Factor
' factor ::=
' {|([][])}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_Val()
val1 = val
If match = "False" Then
Stack.PushValue("ptr",ptr)
txt = "("
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Term()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Val
' val ::=
' {|||<_var>}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_Literal() ' 0.31
If match = "False" Then
Parse_Prop() ' 0.31
EndIf
If match = "False" Then
Parse_Ope() ' 0.31
EndIf
If match = "False" Then
Lex_Var() ' 0.31
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Literal
' literal ::=
' {|<_str>}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_Real() ' 0.31
If match = "False" Then
Lex_Str() ' 0.31
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Ope
' ope ::=
' {|}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_VoidOpe() ' 0.31
If match = "False" Then
Parse_ValOpe() ' 0.31
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_VoidOpe
' voidOpe ::=
' {||||||||||||||}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_Clear() ' 0.31
If match = "False" Then
Parse_DBText() ' 0.31
EndIf
If match = "False" Then
Parse_DEll() ' 0.31
EndIf
If match = "False" Then
Parse_DIma() ' 0.31
EndIf
If match = "False" Then
Parse_DLine() ' 0.31
EndIf
If match = "False" Then
Parse_DRect() ' 0.31
EndIf
If match = "False" Then
Parse_DRIma() ' 0.31
EndIf
If match = "False" Then
Parse_DText() ' 0.31
EndIf
If match = "False" Then
Parse_DTri() ' 0.31
EndIf
If match = "False" Then
Parse_FEll() ' 0.31
EndIf
If match = "False" Then
Parse_FRect() ' 0.31
EndIf
If match = "False" Then
Parse_FTri() ' 0.31
EndIf
If match = "False" Then
Parse_SPix() ' 0.31
EndIf
If match = "False" Then
Parse_Show() ' 0.31
EndIf
If match = "False" Then
Parse_SMsg() ' 0.31
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Clear
' clear ::=
' GraphicsWindow.Clear[]([])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.Clear"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.Clear()
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.Clear()")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DBText
' dBText ::=
' GraphicsWindow.DrawBoundText[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawBoundText"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawBoundText(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawBoundText(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DEll
' dEll ::=
' GraphicsWindow.DrawEllipse[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawEllipse"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawEllipse(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawEllipse(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DIma
' dIma ::=
' GraphicsWindow.DrawImage[]([][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawImage"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawImage(val1, val2, val3)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawImage(" + val1 + "," + val2 + "," + val3 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DLine
' dLine ::=
' GraphicsWindow.DrawLine[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawLine"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawLine(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawLine(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DRect
' dRect ::=
' GraphicsWindow.DrawRectangle[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawRectangle"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawRectangle(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawRectangle(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DRIma
' dRIma ::=
' GraphicsWindow.DrawResizedImage[]([][],[][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawResizedImage"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val5 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawResizedImage(val1, val2, val3, val4, val5)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawResizedImage(" + val1 + "," + val2 + "," + val3 + "," + val4 + "," + val5 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DText
' dText ::=
' GraphicsWindow.DrawText[]([][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawText"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawText(val1, val2, val3)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawText(" + val1 + "," + val2 + "," + val3 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_DTri
' dTri ::=
' GraphicsWindow.DrawTriangle[]([][],[][],[][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.DrawTriangle"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val5 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val6 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.DrawTriangle(val1, val2, val3, val4, val5, val6)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.DrawTriangle(" + val1 + "," + val2 + "," + val3 + "," + val4 + "," + val5 + "," + val6 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_FEll
' fEll ::=
' GraphicsWindow.FillEllipse[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.FillEllipse"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.FillEllipse(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.FillEllipse(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_FRect
' fRect ::=
' GraphicsWindow.FillRectangle[]([][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.FillRectangle"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.FillRectangle(val1, val2, val3, val4)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.FillRectangle(" + val1 + "," + val2 + "," + val3 + "," + val4 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_FTri
' fTri ::=
' GraphicsWindow.FillTriangle[]([][],[][],[][],[][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.FillTriangle"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val4 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val5 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val6 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.FillTriangle(val1, val2, val3, val4, val5, val6)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.FillTriangle(" + val1 + "," + val2 + "," + val3 + "," + val4 + "," + val5 + "," + val6 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_SPix
' sPix ::=
' GraphicsWindow.SetPixel[]([][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.SetPixel"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.SetPixel(val1, val2, val3)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.SetPixel(" + val1 + "," + val2 + "," + val3 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Show
' show ::=
' GraphicsWindow.Show[]([])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.Show"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.Show()
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.Show()")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_SMsg
' sMsg ::=
' GraphicsWindow.ShowMessage[]([][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.ShowMessage"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
GraphicsWindow.ShowMessage(val1, val2)
If traceX Then
TextWindow.WriteLine("! GraphicsWindow.ShowMessage(" + val1 + "," + val2 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_ValOpe
' valOpe ::=
' {||}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_GRGB() '
If match = "False" Then
Parse_GPix() '
EndIf
If match = "False" Then
Parse_GCol() '
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_GRGB
' gRGB ::=
' GraphicsWindow.GetColorFromRGB[]([][],[][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.GetColorFromRGB"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val3 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
val = GraphicsWindow.GetColorFromRGB(val1, val2, val3)
If traceX Then
TextWindow.WriteLine("! " + val + "=GraphicsWindow.GetColorFromRGB(" + val1 + "," + val2 + "," + val3 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_GPix
' gPix ::=
' GraphicsWindow.GetPixel[]([][],[][])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.GetPixel"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val1 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ","
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
Parse_Val()
val2 = val
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
val = GraphicsWindow.GetPixel(val1, val2)
If traceX Then
TextWindow.WriteLine("! " + val + "=GraphicsWindow.GetPixel(" + val1 + "," + val2 + ")")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_GCol
' gCol ::=
' GraphicsWindow.GetRandomColor[]([])
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Stack.PushValue("ptr",ptr)
txt = "GraphicsWindow.GetRandomColor"
Lex_Text()
If match Then
Lex_Space0()
EndIf
If match Then
txt = "("
Lex_Text()
EndIf
If match Then
Lex_Space0()
EndIf
If match Then
txt = ")"
Lex_Text()
EndIf
_ptr = Stack.PopValue("ptr")
If match = "False" Then
ptr = _ptr
EndIf
If match Then
val = GraphicsWindow.GetRandomColor()
If traceX Then
TextWindow.WriteLine("! " + val + "=GraphicsWindow.GetRandomColor()")
EndIf
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Prop
' prop ::=
' {||||||||||||}
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
Parse_Bg() '
If match = "False" Then
Parse_Bc() '
EndIf
If match = "False" Then
Parse_Fb() '
EndIf
If match = "False" Then
Parse_Fi() '
EndIf
If match = "False" Then
Parse_Fn() '
EndIf
If match = "False" Then
Parse_Fs() '
EndIf
If match = "False" Then
Parse_Hi() '
EndIf
If match = "False" Then
Parse_Le() '
EndIf
If match = "False" Then
Parse_Pc() '
EndIf
If match = "False" Then
Parse_Pw() '
EndIf
If match = "False" Then
Parse_Ti() '
EndIf
If match = "False" Then
Parse_To() '
EndIf
If match = "False" Then
Parse_Wi() '
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Bg
' bg ::=
' GraphicsWindow.BackgroundColor
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.BackgroundColor"
Lex_Text()
If match Then
prop = "bg"
val = GraphicsWindow.BackgroundColor
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Bc
' bc ::=
' GraphicsWindow.BrushColor
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.BrushColor"
Lex_Text()
If match Then
prop = "bc"
val = GraphicsWindow.BrushColor
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Fb
' fb ::=
' GraphicsWindow.FontBold
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.FontBold"
Lex_Text()
If match Then
prop = "fb"
val = GraphicsWindow.FontBold
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Fi
' fi ::=
' GraphicsWindow.FontItalic
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.FontItalic"
Lex_Text()
If match Then
prop = "fi"
val = GraphicsWindow.FontItalic
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Fn
' fn ::=
' GraphicsWindow.FontName
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.FontName"
Lex_Text()
If match Then
prop = "fn"
val = GraphicsWindow.FontName
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Fs
' fs ::=
' GraphicsWindow.FontSize
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.FontSize"
Lex_Text()
If match Then
prop = "fs"
val = GraphicsWindow.FontSize
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Hi
' hi ::=
' GraphicsWindow.Height
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.Height"
Lex_Text()
If match Then
prop = "hi"
val = GraphicsWindow.Height
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Le
' le ::=
' GraphicsWindow.Left
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.Left"
Lex_Text()
If match Then
prop = "le"
val = GraphicsWindow.Left
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Pc
' pc ::=
' GraphicsWindow.PenColor
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.PenColor"
Lex_Text()
If match Then
prop = "pc"
val = GraphicsWindow.PenColor
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Pw
' pw ::=
' GraphicsWindow.PenWidth
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.PenWidth"
Lex_Text()
If match Then
prop = "pw"
val = GraphicsWindow.PenWidth
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Ti
' ti ::=
' GraphicsWindow.Title
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.Title"
Lex_Text()
If match Then
prop = "ti"
val = GraphicsWindow.Title
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_To
' to ::=
' GraphicsWindow.Top
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.Top"
Lex_Text()
If match Then
prop = "to"
val = GraphicsWindow.Top
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub

Sub Parse_Wi
' wi ::=
' GraphicsWindow.Width
If traceC Then
TextWindow.WriteLine(" " + ptr)
EndIf
txt = "GraphicsWindow.Width"
Lex_Text()
If match Then
prop = "wi"
val = GraphicsWindow.Width
EndIf
If traceC Then
TextWindow.WriteLine("
" + ptr)
EndIf
EndSub