Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Requesting 4GL grammar spec  (Read 9757 times)
Andrew C.
Posts: 48


« on: August 17, 2010, 03:14:32 am »

Folks,

does anyone have a fairly clean pure spec of the PER and 4GL grammar in something like EBNF, yacc, etc without much pollution from code?

We want to do a number of things with the PER and 4GL as data - eg beautifying, stylistic checking, general munging but it's a long slog writing up the grammar from the bubble-diagrams in the Informix manuals, even before adding the FourJs extensions.

An obvious goal would be to emit an XML tree of the file, so that other tools can share a universal parser front-end. If I get contributions, it would probably make it easier to say it has to be public-domain ;-)

I'd be really happy just to get a complete grammar that's pure and doesn't involve down-and-dirty programming, but if there's any kind of code embedded in it, I couldn't complain!
David H.
Posts: 158


« Reply #1 on: August 17, 2010, 01:54:20 pm »

Hi Andrew,

I don't have anything myself, but as a starting point you could have a look at http://www.iiug.org/software/index_all.html and search for LEX/YACC etc.

I'd also suggest you have a look at the Open Source 4GL code base as from memory this uses YACC/LEX and should have just about everything in there these days...

Can't comment on how polluted these might be though...!

All the best with your project,

David
Andrew C.
Posts: 48


« Reply #2 on: August 20, 2010, 03:05:36 am »

Re iiug: thanks - there's a few SQL parsers in there, including one that appears to be completely free of actions - exactly what I want - so that could cover the rules for SELECT UPDATE DELETE and INSERT. It appears to cover SPL too

By Open Source 4GL you mean the Aubit stuff, yes? I've never been able to build that from source before. Fetching it's latest yesterday, it's complaining about finding -lcurses - which has been obsolete for several years replaced by ncurses. Also hunting for the grammar itself, I can't see the wood for the trees.

I think if this thing is ever going to fly, I've got many hours transcripting bubble diagrams ahead of me

Cheers
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines