1 - <program>...

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> <importStmt> Reserved Word: import Reserved Word: java . Reserved Word: util . Reserved Word: Scanner ; ... node has no more children Reserved Word: class IDENTIFIER: CS316ex1 [not in symbol table] { <dataFieldDecl> Reserved Word: static <varDecl> Reserved Word: int <singleVarDecl> IDENTIFIER: argNumRingsToMove [not in symbol table] ... node has no more children , <singleVarDecl> IDENTIFIER: argFromPeg [not in symbol table] ... node has no more children , <singleVarDecl> IDENTIFIER: argToPeg [not in symbol table] ... node has no more children ; ... node has no more children ... node has no more children <dataFieldDecl> Reserved Word: static <varDecl> Reserved Word: int <singleVarDecl> IDENTIFIER: moveCounter [not in symbol table] = *** Generating: 0: PUSHSTATADDR 3 <expr3> <expr2> <expr1> *** Generating: 1: PUSHNUM UNSIGNED INTEGER LITERAL: 0 ... node has no more children ... node has no more children ... node has no more children *** Generating: 2: 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: unused [not in symbol table] [ ] ) *** Generating: 3: INITSTKFRM ? <compoundStmt> { <statement> <outputStmt> Reserved Word: System . Reserved Word: out . Reserved Word: print ( <printArgument> *** Generating: 4: WRITESTRING 4 53 CHARACTER STRING LITERAL: "Recursive Solution to the Tower of Hanoi Problem " ... node has no more children ) ; ... node has no more children ... node has no more children <statement> <outputStmt> Reserved Word: System . Reserved Word: out . Reserved Word: print ( <printArgument> *** Generating: 5: WRITESTRING 54 76 CHARACTER STRING LITERAL: "Enter number of rings: " ... node has no more children ) ; ... node has no more children ... node has no more children <statement> <varDecl> Reserved Word: Scanner IDENTIFIER: keyboard [local Scanner] = Reserved Word: new Reserved Word: Scanner ( Reserved Word: System . Reserved Word: in ) ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: argNumRingsToMove [static var (address = 0)] *** Generating: 6: PUSHSTATADDR = <expr3> <expr2> <expr1> IDENTIFIER: keyboard [local Scanner] . Reserved Word: nextInt ( ) *** Generating: 7: READINT ... node has no more children ... node has no more children ... node has no more children *** Generating: 8: SAVETOADDR ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: argFromPeg [static var (address = 1)] *** Generating: 9: PUSHSTATADDR 1 = <expr3> <expr2> <expr1> *** Generating: 10: PUSHNUM 1 UNSIGNED INTEGER LITERAL: 1 ... node has no more children ... node has no more children ... node has no more children *** Generating: 11: SAVETOADDR ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: argToPeg [static var (address = 2)]...
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 / 21

1 - <program>...

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