Hello at the moment of compiling the TEST FILE in the console with javacc
I get it
"Error: the main class was not found or loaded ProjectCompi.java "
This is my JJ FILE:
>PARSER_BEGIN(ProyectoCompi)
>class ProyectoCompi{
> public static void main(String[] args) throws ParseException{
> try{
> ProyectoCompi analizador = new ProyectoCompi(System.in);
> analizador.programa();
> }catch(ParseException e){
> System.out.println(e.getMessage());
> System.out.println("Analizador: Se han encontrado errores en el analisis");
> }
> }
>}
>PARSER_END(ProyectoCompi)
>
>TOKEN:{
> <MAIN: "public static void main()"> {System.out.println("Main -> " + image);}
>}
>
>TOKEN:{
> <LPAREN: "(">{System.out.println("PARENTIZQ -> " + image);}
> |<RPAREN: ")">{System.out.println("PARENTDER -> " + image);}
> |<LBRACE: "{">{System.out.println("LLAVEIZQ -> " + image);}
> |<RBRACE: "}">{System.out.println("LLAVEDER -> " + image);}
> |<COMA: ",">{System.out.println("COMA -> " + image);}
> |<SEMICOLON: ";">{System.out.println("PUNTO Y COMA -> " + image);}
>}
>
>TOKEN:{
> <ASIGNACION: "=">{System.out.println("ASIGNACION -> " + image + "\r\n");}
> |<SUMA: "+">{System.out.println("SUMA -> " + image + "\r\n");}
> |<RESTA: "-">{System.out.println("RESTA -> " + image + "\r\n");}
> |<PRODUCTO: "*">{System.out.println("SUMA -> " + image + "\r\n");}
> |<IMPRIMIR: "imprimir ">{System.out.println("IMPRIMIR -> " + image + "\r\n");}
>}
>
>TOKEN:{
> <COMPLEJO: "Complejo ">{System.out.println("COMPLEJO -> " + image);}
> |<NUMBER: (["0"-"9"])+>{System.out.println("NUMERO -> " + image);}
> |<IDENTIFIER: (["a"-"z","A"-"Z"])+>{System.out.println("IDENTIFICADOR -> " + image + "\r\n");}
>}
>
>SKIP:{
> " " | "\r\n" | "\t" | "\t\t" | "\t\t\t"
>}
>
>void Programa():
>{}
>{
> <MAIN><LBRACE>Sentencias()<RBRACE><EOF>
>}
>
>void Sentencias():
>{}
>{
> DeclaracionLocal()
>}
>
>void DeclaracionLocal():
>{}
>{
>
> <COMPLEJO><IDENTIFIER>(DeclaracionSimple() | DeclaracionCompleja() | DeclaracionCombinada()) <SEMICOLON> recursivo()
>}
>
>void recursivo():
>{}
>{
> DeclaracionLocal()
>}
>
>void DeclaracionSimple():
>{}
>{
> (<COMA><IDENTIFIER>)*
>}
>
>void DeclaracionCompleja():
>{}
>{
> <LPAREN><NUMBER><COMA><NUMBER><RPAREN> (<COMA><IDENTIFIER> <LPAREN><NUMBER><COMA><NUMBER><RPAREN>)*
>}
>void DeclaracionCombinada():
>{}
>{
> ((DeclaracionSimple() | DeclaracionCompleja())<COMA>)*((DeclaracionSimple() | DeclaracionCompleja()))
>}
TEST FILE:
public static void main(){
Complejo a;
Complejo a,b;
Complejo a,b(5,4);
Complejo a(5,4);
Complejo a(5,4),b;
Complejo a,b(5,4),c;
Complejo a(5,4),b,c(6,5);
}