Re: How many people actually know what BNF means?
Posted in 2005
Michael Segel wrote: > Fernando Nunes wrote: > > > >>Well... The IBM Informix 4GL manuals has the BNF representation of the >>language. >>But if you want to parse it, you should take a look ath the aubit 4GL >>OSS compiler. I haven't, but I assume thay had to make a parser to >>process the source code. So maybe you can grab a bit of code there (or >>even contribute to the project). >> >>A google search will point you in the right direction. >> >>Regards. > > > Yes, I know. > But are they available in an electronic format? > Not just the 4GL but also their SPL. > > With respect to aubit, its interesting but not what I am looking for. > (And stealing code isn't a good thing, especially if its from an open source > project.... ;-) > > At this stage, its more or less to settle an argument that got started over > a couple of beers. ;-) > > The question is, can you take a BNF of one syntax, and then translate it to > another syntax? > > In theory the answer is yes. But then there are some issues that you need to > address, like key words or if one BNF doesn't support a native statement > that another BNF does. > > The other issue is how can you do this so that it works 100% of the time and > is efficient? ;-) (Ok 99% of the time) > > > To give you an example, some databases support the concept of a sequence. > This is not the same as a Serial data type, although both can be used in > similar situations.... > > There are a couple of ways to create a sequence within Informix as a UDR and > or UDT. You would then have to create these supporting structures and would > then have to translate the statement as you handle the parsed code. > > ... > But I digress... > And even thinking about this makes me want to drink. ;-) I think Aubit is GPL... if you agree with it, it wouldn't be a theft... I'm sure the authors would love to know their work is beeing used. About your example... Informix supports sequences... You just have to be using a version of this century :) Regards.