|
[ spirit-Feature Requests-710743 ] EBNF parser: msg#00010parsers.spirit.devel
Feature Requests item #710743, was opened at 2003-03-27 06:33 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=393389&aid=710743&group_id=28447 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface Improvements (example) Group: Next Release (example) Status: Open Priority: 5 Submitted By: Jonathan de Halleux (pelikhan) Assigned to: joel de guzman (djowel) Summary: EBNF parser Initial Comment: I would be interresting to make a EBNF to Spirit parser. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-05-01 11:49 Message: Logged In: NO http://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf ---------------------------------------------------------------------- Comment By: Jonathan de Halleux (pelikhan) Date: 2003-04-04 06:54 Message: Logged In: YES user_id=89882 I had forgotten that a tree was built by the spirit parser. I'm planning to: - first, parse the ebnf structure and let spirit build a tree, - second, explore the tree and render to spirit grammar. I've got one small problem: tree stuff does not work on VC6,7... and I get strange error with Dev-C++... I'l have to wait for vc7.1 ---------------------------------------------------------------------- Comment By: Jonathan de Halleux (pelikhan) Date: 2003-04-03 08:30 Message: Logged In: YES user_id=89882 Is the preliminary document describing EBNF sufficient ? I was thinking about first transforming to xml and then render to Spirit. Do you have a preference for a xml parser/generator ? I don't think it is part of boost ? ---------------------------------------------------------------------- Comment By: joel de guzman (djowel) Date: 2003-04-03 08:18 Message: Logged In: YES user_id=237817 This will be really cool! I suggest using the ISO/IEC 14977: 1996(E) syntax. ---------------------------------------------------------------------- Comment By: Jonathan de Halleux (pelikhan) Date: 2003-04-02 23:14 Message: Logged In: YES user_id=89882 I've started to work on that. And in fact, there is no defacto EBNF standard. I'll try to get the ebnf specification working and see what can be done from there. ---------------------------------------------------------------------- Comment By: joel de guzman (djowel) Date: 2003-04-02 18:57 Message: Logged In: YES user_id=237817 If you look at the preface, if fact, original Spirit was designed to bootstrap a dynamic parser that takes in EBNF productions as strings. This is similar to your intent. What you want in fact, if I'm not mistaken is a source to source converter where EBNF is converted to Spirit/C++. Yes this is very doable. However, there are problems: There is practically no defacto EBNF standard. There's an ISO standard ( ISO/IEC 14977: 1996(E). ), but I know of no parser that accepts ISO-EBNF. Typically, you'll still have to massage the code from one EBNF format to another. An approach might be to accept different EBNF source grammars (possibly using a command line switch) which will then be converted to Spirit. This imight be a good idea, albeit tedious to do. Will it be worth it? Yes. Unfortunately, there's so much to do that such a facility might be considered as low priority. Unless someone wants to contribute such an EBNF parser, this might be far away into the horizon. --Joel ---------------------------------------------------------------------- Comment By: Jonathan de Halleux (pelikhan) Date: 2003-03-30 09:49 Message: Logged In: YES user_id=89882 About the idea: ---------------------- The idea is to have a tool to create a repository of grammars for Spirit. In the introduction, you give, as an example, the method to transform a EBNF grammar file to a Spirit inline code. Maybe this could be done by a parser that reads EBNF and transforms it to Spirit code. Of course, the challenge would be to make it sufficiently clever to avoid infinite recursion, etc... I do not see it as a "do it all" solution but rather a solution for transforming rapidly a EBNF grammar to Spirit: first you use the parser to roughly transform the EBNF to spirit code and then you customize it with semantics, etc... There are a lot of EBNF files available and generaly you can find it for any programming language. With this EBNF parser, adapting a EBNF file to Spirit would be much easier. About how to do it: --------------------------- That's an open question that I haven't addressed now. I've seen that EBNF specification contains the EBNF grammar. This could serve as a starting point to building the parser. ---------------------------------------------------------------------- Comment By: joel de guzman (djowel) Date: 2003-03-29 23:29 Message: Logged In: YES user_id=237817 Tell me what you have in mind. There are many ways to do this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=393389&aid=710743&group_id=28447 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: Fusion-ifying proto parse trees: 00010, dan marsden |
|---|---|
| Next by Date: | [ spirit-Feature Requests-1478720 ] generic parser: external ebnf grammar?: 00010, SourceForge.net |
| Previous by Thread: | [ spirit-Feature Requests-1479422 ] spirit based parser for c++?i: 00010, SourceForge.net |
| Next by Thread: | [ spirit-Feature Requests-710743 ] EBNF parser: 00010, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |