321-HW15 - produces Integer& token_kind while(not self.Is_Ready_To_Dispense and not str.At_EOS object Character ch str.Read(ch self.Insert(ch

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
HW15 1. The specs rule out recursive BL programs specifically in the definitions for CALLS_INSTRUCTION and HAS_A_CALLING_CYCLE. In CALLS_INSTRUCTION it explains that when the root of the statement is a call to an instruction then the instruction is either the statement label of the name of the instruction or that the instruction is one of the elements in the statment. HAS_A_CALLING_CYCLE goes on to explain that when there is an instruction then the instruction has a context that has new instructions as a substring of that new instruction. 2. procedure_body Get_Next_Token ( alters
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: produces Integer& token_kind ) { while(not self.Is_Ready_To_Dispense() and not str.At_EOS()) { object Character ch; str.Read(ch); self.Insert(ch); } if(self.Is_Ready_To_Dispense()) { self.Dispense(token_text, token_kind); } else { self.Flush_A_Token(token_text, token_kind); } } 3. procedure_body Get_Next_Non_Separator_Token ( alters Character_IStream& str, produces Text& token_text, produces Integer& token_kind ) { self.Get_Next_Token(str, token_text, token_kind); while((token_kind == WHITE_SPACE) or (token_kind == COMMENT)) { self.Get_Next_Token(str, token_text, token_kind); } }...
View Full Document

This note was uploaded on 02/27/2012 for the course CSE 321 taught by Professor Bucci during the Winter '11 term at Ohio State.

Ask a homework question - tutors are online