Ticket #5 (new enhancement)

Opened 6 years ago

bnfc demo fails to build on Java 1.6

Reported by: dpawson Owned by:
Priority: blocker Component: Java back-end
Version: Keywords:
Cc:

Description

Looking at bnfc, I tried the 'make' the calc.cf example. Fails on multiple errors. Shown below.

regards

javac -sourcepath . calc/Absyn/Exp.java calc/Absyn/EAdd.java calc/Absyn/ESub.java calc/Absyn/EMul.java calc/Absyn/EDiv.java calc/Absyn/EInt.java


1. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

Syntax error, type parameters are only available if source level is 5.0


2. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

R cannot be resolved to a type


3. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

Syntax error, parameterized types are only available if source level is 5.0


4. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

R cannot be resolved to a type


5. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

A cannot be resolved to a type


6. ERROR in calc/Absyn/Exp.java (at line 4)

public abstract <R,A> R accept(Exp.Visitor<R,A> v, A arg);

A cannot be resolved to a type


7. ERROR in calc/Absyn/Exp.java (at line 5)

public interface Visitor <R,A> {

Syntax error, type parameters are only available if source level is 5.0


8. ERROR in calc/Absyn/Exp.java (at line 6)

public R visit(calc.Absyn.EAdd p, A arg);

R cannot be resolved to a type


9. ERROR in calc/Absyn/Exp.java (at line 6)

public R visit(calc.Absyn.EAdd p, A arg);

A cannot be resolved to a type


10. ERROR in calc/Absyn/Exp.java (at line 7)

public R visit(calc.Absyn.ESub p, A arg);

R cannot be resolved to a type


11. ERROR in calc/Absyn/Exp.java (at line 7)

public R visit(calc.Absyn.ESub p, A arg);

A cannot be resolved to a type


12. ERROR in calc/Absyn/Exp.java (at line 8)

public R visit(calc.Absyn.EMul p, A arg);

R cannot be resolved to a type


13. ERROR in calc/Absyn/Exp.java (at line 8)

public R visit(calc.Absyn.EMul p, A arg);

A cannot be resolved to a type


14. ERROR in calc/Absyn/Exp.java (at line 9)

public R visit(calc.Absyn.EDiv p, A arg);

R cannot be resolved to a type


15. ERROR in calc/Absyn/Exp.java (at line 9)

public R visit(calc.Absyn.EDiv p, A arg);

A cannot be resolved to a type


16. ERROR in calc/Absyn/Exp.java (at line 10)

public R visit(calc.Absyn.EInt p, A arg);

R cannot be resolved to a type


17. ERROR in calc/Absyn/Exp.java (at line 10)

public R visit(calc.Absyn.EInt p, A arg);

A cannot be resolved to a type



18. ERROR in calc/Absyn/EAdd.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, type parameters are only available if source level is 5.0


19. ERROR in calc/Absyn/EAdd.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, parameterized types are only available if source level is 5.0



20. ERROR in calc/Absyn/ESub.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, type parameters are only available if source level is 5.0


21. ERROR in calc/Absyn/ESub.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, parameterized types are only available if source level is 5.0



22. ERROR in calc/Absyn/EMul.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, type parameters are only available if source level is 5.0


23. ERROR in calc/Absyn/EMul.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, parameterized types are only available if source level is 5.0



24. ERROR in calc/Absyn/EDiv.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, type parameters are only available if source level is 5.0


25. ERROR in calc/Absyn/EDiv.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, parameterized types are only available if source level is 5.0



26. ERROR in calc/Absyn/EInt.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, type parameters are only available if source level is 5.0


27. ERROR in calc/Absyn/EInt.java (at line 8)

public <R,A> R accept(calc.Absyn.Exp.Visitor<R,A> v, A arg) { return v.visit(this, arg); }

Syntax error, parameterized types are only available if source level is 5.0

Note: See TracTickets for help on using tickets.