解析器的建议 [英] Parser suggestion

查看:76
本文介绍了解析器的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



嗨!

我需要一个解析器从源代码中检索一些信息 -

包括部分代码 - - 来自Fortran,用于带有

文档系统的项目。


我可以用于Python应用程序或解析器的任何建议吗?

谢谢,

-

Jorge Godoy< go *** @ ieee.org>


Hi!
I''m needing a parser to retrieve some information from source code --
including parts of code -- from Fortran, to use in a project with a
documentation system.

Any recommendations on a Python app or parser that I could use for that?
Thanks,
--
Jorge Godoy <go***@ieee.org>

推荐答案

在文章< 87 ************ @ ieee.org> ;, Jorge Godoy< go *** @ ieee.org> ;

写道:
In article <87************@ieee.org>, Jorge Godoy <go***@ieee.org>
wrote:
我需要一个解析器从源代码中检索一些信息 -
包括部分代码 - 来自Fortran,用于带有
文档系统的项目。

我可以用于Python应用程序或解析器的任何建议吗?
I''m needing a parser to retrieve some information from source code --
including parts of code -- from Fortran, to use in a project with a
documentation system.

Any recommendations on a Python app or parser that I could use for that?



似乎有很多种解析工具可用于

Python程序员。以下是一些可以帮助您入门的建议:


PLY(Python Lex / Yacc)
http://www.dabeaz.com/ply/

PyParsing
http://pyparsing.sourceforge.net/

SPARK(扫描解析和重写工具包)
http:// pages。 cpsc.ucalgary.ca/~aycock/spark/


你可能还会发现以下有趣的读物,如果这种

的话您的兴趣:
http:// www .python.org / sigs / parser-si ...- standard.html


干杯,

-M
< br $> b $ b -

Michael J. Fromberger |计算机科学系讲师
http://www.dartmouth.edu / ~sting / |达特茅斯学院,美国新罕布什尔州汉诺威



There seems to be a great diversity of parsing tools available for
Python programmers. Here are a few suggestions to get you started:

PLY (Python Lex/Yacc)
http://www.dabeaz.com/ply/

PyParsing
http://pyparsing.sourceforge.net/

SPARK (Scanning Parsing And Rewriting Kit)
http://pages.cpsc.ucalgary.ca/~aycock/spark/

You might also find the following an interesting read, if this sort of
thing interests you:
http://www.python.org/sigs/parser-si...-standard.html

Cheers,
-M

--
Michael J. Fromberger | Lecturer, Dept. of Computer Science
http://www.dartmouth.edu/~sting/ | Dartmouth College, Hanover, NH, USA


" Michael J. Fromberger" <弥****************** @ Clothing.Dartmouth.EDU>写道:
"Michael J. Fromberger" <Mi******************@Clothing.Dartmouth.EDU> writes:
似乎有很多种解析工具可用于Python程序员。以下是一些可以帮助您入门的建议:


Google提供了几乎所有这些建议。但是你对

有什么建议吗哪个解析Fortran代码会更好?或者更高效地使用

来执行此任务?

PLY(Python Lex / Yacc)
http://www.dabeaz.com/ply/

这对我来说是新的: - )

PyParsing
http://pyparsing.sourceforge.net/

从我所看到的,这似乎是一个很好的尝试...

SPARK(扫描解析和重写工具包)
http://pages.cpsc.ucalgary.ca/~aycock/spark/

看起来它大约在2002年开始发展......从2002年到现在

Python有很多改进,我宁愿使用维护工具为此

项目。至少有一个跟上Python开发的步骤...


如果您对此感兴趣,您可能还会发现以下内容:
http://www.python.org /sigs/parser-si...-standard.html
There seems to be a great diversity of parsing tools available for
Python programmers. Here are a few suggestions to get you started:
From Google I found almost all of those. But do you have any suggestion on
which one would be better to parse Fortran code? Or more productive to use
for this task?
PLY (Python Lex/Yacc)
http://www.dabeaz.com/ply/
This is new to me :-)
PyParsing
http://pyparsing.sourceforge.net/
From what I was seeing, this seems to be a good one to try...
SPARK (Scanning Parsing And Rewriting Kit)
http://pages.cpsc.ucalgary.ca/~aycock/spark/
It looks like it stopped being developed circa 2002... From 2002 to now
Python had a lot of improvements and I''d rather use a maintained tool for this
project. At least one that keeps up with Python''s development...

You might also find the following an interesting read, if this sort of
thing interests you:
http://www.python.org/sigs/parser-si...-standard.html




我会。但这基本上是针对仅一个项目。其他结构通常比编程语言简单,并且可以使用

不同方法检索。

非常感谢您的建议。

见到你了,

-

Jorge Godoy< go *** @ ieee.org>



I will. But this is basically for "one project only". Other structures are
usually simpler than a programming language and can be retrieved with
different approaches.
Thank you very much for your suggestions.
Be seeing you,
--
Jorge Godoy <go***@ieee.org>


Jorge Godoy写道:
Jorge Godoy wrote:
从谷歌我发现了几乎所有这些。但是你有什么建议
哪一个解析Fortran代码会更好?或者更高效地使用
来执行此任务?

[snip]
From Google I found almost all of those. But do you have any suggestion on
which one would be better to parse Fortran code? Or more productive to use
for this task?
[snip]
PyParsing
http://pyparsing.sourceforge.net/
PyParsing
http://pyparsing.sourceforge.net/




嗯,我从来没有必要解析Fortan代码,但我已经取得了很大成功

在PyParsing中编写各种递归语法。我很高兴

建议至少尝试一下。


STeVe



Well, I''ve never had to parse Fortan code, but I''ve had a lot of success
writing a variety of recursive grammars in PyParsing. I''d highly
recommend at least trying it out.

STeVe


这篇关于解析器的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆