Javascript 解析器本身是如何像 ESPRIMA 一样用 javascript 编写的?那么谁来解析ESPRIMA的javascript

How it works that Javascript parser is itself written in javascript like ESPRIMA ? Then who parses the javascript of ESPRIMA

我的理解是 "In computer technology, a parser is a program, usually part of a compiler, that receives input in the form of sequential source program instructions, interactive online commands, markup tags, or some other defined interface and breaks them up into parts (for example, the nouns (objects), verbs (methods), and their attributes or options) that can then be managed by other programming (for example, other components in a compiler). A parser may also check to see that all input has been provided that is necessary." 这意味着解析器分解 javascript 并形成一些树并将其解析为机器代码 运行 但是在 esprima 的情况下它是如何发生的..

Esprima 只是一个 parser,一个将语言语法分解为抽象语法树 (AST) 的工具。它与消耗 AST 并执行它的 运行 时间完全不同。

使用Esprima的一个场景是代码质量检查。 运行 在 JS 上使用的语法检查工具使用像 Esprima 这样的库来解析 JS 代码,然后再将其交给分析它生成的 AST 的库。