This project gathers various small utilities related to parsing code. This includes tools for viewing or converting Proparse's syntax tree, utilities for find and report, utilities for search and replace, etc.
This little 4gl script (two .p files and one .i file) uses Proparse to build temp-tables of file references (for RUN and for include). What you do with those temp-tables is entirely up to you.
Thanks Greg Wutzke for commissioning this effort. It was built for a project where source files were being moved and renamed as part of a code cleanup effort. For each file being moved or renamed, all code references to the file needed to be examined.
See the comments at the top of filerefs.p for notes about configuring and running the script.
Gooey bomb?!
This project is for building a Bill of Materials of frames and widgets. Such a BoM may have many uses, but the immediate goal is for assistance in conversion of existing ABL to use new .Net UI.
The GuiBom is composed of lists of frames, fields, and widgets in a given compile unit, as well as their attributes and links to nodes in the syntax tree where the frames and widgets are referenced. A proof of concept script has already accomplished much of this. The BoM goals appear to be straightforward to achieve by using the new version of Proparse.
That sums up the first part of the project, where Proparse plays the key role. The next part of the project, well, I'd better leave that up to Julian to describe. :)
This Groovy script was the original prototype, proof of concept. It generates lots of useful XML, but we decided rather than go from Proparse+Groovy through XML into ABL programs, it would be better to work on the new Proparse ABL API so that we are working with Proparse+ABL right off the bat.
Download the zip file (attached below), unzipping creates a directory called 'guibom'.
Download proparse.jar and put it in that guibom directory.
Get and configure Groovy (especially the CLASSPATH), see /proparse/scripting.
Then run the script:
groovy src\GuiBom.groovy
2006 by Carl Verbiest, CCE NV
Scans the source, looks for includes and adds the path (relative to src) to the include name.
This is a clever use of Proparse's "scanner" feature combined with the use of the propath SEARCH function, in order to add relative paths to include file names. This is useful for cleaning up code that depended on each include file directory being on the propath. The goal is to reduce the number of entries on the propath. Thanks Carl!
Revision History
19 Mar 2006: First posted.
This is a nifty utility contributed by Allan Doane for running and visualizing ad-hoc search/queries on a compile unit.
proparsebrowse.w
proparsetokentypes.txt
Proparse Browser screenshot
Revision History
Version 002, 16 Sep 2003: John Green added option for subquery (filter) to be based on either strictly a direct child node, or else on any descendant (grandchildren) nodes.
This is an example of using Proparse from Java. It is self contained with Java source and the JNI DLL necessary for loading Proparse from Java.
It contains a "ProparseLdr" class to make it easy to interface with Proparse.dll, and a "Node" class to make it easy to work with nodes in Proparse's syntax tree.
It also contains an SWT example (SWT is the widget toolkit from eclipse.org) of browsing Proparse's syntax tree:
Proparse tree browser in SWT
Version 02, 13 Sep 2004: Added the ability to configure Proparse via an optional "proparse.config" file. See TreeView.java and ProparseUtil.java.
See "Attachments" below for download.
This is another contribution from Allan Doane (QAD). This utility reads from Proparse to generates an XML representation of the syntax tree for the program that was last parsed. Thanks Allan!
proparseToXML.p
runProparseXMLer.p
People using this utility might also be interested in a nice, free XML visualization tool that I found here: Mindfusion XML Viewer.
Revision History
Version 001, July 15, 2004: Contribution from Allan Doane.
Thanks very much to Carl Verbiest for his permission to post this useful tree visualization utility that he built.
Proparse Treeview
Revision History
April 12, 2005: First post.