[SOLVED] 代写 graph General Description:

30 $

File Name: 代写_graph_General_Description:.zip
File Size: 310.86 KB

SKU: 0692902558 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


General Description:
Project 1.3: finish the Scanner
Using either your code for projects 1.1 (Symbol Table) and 1.2 (Scanner: getNextLexeme()), or my code for these, finish the Scanner (scanner.cpp) by implementing the getNextToken() method.
If you use your own code, the minimum requirements are:
– your project must compile/execute using the given test.cpp main() program, without changes.
– your project must include the public methods of the given scanner class (scanner.h)
– your project must include the public methods of the given token class (token.h).
If you implement your own token::getPrintString(), it should use the same values in the same
format as the given method. This is for testing and grading purposes. If you believe you need a variance on this, email the instructor.
Specifications:
getNextToken() is to combine getNextLexeme() and the Symbol Table to finish the Scanner. The method returns a token, made up of an Id and a Symbol Table Reference (ref). In general:
– lex = GetNexLexeme()
– if the lexeme is a Reserved Word or Symbol
o id = one of TOK_res_wd_or_symbol
o ref = NULL
– else (the lexeme is NOT a Reserved Word or Symbol)
o ref = insert lexeme into symbol table
o id = Lit or Ident TOK (after inserting in the Symbol Table, use ref->getCategory() and
translate into the corresponding TOK_ value)
– My symbol table implementation: symbol.h, symbol.cpp, symTbl.h, symTbl.cpp
– My scanner implementation (through proj 1.2): scanner.h, scanner.cpp, fsa.h
If you use the given code, your project 1.3 is to finish the getNextToken() method. Add private submethods as needed.
– My token implementation: token.h, token.cpp
– Test Input Files: prw.txt, lexerror.txt
– My completed project 1.3 executable: jscan
Compilation: your project should compile on a MULTILAB machine using:
g++ *.cpp –o scan (when there is no make file in your submission) or
make (when there is a make file in your submission)
Submission:
Zip all files needed to compile/execute your program as described in the previous paragraph. Submit the .zip file in Canvas.
Given Files:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 graph General Description:
30 $