Question: Your assignment will be submitted using github. Only the main branch of your repository will be graded. Please refer to the documentation requirements posted on

Your assignment will be submitted using github. Only the "main" branch of your repository will be graded. Please refer to the documentation requirements posted on iLearn. The organization and appearance of this document are critical. Please use spelling and grammar checkers - your ability to communicate about software and technology is almost as important as your ability to write software!
Your program will be tested using unit tests, manual compilation, and execution on the command line. To compile and execute, I will use the following steps:
# Change into the repository directory
cd your-repository-name
#Delete all lasail types -selete not be present in your repository, but just in case)
* Delete ame i files type red ars will be replaced with a clean copy)
# Delete the tests directory (tests will be replaced with a clean copy)
rm -rf tests
# CompEte and EXeCute COMPLEM YOUR XECUTION; PREVIOUS STEPS ARE FOR MY TESTING
Java tools. Compilerfoolss Java
# Compile and execute the Lexer with one or more test X files
javac lexer/Lexer.java
java lexer.Lexer path/to/test/file.x
Requirements
You will extend the Lexer to process additional tokens and improve its output.
Requirement 1
The current implementation of Lexer reads a hardcoded file. Lexer must be updated to take a path to a file as a command line argument:
java lexer.Lexer sample_files/simple.x
If a filename is not supplied, a usage instruction should be displayed (in this snippet, the > character indicates the shell prompt and execution command; it is not a part of the required output):
usage: Java iexer Lexer filenane. x
Requirement 2
Our compiler must be updated to be able to process additional tokens. The new tokens must be added to the tokens.txt file, and the CompilerTools run to re-generate the SymbolTable class and the TokenKind enumeration. Remember from the lecture that we do not want to (must not) use regular expressions.
Symbolic Constant
Lexeme
Description of Token
Greater
GreaterEqual
Number
num
This is the type keyword used to declare a variable of type num
NumberLit
num>
Any num > literal, which is one or more numbers followed by a decimal point, followed by one or more numbers:
Valid examples:
1.2
123.546
213123123123123.0
Invalid examples: 21.
CharType
character
This is the type keyword used to declare a variable of type character
CharLit
character>
Any character> literal, which is a double quote, followed by any ASCIl E, character, followed by a double quote:
Valid examples:
"a""It"
Invalid examples: "a "bb"
From
from
Keyword
To
to
Keyword
Step
step
Keyword
Requirement 3
Requirement 4
The Token class must be updated to include the source file's line number where a token was found.
 Your assignment will be submitted using github. Only the "main" branch

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!