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 expressionexprproduced by the Juno parser conforms to the non-terminal namedExprin the Juno grammar. RaisesErrorif there is a grammar violation.
PROCEDURE Formula(form: JunoAST.Formula) RAISES {Error};
Check that the formulaformproduced by the Juno parser conforms to the non-terminal namedFormulain the Juno grammar. RaisesErrorif there is a grammar violation.
PROCEDURE TotalCmd(cmd: JunoAST.Cmd) RAISES {Error};
Check that the commandcmdproduced by the Juno parser conforms to the non-terminal namedTotalCmdin the Juno grammar. RaisesErrorif there is a grammar violation.
END JunoChkBNF.