We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
我认为您应该考虑GPLEX 扫描仪生成器。
这是在不需要回溯且没有锚定模式的词汇规范的情况下使用的最快的一种。
别的,
您还可以使用 SLK 解析器生成器(它支持 C、C++、Java、C# 语言)。
也请联系这个问题。
它询问如何改进您使用的 GOLD 解析器:[改进 GOLD 解析器]
I think you should consider the GPLEX Scanner Generator.
This is the fastest one used in the case of lexical specifications that do not require backtracking, and do not have anchored pattern.
Else,
you can also go for the SLK Parser Generator ( It supports C,C++,Java,C# languages).
Also be in touch with this question.
It asks about improving th GOLD Parser that you have used : [Improve the GOLD Parser]
ANTLR 是一个 LL 解析器,在语言接受方面不如 LR 解析器强大。请验证您在所有可能情况下的上下文语言是否符合 LL 规范。另外还有一些其他事情需要考虑,例如歧义语法、上下文无关或上下文敏感语法等...最好首先使用不同的解析器类型评估您的需求(LL(+),LR(+),CALR(+), LALR(+) ) 可用。 + 表示出现 1 次或多次前瞻。然后选择该解析器类型的一个解析器生成工具。
ANTLR 是一个 LL(k) 自上而下的解析器。在某些情况下很好,但在其他情况下则不然,因为我们递归地处理最左推导。像 gold parser、Visual Parse++ 等解析器都是 LR(k) 解析器,它们基本上是自下而上的解析器。根据我对评估不同解析器的研究,我们选择了 LR(k) 解析器(视觉解析++对我们有好处),它通常在生成解析树的方法上更快。
准确地说,每种解析方法都有其规范,在不同情况下效果好或坏。我们需要评估最适合我们语言的语言。此外,对于您想要开发的每种语言,解析器的性能有两个方面的作用:
1)针对您正在开发的语言的解析方法。
2)使用的解析器生成工具(该工具在某些情况下可能开发得不太好)
希望它有所帮助。如果我可以提供任何进一步的信息,请告诉我。
VM拉克什
([电子邮件受保护])
ANTLR is a LL parser which is less powerful than LR parsers interms of language acceptance. Please verify if your language of context in all possible cases fits in the LL specifications. Also there are some other things to consider like ambiguous grammar, context free or context sensitive grammar .etc... its better to evaluate first your needs with different parser types( LL(+),LR(+), CALR(+), LALR(+) ) available. + means 1 or more occurances of look ahead. After that select one parser generating tool of that parser type.
ANTLR is a LL(k) top-down parser.. good in some cases but not in others as we process recursively on left most derivation. Parsers like gold parser, Visual Parse++ ..etc are LR(k) parsers which are basically bottom-up parsers. with my research on evaluating different parsers we selected LR(k) parser (visual parse++ was good for us) which in general are faster in approach of generating parse tree.
to precise every parsing methodology has its specifications which work good or bad in different cases. We need to evaluate the best one for our language. Also performance of a parser works in two fold for every language you want to develop
1) parsing methodology wrt to the language you are developing.
2) parser generating tool used (tool might not be developed great in some cases)
hope it helps. let me know if i can help with any further information.
V M Rakesh
([email protected])
我无法谈论性能,但您可以尝试 GPLEX/GPPG
I can't speak to performance, but you could try GPLEX/GPPG
为什么不使用 JavaScriptSerializer 类中的构建来反序列化 JSON?
通用反序列化方法: http://msdn.microsoft.com/en-us/library /bb355316.aspx
JavascriptSerializer 类: http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx
Why not use the build in JavaScriptSerializer class to deserialize JSON?
Generic deserialize method: http://msdn.microsoft.com/en-us/library/bb355316.aspx
JavascriptSerializer class: http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx
最新版本的 JSON.NET 能够直接从 JSON 创建动态 CLR 对象。难道就没有别的办法了吗?当然,静态类型的反/序列化也是可能的。
JSON.NET
The latest version of JSON.NET is able to create dynamic CLR objects directly from JSON. Is that no alternative? Static typed de-/serialization is also possible of course.
JSON.NET