Hello Juanjo, > I've being working with the grammar but I found somethinf difficult to > workarround.
You don't specify why it is difficult, or what you have to work around. I assume it is because you have EBNF and need BNF? In such a case, first translate the EBNF to BNF. A site like http://lamp.epfl.ch/teaching/archive/compilation-ssc/2000/part4/parsing/node3.html explains how to do this. Once you have BNF, it should be straight-forward. > Can this be implemented with PLY yacc? I don't know whether the above approach will result in shift/reduce conflicts etc for this particular grammar, but you can just try and you'll find out... Best, Dennis Hendriks Juanjo Conti wrote: > 2009/9/16 Juanjo Conti <[email protected] <mailto:[email protected]>> > > 2009/9/16 A.T.Hofkamp <[email protected] <mailto:[email protected]>>: > > > > Juanjo Conti wrote: > >> I'm goingo to do a little exercise trying to create a OQL2ORM app. > >> Objetive: didactic. > >> > >> I'm using the BNF showed in this book: > >> > >> http://www.makumba.org/oql-manual.pdf > >> > >> Could check out it and tell me if PLY can be used for this? I am not > >> sure if it's BNF or EBNF. > > > > It's EBNF, things like {FOO} do not exist in BNF. > > > > It does not matter much though, you can use PLY for both. > > > > Great! thanks Albert. I'll let you know if I do something. > > > I've being working with the grammar but I found somethinf difficult to > workarround. Can this be implemented with PLY yacc? > > query ::= type_name ([query] ) > query ::= type_name (identifier:query {, identifier: query}) > query ::= struct (identifier: query {, identifier: query}) > query ::= set ([query {, query}]) > query ::= bag ([query {,query}]) > query ::= list ([query {,query}]) > query ::= (query, query {, query}) > query ::=[ list](query .. query) > query ::= array ([query {,query}]) > > Thanks > > -- > Juanjo Conti > blog: http://www.juanjoconti.com.ar > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ply-hack" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ply-hack?hl=en -~----------~----~----~----~------~----~------~--~---
