Extends
Classes
Members
-
context
-
Manages a stack of contexts for assign or call to a name
-
funct
-
Describes current function
- Inherited From:
- Overrides:
- Source:
-
size
-
Manages next (global) variable address
- Inherited From:
- Overrides:
- Source:
Methods
-
Do()
-
Do: 'do';returns address of slot for bzero tood- Inherited From:
- Overrides:
- Source:
-
Else()
-
Else: 'else';creates slot for branch tofi, returns address ofelse- Inherited From:
- Overrides:
- Source:
-
Then()
-
Then: 'then';returns address for bzero toelsefi- Inherited From:
- Overrides:
- Source:
-
While()
-
While: 'while';returns address for branch towhile- Inherited From:
- Overrides:
- Source:
-
_alloc()
-
Replace: returns new
Varat next local/global address.- Overrides:
- Source:
-
_check_defs()
-
Flags undefined functions, returns main if defined
- Inherited From:
- Overrides:
- Source:
-
_dcl()
-
Replace: sets innermost map, returns
sym- Overrides:
- Source:
-
_find()
-
Extend: checks local then global map, returns
sym- Overrides:
- Source:
-
_startup(main)
-
[Extend] Push 0 for
mainparameters.Parameters:
Name Type Description mainFun describes
main().- Overrides:
- Source:
-
add()
-
add: '+' product;- Inherited From:
- Overrides:
- Source:
-
args()
-
args: '(' [ sums ] ')';expects context, codes call -
assign()
-
assign: symbol action;codesPop, pops context- Overrides:
- Source:
-
divide()
-
divide: '/' signed;- Inherited From:
- Overrides:
- Source:
-
eq()
-
eq: '=' sum;- Inherited From:
- Overrides:
- Source:
-
fun()
-
fun: head parms [ block ] ';';- Overrides:
- Source:
-
ge()
-
ge: '>=' sum;- Inherited From:
- Overrides:
- Source:
-
gt()
-
gt: '>' sum;- Inherited From:
- Overrides:
- Source:
-
head()
-
head: 'function' Name;returns function symbol- Inherited From:
- Overrides:
- Source:
-
input()
-
input: 'input' [ Number ];- Inherited From:
- Overrides:
- Source:
-
le()
-
le: '<=' sum;- Inherited From:
- Overrides:
- Source:
-
loop()
-
loop: While cmp Do stmts 'od';- Inherited From:
- Overrides:
- Source:
-
lt()
-
lt: '<' sum;- Inherited From:
- Overrides:
- Source:
-
multiply()
-
multiply: '*' signed;- Inherited From:
- Overrides:
- Source:
-
name()
-
name: symbol [ args ];codes variable load, pops context- Overrides:
- Source:
-
names()
-
names: Name [{ ',' Name }];defines new variables, returns number of names- Inherited From:
- Overrides:
- Source:
-
ne()
-
ne: '<>' sum;- Inherited From:
- Overrides:
- Source:
-
number()
-
number: Number;- Inherited From:
- Overrides:
- Source:
-
parms()
-
parms: '(' [ names ] ')'; -
print()
-
print: 'print' sums;- Inherited From:
- Overrides:
- Source:
-
prog()
-
prog: [ vars ] funs;returns executable- Inherited From:
- Overrides:
- Source:
-
return()
-
return: 'return' [ sum ];- Inherited From:
- Overrides:
- Source:
-
run()
-
Creates stack machine
- Inherited From:
- Overrides:
- Source:
-
select()
-
select: 'if' cmp Then stmts [ Else stmts ] 'fi';- Inherited From:
- Overrides:
- Source:
-
signed()
-
signed: [ '-' ] term;- Inherited From:
- Overrides:
- Source:
-
stmt()
-
stmt: assign | print | loop | select;[replace] no op- Inherited From:
- Overrides:
- Source:
-
store()
-
store: '=' sum;expects context, codes assignment -
subtract()
-
subtract: '-' product;- Inherited From:
- Overrides:
- Source:
-
sum()
-
sum: 'let' Name '=' sum | product [{ add | subtract }];- Inherited From:
- Overrides:
- Source:
-
sums()
-
sums: sum [{ ',' sum }];returns number of values- Inherited From:
- Overrides:
- Source:
-
symbol()
-
symbol: Name;pushes context, returns symbol -
toString()
-
Represents
codeas text- Inherited From:
- Overrides:
- Source: