2 - Reserved Word: import Reserved...

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

View Full Document Right Arrow Icon
<program> <importStmt> Reserved Word: import Reserved Word: java . Reserved Word: util . Reserved Word: Scanner ; ... node has no more children Reserved Word: class IDENTIFIER: CS316ex2 [not in symbol table] { <dataFieldDecl> Reserved Word: static <varDecl> Reserved Word: int <singleVarDecl> IDENTIFIER: numrings [not in symbol table] ... node has no more children , <singleVarDecl> IDENTIFIER: movesrequired [not in symbol table] ... 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: 0: INITSTKFRM ? <compoundStmt> { <statement> <outputStmt> Reserved Word: System . Reserved Word: out . Reserved Word: print ( <printArgument> *** Generating: 1: WRITESTRING 2 54 CHARACTER STRING LITERAL: "Nonrecursive Solution to the Tower of Hanoi Problem " ... node has no more children ) ; ... node has no more children
Background image of page 1

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

View Full DocumentRight Arrow Icon
... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: howmanyrings [not in symbol table] <argumentList> ( ) ... node has no more children *** Generating: 2: CALLSTATMETHOD ? *** Generating: 3: NOPorDISCARDVALUE ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: howmanymoves [not in symbol table] <argumentList> ( ) ... node has no more children *** Generating: 4: CALLSTATMETHOD ? *** Generating: 5: NOPorDISCARDVALUE ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: writemoves [not in symbol table] <argumentList> ( ) ... node has no more children *** Generating: 6: CALLSTATMETHOD ? *** Generating: 7: NOPorDISCARDVALUE ; ... node has no more children ... node has no more children } ... node has no more children *** Fixed Up: 0: INITSTKFRM 0 *** Generating: 8: STOP ... node has no more children <methodDecl> Reserved Word: static Reserved Word: void *** Fixed Up: 3: NOP *** Fixed Up: 2: CALLSTATMETHOD 9 *** Generating: 9: INITSTKFRM ? IDENTIFIER: howmanyrings [method (start address = 9)] ( <parameterDeclList> <empty> ... node has no more children ) <compoundStmt> { <statement> <varDecl> Reserved Word: Scanner
Background image of page 2
IDENTIFIER: userInput [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> <outputStmt> Reserved Word: System . Reserved Word: out . Reserved Word: print ( <printArgument> *** Generating: 10: WRITESTRING 55 77 CHARACTER STRING LITERAL: "Enter number of rings: " ... node has no more children ) ; ... node has no more children ... node has no more children <statement> <assignmentOrInvoc> IDENTIFIER: numrings [static var (address = 0)] *** Generating: 11: PUSHSTATADDR 0 = <expr3> <expr2> <expr1> IDENTIFIER: userInput [local Scanner] . Reserved Word: nextInt
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the 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 / 25

2 - Reserved Word: import Reserved...

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