I need a javacc program

Job ID: 37472120

Budget: $10 – $30 USD

Job Description: JavaCC Programmer Wanted

Project Description:
Develop a partial compiler for a simplified grammar of the Pascal programming language using the JavaCC meta-compiler and the Eclipse IDE tool. The final application should include a source file (Program.pas) representing a complete program with Pascal code corresponding to the provided syntactic diagrams for this project. The program should output the result of the analysis, indicating success or displaying lexical or syntactic errors. Additionally, it should display on the screen the character string resulting from the writeln statements in the analyzed code, along with the number of constants declared in the program. An example of output after running the Pascal compiler:


Output: 'hi world'

Number of constants: 3
Number of variables: 4

It is important for the creation of the .jj file that you identify which elements correspond to lexical analysis and which belong to syntactic analisis(I will give you the images of the language specifications.). According to the syntactic diagrams provided in the project, the following symbols are recommended to be considered as tokens:

Language Reserved Words:

program
const
var
type
integer
real
boolean
char
begin
end
if
then
writeln (although not a reserved word, it can be grouped here)
Operators
not
/
or
mod
and
<
<=
=

<>
:=
Punctuation Symbols:

.
,
:
=
(
)
..
Literals and Identifiers:

Letter
Digit
Identifiers
Integer
Real
Character (consider it as a complete token that includes the character's quotation marks, for example: 'a')
String Constant (consider it as a complete token that includes the string's quotation marks, for example: 'hello')
Note: For the symbol called "character" appearing in the syntactic diagrams, consider that it can be a letter, digit, or any of the following symbols:

(whitespace)
_ (underscore)
! (exclamation mark)
& (ampersand)
Production Rules:
All other non-terminal symbols appearing in the syntactic diagrams can be considered as part of the production rules of a grammar.

Comments:
The compiler should recognize single-line comments in a Pascal program. Comments for this language are written within curly braces:
{ This is a single-line comment }
Therefore, you should declare the regular expression for comments within the SKIP section in your .jj file.