LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 9 Feb 2010 09:17:08 -0800
Reply-To:   Savian <savian.net@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Savian <savian.net@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Grammar for the SAS language?
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

On Feb 9, 6:08 am, Trond Ydersbond <t_a_ydersb...@yahoo.no> wrote: > On 9 Feb, 13:11, Savian <savian....@gmail.com> wrote: > > > Why do you need it? Are you going to create a parser? > > > I have most of it (procs at least) but I am unsure whether I would > > release it w/o knowing why. Similarly, I have the regex for a lot of > > the language that I use in my SAS cleanup tool. > > If you have any doubts about releasing, don't do it. > And I'm sure quite a few have something similar to what you have... > Having put quite a lot of work into it, too.. Think about that. > > If you can't see why someone should need it, well, don't bother. > > Then, you might think a bit about why R is such an enormous success. > > If I can't find it elsewhere, I'm going to start doing a subset, > usable for antlr. And I will publish it. > > The list of potential uses for such a grammar is very, very long. > > Trond

I know what the need was for and I agree on the usefulness. That said, you were very crytic in what you asked.

It isn't easy, btw, so you need to realize that from the get-go. Things are not delimited well and certain constructs are very, very hard to parse. I have mulled over building a flex/bison parser as well but I don't see much reason to go there at this time. I have a lot of the regex, especially for data step and have ALL of the procs documented in XML.

I don't think you will find anything on the web. The only ones I know who have worked in this area are WPS, Savian, and Carolina. WPS won't give it to you and I highly doubt Dulles Research would.

The procs are the hardest, btw along with the input statement.

SaviClean, found on my utilities page, will illustrate the parsing. Just paste in SAS code and give it a whirl.

Alan http://www.savian.net


Back to: Top of message | Previous page | Main SAS-L page