10 - <program> Reserved Word: class IDENTIFIER:...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: <program> Reserved Word: class IDENTIFIER: CS316ex10 [not in symbol table] { <dataFieldDecl> Reserved Word: static <varDecl> Reserved Word: int <singleVarDecl> IDENTIFIER: a [not in symbol table] [ ] = *** Generating: 0: PUSHSTATADDR <expr3> <expr2> <expr1> Reserved Word: new Reserved Word: int [ <expr3> <expr2> <expr1> *** Generating: 1: PUSHNUM 6 UNSIGNED INTEGER LITERAL: 6 ... node has no more children ... node has no more children ... node has no more children *** Generating: 2: HEAPALLOC ] ... node has no more children ... node has no more children ... node has no more children *** Generating: 3: SAVETOADDR ... node has no more children , <singleVarDecl> IDENTIFIER: i [not in symbol table] = *** Generating: 4: PUSHSTATADDR 1 <expr3> <expr2> <expr1> *** Generating: 5: PUSHNUM 5 UNSIGNED INTEGER LITERAL: 5 ... node has no more children ... node has no more children ... node has no more children *** Generating: 6: SAVETOADDR ... node has no more children , <singleVarDecl> IDENTIFIER: c [not in symbol table] [ ] = *** Generating: 7: PUSHSTATADDR 2 <expr3> <expr2> <expr1> Reserved Word: new Reserved Word: int [ <expr3> <expr2> <expr1> *** Generating: 8: PUSHNUM 2 UNSIGNED INTEGER LITERAL: 2 ... node has no more children * <expr1> IDENTIFIER: i [static var (address = 1)] *** Generating: 9: PUSHSTATADDR 1 *** Generating: 10: LOADFROMADDR ... node has no more children *** Generating: 11: MUL ... node has no more children + <expr2> <expr1> *** Generating: 12: PUSHNUM 1 UNSIGNED INTEGER LITERAL: 1 ... node has no more children ... node has no more children *** Generating: 13: ADD ... node has no more children *** Generating: 14: HEAPALLOC ] ... node has no more children ... node has no more children ... node has no more children *** Generating: 15: SAVETOADDR ... node has no more children ; ... node has no more children ... node has no more children <mainDecl> Reserved Word: public Reserved Word: static Reserved Word: void Reserved Word: main ( Reserved Word: String IDENTIFIER: args [not in symbol table] [ ] ) *** Generating: 16: INITSTKFRM ? <compoundStmt> { <statement> <assignmentOrInvoc> IDENTIFIER: a [static var (address = 0)] *** Generating: 17: PUSHSTATADDR *** Generating: 18: LOADFROMADDR [ <expr3> <expr2> <expr1> *** Generating: 19: PUSHNUM 1 UNSIGNED INTEGER LITERAL: 1 ... node has no more children ... node has no more children ... node has no more children ] *** Generating: 20: ADDTOPTR = <expr3> <expr2> <expr1> *** Generating: 21: PUSHNUM 1 UNSIGNED INTEGER LITERAL: 1 ... node has no more children ... node has no more children ... node has no more children *** Generating: 22: SAVETOADDR ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: a [static var (address = 0)] *** Generating: 23: PUSHSTATADDR *** Generating: 24: LOADFROMADDR [ <expr3> <expr2> <expr1> *** Generating: 25: PUSHNUM 2 UNSIGNED INTEGER LITERAL: 2 ... node has no more children ... node has no more children ... node has no more children....
View Full Document

This note was uploaded on 06/05/2010 for the course COMPUTER S 700 taught by Professor Joewhite during the Spring '10 term at Universidad San Martín de Porres.

Page1 / 47

10 - <program> Reserved Word: class IDENTIFIER:...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online