0
我正在开发一个新工具。该工具采用XML文件并创建多个用户界面。Lexer解析器混淆
我真的需要有机体我的代码。要做到这一点,我使用命名空间。由输入文件创建的命名空间之间的路径如下所示。
XML解析器>>(或词法分析器)>>令牌树>>发电机>>用户界面
的问题是,是我不明白的词法和语法分析器之间的差异。
protected function __construct(\SimpleXMLElement $xml, string $xmlFileName,
AbstractContainer $container) {
// Link the container with its child
$this->container = $container;
// Initialize the class attributes
$this->name = $xml->attributes()["name"];
//...
}
这段代码代表了我构造函数的一小部分。但是,词法分析器的部分在哪里?解析器的一部分在哪里?
对不起,我的英语,我学习它...