Re: How many people actually know what BNF means?
Posted in 2005
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
The main issue with plain BNF & aubit4gl is reserved words, but the Aubit4GL project does have a parser (written in Bison) and a custom lexer which deal with this. There is not an issue with coding to other languages - the Aubit4GL project has an output abstraction layer to enable this (although the only public outputs are C, Informix ESQL/C and Postgres ECPG atm - there are some others that have not been released publically..) Email me directly if you want more info.. Michael Segel wrote: > Again, > > Simple question.... > > Anyone know where I can get a Backus-Naur Form representation of > Informix's current version of 4GL? > > I believe that 4GL is a simple context sensitive language, thus it should > lend itself to being parsed and translated to potentially other > languages/paradigms. > > So can any of the IBMers who watch this board point me in the right > direction? > > It would also be nice to find one of the SPL and of course Oracle's tools > as well.... > > TIA! > > -G >
>> > Well, uhm there actually is an issue... > You've only mentioned procedural languages and I-4GL already goes to > ESQL/C and C. Ok - but OO isn't a problem either so long as its C++ or c# (even java).. We did a "proof of concept" Perl version.. (If you want Prolog or Haskell - you'd probably be out of luck ;-) The issue with any translation like this is that there is a set of supporting functions (in our case the 'Aubit4gl library') that will still need to be callable (stack implementation, UI event handling, display etc) The actual 4GL -> somethingelse is only half the story... (in fact the generated code can be extremely simple) Of course - you could always play the 4GL -> Bytecode and write the Bytecode runner in any language of your choice... As for supporting SQL dialects - this can be a real pain - we've got modules dedicated to helping, but even things like temp tables can be handled very differently... > > Will do, but it really didn't answer my question... > I am looking for a BNF of 4GL and the SPL "languages". I'm fairly sure I developed some Bison grammer for the SPL too... (at least as of about 7.30) - not perfect, but pretty close...