Skip to content

Gracewiiilson/PROGRAM-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PROGRAM-1

Full Instructions: Modify the sample Parser.java code (shown below) to parse “Programs” based upon the grammar linked above. NOTE that only the Parser and Token classes should require any changes; you may make other alterations if desired, but only these two classes need to be modified; both of which are in the Parser.java file.

The parser should “accept” valid “programs” and generate the .DOT “code” necessary to draw a full parse tree. NOTE: The existing sample (in the “Compiler”) already does the “Code Generation” for you, and you should only need to follow the structure of the Parser.java file to get the correct output.

The parser should “reject” invalid “programs” with a descriptive error message; this message should be part of output tree.

The program should accept a filename from the “Command Line” as illustrated in the example. Please no HARD-CODED file paths in the submitted the source.

Like the sample code provided, the output can be used as input for the graph generator at: http://www.webgraphviz.com/ Each source file should start with the package directive and comment as follows:

/* COURSE: COSC455xxx Assignment: Program 1

Name: Last, First Name: Last, First (2nd Student, if applicable. You may work with ONE partner, but both must submit identical copies.) */

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages