Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm very lost on how to proceed with this project, any help would be greatly appreciated. This is a Java project. Programming Assignment 5 -Java
I'm very lost on how to proceed with this project, any help would be greatly appreciated. This is a Java project.
Programming Assignment 5 -Java Identifier Parser Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor). Project Description Variables in a computer program are programmer-defined and sere as a named location in memory. Selecting good identifiers helps with the human understanding and maintainability of source code. But there are restrictions imposed on identifiers by the Java language. These rules and conventions are summarized here: Variable names are case-sensitive. A variable's name can be any legal identifier -an unlimited- length sequence of Unicode letters and digits, beginning with a letter, the dollar sign "$", or the underscore character"_". The convention, however, is to always begin your variable names with a letter, not "$" or"_". Additionally, the dollar sign character, by convention, is never used at all. You may find some situations where auto-generated names will contain the dollar sign, but your variable names should always avoid using it. A similar convention exists for the underscore character; while it's technically legal to begin your variable's name with"_", this practice is discouraged. White space is not permitted Subsequent characters may be letters, digits, dollar signs, or underscore characters. Conventions (and common sense) apply to this rule as well. When choosing a name for your variables, use full words instead of cryptic abbreviations. Doing so will make your code easier to read and understand. In many cases, it will also make your code self-documenting; fields named cadence, speed, and gear, for example, are much more intuitive than abbreviated versions, such as s,c, and g. Also, keep in mind that the name you choose must not be a .If the name you choose consists of only one word, spell that word in all lowercase letters. If it consists of more than one word, capitalize the first letter of each subsequent word. The names gearRatio and currentGear are prime examples of this convention. If your variable stores a constant value, such as static final int NUM GEARS- 6, the convention changes slightly, capitalizing every letter and separating subsequent words with the underscore character. By convention, the underscore character is never used elsewhere. (Oracle.com, 2015) A compiler must examine tokens in a program and decide whether they are reserved words in the Java language or valid identifiers defined by the user. Design a program that reads a Java source code file and makes a list of all the valid Java identifiers along with the number of occurrences of each identifier in the source code. It should display any invalid identifiers that exist in the program, too. To do this, you should make use of a Hash Map data structure. The Hash Map will hold all the identifiers that you find in the Java program and the number of times the identifier appears in the source code file. In addition, your program will need a data structure containing all the Java reserved words and operators for efficient searching, optionally this structure may include the query language keywords. Write Java code that will create an AVL tree of the reserved words in the Java language, operators, and the query language keywords (if included in the input file) using the BRIDGES bridges.base.BinTreeElementStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started