next up previous contents
Next: Possible Future Extensions Up: XML Lexing and Parsing Previous: The Lexer   Contents

The Parser

The lexical analysis and the following phase, the syntax analysis, will be grouped together into the same pass. Under that pass the lexer operates under the control of the parser. The parser will ask the lexical analyzer for the next token whenever it needs one. The lexer will return this information as well as storing the attribute types and values of the current token parsed. The parser will not generate a parse tree explicitly but rather go to intermediate code directly as syntax analysis takes place.

The parser will stop its task when a syntactical error or a misspelled token is encountered. It should not attempt to correct it. In some cases a constructive error message4.2will be printed to the user.

The parser we will implement will follow the widely used LL(1) parsing method also known as predictive recursive descent parsing. The parser will use top-down parsing following the grammars defined in both the MathML and OpenMath standards and will only need to look at the next token in the token stream  [11].


next up previous contents
Next: Possible Future Extensions Up: XML Lexing and Parsing Previous: The Lexer   Contents