<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 解析器生成器

        Javascript parser generator(Javascript 解析器生成器)

          <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 解析器生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What are valid deviceNames for Chrome emulation testing with Protractor?(使用 Protractor 进行 Chrome 模拟测试的有效设备名称是什么?)
                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Explain about async/ await in Protractor(解释 Protractor 中的 async/await)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  How to use Protractor with Angular 2?(如何在 Angular 2 中使用量角器?)

                        <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>

                              <tbody id='GdgWo'></tbody>

                          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>