Proparse Group



4.0 Docs

License

Proparse is released under the terms of the Eclipse Public License, version 1.0.
www.eclipse.org/legal/epl-v10.html


0. Download and resources

Download
You can find pre-built binaries on the GitHub releases page at:
github.com/oehive/proparse/releases.

Proparse for Java and .Net
Proparse is written in Java, and is accessed from Java (or any JVM language) through proparse.jar.
It is also re-compiled to a .Net assembly (proparse.net.dll).

Forum (discussions and announcements)
Project (issue tracking)
Group (all posts to the Proparse audience)


Bitness

Perhaps this is my ignorance of things .NET, but is there an issue about 32 bit vs 64 bit in using the Proparse DLLs?


Environment Could Not be Resolved

Struggling with my proparse instance. It was working last week and not sure what's changed, but in PDSOE (11.2.1) I'm getting reports that Environment could not be Resolved, and as soon as I Environment:instance(), my (Thomas's) program craps out with no error.


Tokenlister

I have been working on an updated version of Tokenlister, moving to OO and using the new syntax without the shim. I will confess that not being familiar with the old interface, there is a lot in Proparse.p that is obscure. But, I think I have done a reasonable job of working through the shift up to the point of the display node routine which looks like this:

  DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO.

  DEFINE VARIABLE nodeType AS CHARACTER NO-UNDO.
  DEFINE VARIABLE child    AS INTEGER   NO-UNDO.
  ASSIGN child = parserGetHandle().

Use TTY for Runtime

With 11.5 PDSOE, I find that if I have the project and the run configuration with Use TTY for Runtime unchecked, Proparse works fine. But, if I have this flag checked, then it throws an error at the first reference to a Proparse .NET assembly. There is no error message, but the call stack points to the line with the first reference.

I have opened case 00313106 with Progress Tech Support as of 5/12/15, but thus far the support engineer seems unable to get Proparse to work in either mode. :{


backward

I am converting tokenlister to use the new API. It makes calls to proparse.p functions which make reference to the Backward class as in org.proparse.api.Backward. The Javadoc does not seem to include this class. What is its role and where can I find more about it?


New work

I've only had a few minutes here and there, but I'm working on a few things. I'm loading the Proparse svn repository into a git repository with all of the revision history (done). I'm copying over the changes made by Mike and Marian for v11 syntax (partly done). I'll load this new repository up to github as a replacement for the old svn repository. With those done, I'll be able to look at the TABLE-SCAN syntax needed by Thomas.


Debugging

When Proparse gives us a line and a token, it is pretty easy to figure out what construct is bothering it. We can then set that code aside or edit it to eliminate the problem and put the problematic token in your queue for eventual enhancement.

The problem we are having is that we are running into a significant number of cases in the UK code base where we get a ProRefactorException
or a java.lang.NullPointerException and no line number and no token. I


Building and testing

- Installed Eclipse "Standard"
- SVN checkout proparse
- Import project directory into Eclipse. Lots of errors and warnings.
- Copied /lib from Proparse.Java install to root dir of proparse svn checkout directory, refreshed project. No errors.
- Navigate to /org.prorefactor.core/src/org/prorefactor/core/unittest/AllPRCoreTests.java, right mouse click, Run As -> JUnit Test. No errors.

If changing grammar files (.g), we need to be able to run the Antlr parser-generator:


Adding keywords


>
> Here are my notes on adding keywords:
>
> - Add node type to BaseTokenTypes.txt
> - add keywords to proparse.g reserved or unreserved list
> - build and compile com.joanju.proparse.
> - Add node type to com.joanju.proparse.NodeTypes
> - Copy ProParserTokenTypes.txt to org.prorefactor.treeparserbase and org.prorefactor.treeparser01.
> - Touch the tree parsers' .g file before doing a new build, or it won't read the updated TokenTypes.txt.
> - Build the two tree parsers.
> - Update org.prorefactor.core.TokenTypes.java.


Changing and building Proparse

- Installed Eclipse "Standard"
- SVN checkout proparse
- Import project directory into Eclipse. Lots of errors and warnings.
- Copied /lib from Proparse.Java install to root dir of proparse svn checkout directory, refreshed project. No errors.
- Navigate to /org.prorefactor.core/src/org/prorefactor/core/unittest/AllPRCoreTests.java, right mouse click, Run As -> JUnit Test. No errors.

If changing grammar files (.g), we need to be able to run the Antlr parser-generator:


Problem org.prorefactor.refactor.RefactorException: unexpected AST node: STREAM "stream" - Prolint 74

I have a source that compiles but when I run it through Prolint I get a warning?
What is wrong and how can I prevent this warning?

This is a simplefied piece of code (this compiles but gives the same warning when running through Prolint 74)

def temp-table tt1 no-undo
  field Number as int.

define stream s-export.

def var v-NMexp as char no-undo.
def var htt  as handle no-undo.


    
output stream s-export to value(v-NMexp).
        
htt = temp-table tt1:table-handle.

run _proc-table-export(input table-handle htt by-reference,stream s-export:handle).

What about nested includes?

If one has nested includes, is getFileIndex going to return all of them or just the top level? If all, is there any mechanism for getting the levels?

Or, is this another case of having to parse the LISTING?


Include file arguments

Would I be correct in assuming that, if I wanted to capture include file arguments, I would need to process the output of COMPILE LISTING rather than getting anything from Proparse?


#
Syndicate content