pyaiml21.parser¶
AIML Parser.
This module represents the parser of AIML sources.
- The parsing works in these phases:
XML Parsing - an XML parser reads and returns the content of .aiml as if it was only .xml file
transformation to
ast.Node- returned XML AST is transformed to ast defined in the ast module (to generalize and enable simple exchange of XML parser by implementing only the XMLParser classextracting categories from the AST
checking the AST for syntax errors and reporting them
To parse .aimlif files, similar approach is taken, with the difference, that the file is parsed line by line and XMLParser receives only textual representation of the AIML, not the file.
Logger to keep track of syntax errors. |
|
The AIML parser. |