<i id='elScs'><tr id='elScs'><dt id='elScs'><q id='elScs'><span id='elScs'><b id='elScs'><form id='elScs'><ins id='elScs'></ins><ul id='elScs'></ul><sub id='elScs'></sub></form><legend id='elScs'></legend><bdo id='elScs'><pre id='elScs'><center id='elScs'></center></pre></bdo></b><th id='elScs'></th></span></q></dt></tr></i><div id='elScs'><tfoot id='elScs'></tfoot><dl id='elScs'><fieldset id='elScs'></fieldset></dl></div>
  • <tfoot id='elScs'></tfoot>

    1. <small id='elScs'></small><noframes id='elScs'>

        <bdo id='elScs'></bdo><ul id='elScs'></ul>

      <legend id='elScs'><style id='elScs'><dir id='elScs'><q id='elScs'></q></dir></style></legend>

        Javascript 解析器生成器

        时间:2023-06-14

          <bdo id='od67e'></bdo><ul id='od67e'></ul>

          <small id='od67e'></small><noframes id='od67e'>

            <legend id='od67e'><style id='od67e'><dir id='od67e'><q id='od67e'></q></dir></style></legend>
                <tbody id='od67e'></tbody>

                  <i id='od67e'><tr id='od67e'><dt id='od67e'><q id='od67e'><span id='od67e'><b id='od67e'><form id='od67e'><ins id='od67e'></ins><ul id='od67e'></ul><sub id='od67e'></sub></form><legend id='od67e'></legend><bdo id='od67e'><pre id='od67e'><center id='od67e'></center></pre></bdo></b><th id='od67e'></th></span></q></dt></tr></i><div id='od67e'><tfoot id='od67e'></tfoot><dl id='od67e'><fieldset id='od67e'></fieldset></dl></div>
                • <tfoot id='od67e'></tfoot>

                  本文介绍了Javascript 解析器生成器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我见过一些 javascript 解析器生成器:

                  I've seen some javascript parser generators:

                  1. 吉森 (http://zaach.github.com/jison/)

                  PEG.js (http://pegjs.majda.cz/)

                  ANTLR (http://www.antlr.org/)

                  JS/CC (http://jscc.jmksf.com/)

                  有人有经验吗?

                  有什么好处和坏处?这些库准备好投入生产了吗?和性能?

                  What are the pros and cons? Are these libraries ready for production? And performance?

                  编辑:
                  我想在 javascript 中解析和运行不同的语言

                  EDIT:
                  I want to parse and run a different language in javascript

                  推荐答案

                  我不确定你是想要一个可以生成 JavaScript 编写的解析器的解析器生成器,还是一个使用 JavaScript 语法来构建 JavaScript 解析器的解析器生成器.

                  I'm not sure if you want a parser generator that would spit a JavaScript written parser or a parser generator that would use a JavaScript grammar to build a JavaScript parser.

                  无论如何,我只使用过 ANTLR 和 JavaCC.ANTLR 允许您以不同的语言(C、C#、Java)生成解析器,并且在它们的 GUI 树状形式上检查您的上下文无关语法表达式非常酷.但是从来没有找到它的 JavaScript 语法.

                  Anyway, I've only used ANTLR and JavaCC. ANTLR allows you to generate your parser in different languages (C, C#, Java) and it's pretty cool checking your Context-free grammar expressions on their GUI tree-like form. Never found a JavaScript grammar for it though.

                  JavaCC 有一个缺点.仅在 Java 中生成解析器.另一方面,我发现学习和从构建解析器的部分开始更容易 - 我发现这是最好的部分 - 围绕它构建你想要的任何东西,例如代码翻译器、改写器等.

                  JavaCC has a downside. Only generates the parser in Java. On the other hand, I found it easier to learn and to step from the part where you build the parser to - what I found to be the best part - building whatever you want around it e.g., code translator, rephraser, etc, etc.

                  这篇关于Javascript 解析器生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:sp_send_dbmail - 将表格中的行格式化为红色以发出警报 下一篇:将阿拉伯文本转换为 HTML 代码字符

                  相关文章

                    <small id='GdgWo'></small><noframes id='GdgWo'>

                    <legend id='GdgWo'><style id='GdgWo'><dir id='GdgWo'><q id='GdgWo'></q></dir></style></legend>
                      <bdo id='GdgWo'></bdo><ul id='GdgWo'></ul>

                    <tfoot id='GdgWo'></tfoot>

                    1. <i id='GdgWo'><tr id='GdgWo'><dt id='GdgWo'><q id='GdgWo'><span id='GdgWo'><b id='GdgWo'><form id='GdgWo'><ins id='GdgWo'></ins><ul id='GdgWo'></ul><sub id='GdgWo'></sub></form><legend id='GdgWo'></legend><bdo id='GdgWo'><pre id='GdgWo'><center id='GdgWo'></center></pre></bdo></b><th id='GdgWo'></th></span></q></dt></tr></i><div id='GdgWo'><tfoot id='GdgWo'></tfoot><dl id='GdgWo'><fieldset id='GdgWo'></fieldset></dl></div>