INTERFACEChecks that aJunoChkBNF ;
JunoAST.T
produced by the parser conforms to the Juno BNF
grammar described at the end of the Juno language definintion.
See the JunoAST
interface for a description of the ways in which a
JunoAST.T may not conform to the Juno grammar.
IMPORT JunoAST; FROM JunoCompileErr IMPORT Error;Procedures in this module may raise the exception
JunoCompile.Error
to
indicate that the JunoAST.T to be checked does not conform to the Juno
grammar. When JunoCompile.Error
is raised by procedures in this module,
it is with an argument of type JunoCompile.ErrVal
. The ast
field of the
error value is the subtree of the argument JunoAST.T
that violates the
Juno grammar.
PROCEDURE Expr(expr: JunoAST.Expr) RAISES {Error};
Check that the expressionexpr
produced by the Juno parser conforms to the non-terminal namedExpr
in the Juno grammar. RaisesError
if there is a grammar violation.
PROCEDURE Formula(form: JunoAST.Formula) RAISES {Error};
Check that the formulaform
produced by the Juno parser conforms to the non-terminal namedFormula
in the Juno grammar. RaisesError
if there is a grammar violation.
PROCEDURE TotalCmd(cmd: JunoAST.Cmd) RAISES {Error};
Check that the commandcmd
produced by the Juno parser conforms to the non-terminal namedTotalCmd
in the Juno grammar. RaisesError
if there is a grammar violation.
END JunoChkBNF.