Justus OpenEdge Tools 0.002

First released: Thu, 2011-07-28 12:55

New Justus version released: Justus 0.002.
This version includes SmartGrep, a search tool that can recognize ABL statements in order to find only the code you really need.
Based on Lucene Search Engine, Smartgrep accepts Google-like queries with boolean operators and statement filters. Some common search examples include looking for FIND or FOR without a LOCK clause or temp-table definitions without NO-UNDO.
Check http://justus.sourceforge.net/smartgrep.html for more information and http://sourceforge.net/projects/justus/files/rev_0.002/Justus-0.002.zip/... to download the latest release.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tamhas's picture

Are you actually parsing the

Are you actually parsing the ABL code?


Justus

Not exactly... The first "layer" just brakes the code using some generic rules, like ending a statement with a period or colon, for example. By this time, all the statements are just generic statements (check http://justus.sourceforge.net/api_cmdextract.html to see a sample code "parsed").
Then comes a second component that can recognize different types of statements (Run, For, If, Do, Define, Assign, etc. - check http://justus.sourceforge.net/api_4glparser.html).

So it won't create a lexical tree and recognize every keyword but that's not really the intent now. Who knows in the future ? ;)


tamhas's picture

So, given that we have an

So, given that we have an *real* parser which is free and open source, why not use that?


I saw that coming.. ;)

I've created this "pseudo-parser" (if you prefer) a long time ago and had some tools created for personal use (ok, consider also some co-workers) and only recently I decided that I should spend some hours to make them an open source project.
Since this "parser" is the older part of everything (I created it on 1998 while learning java) I considered rewriting the code to use proparse. I even downloaded and tried to run some samples but when I discovered that it required some previous configuration and settings before I could actually parse the code, I thought It could be a good solution for a problem that I still didn't have. So I decided to keep it and focus on the tools (Coverage, SmartGrep now and some other crazy ideas that may come to reality one day).

So, if you need a real parser to extract every single information from your ABL code, I would recommend proparse. But if you need something simpler, CommandExtractor and ProgressParser may be good enough for your problem. It's just a matter of see what fits better.

But that may change in the future if I really face a problem that require a better parser.


tamhas's picture

My feeling is that we have a

My feeling is that we have a tool in Proparse which is strong, complete, and free. Any attempt to do things where an understanding of syntax is important, e.g., search, search and replace, format, whatever, it seems like we are all going to be farther along if we build on top of Proparse. This isn't to say that someone else couldn't build an equally good parser for ABL, but why bother? An awful lot of work has gone into the existing product and it is going to take a huge amount of work to duplicate it, so why not just use what is already there.

I would love to see more products built on Proparse. A highly parametrized formatter would be lovely. A really intelligent search and replace tool would too. Tools to automate specific refactoring tasks. Etc. I think a lot of these are not that complicated if someone just tackles them based on the work that is already done.


You're probably right. I

You're probably right. I also believe one could really do magic using proparse but until now, the current parser is being good enough for the tools included in Justus. But that's the nice thing about open source projects: anyone can contribute to improve them and I would be happy to add new developers to Justus.

But I think we spending too much energy talking about the parser... What about the tools ? I'd really like to hear your feedback.


tamhas's picture

Point being I am unlikely to

Point being I am unlikely to pay much attention until I am confident in the parsing. I already have some powerful search and replace tools which aren't ABL syntax aware, so the plus would come in having them be fully syntax aware.


OK then... I appreciate your

OK then...
I appreciate your comments, anyway...


jurjen's picture

Well I certainly do not

Well I certainly do not appreciate the comments from Tamhas. I think it is terrific that you have made a parser and took the effort of making it public. I wish more people would be doing that, it is exactly what we want and need at the OpenEdge Hive. I hope that the critical comments from Tamhas will not stop you or anyone else from publishing.


Don't worry...

I won't stop just because of that. Since the discussion started having more beliefs and less reason, I dropped it. I really appreciate tambas' comments because they show something that I could consider in the future (although I'd like to take a look at antlr first), but I ignored the if-you-haven't-made-it-the-way-I-would-so-it's-not-worth-looking-at part. ;)


tamhas's picture

It was certainly not my

It was certainly not my intent to convey *that* message. More that I have some very good search tools now ... including one that will print side by side comparisons of the replacements it is going to do and a three way compare with easy resolution. So, my motivation to try something else is low *unless* it was fully syntax aware and I could count on that.

I think Proparse might even have been developed starting with antlr ... no reason to do the job twice when the tool is free *and* someone is maintaining it for you.


tamhas's picture

It is more a question of

It is more a question of hoping for something better. Why reinvent the wheel ... especially when there is such a good wheel available for free. To be sure, I want lots of contributions ... but might as well make them the best they can be.