forked from consultingwerk/proparse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consultingwerk#55 fix parsing of cases when the preprocessor variable…
… is used inside the name checked by DEFINED() function. e.g. &if defined(i_tt{&prefix}companydata{&suffix}) = 0 &then &IF DEFINED(OPEN-QUERY-{&QUERY-NAME}) NE 0 &THEN
- Loading branch information
Daniel Baciu
committed
Oct 5, 2021
1 parent
51d8657
commit 969e649
Showing
10 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#Build Number for ANT. Do not edit! | ||
#Tue Aug 03 15:26:44 CEST 2021 | ||
build.number=1225 | ||
#Tue Oct 05 12:20:52 EEST 2021 | ||
build.number=1226 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package test.github55; | ||
|
||
import java.io.File; | ||
|
||
import org.prorefactor.core.JPNode; | ||
import org.prorefactor.treeparser.ParseUnit; | ||
|
||
import com.joanju.proparse.NodeTypes; | ||
|
||
import junit.framework.Assert; | ||
import junit.framework.TestCase; | ||
|
||
public class TestClass extends TestCase { | ||
|
||
public void test() throws Exception { | ||
|
||
com.joanju.proparse.Environment proparseEnv = null; | ||
org.prorefactor.core.schema.Schema proparseSchema = null; | ||
|
||
proparseEnv = com.joanju.proparse.Environment.instance(); | ||
proparseSchema = org.prorefactor.core.schema.Schema.getInstance(); | ||
|
||
proparseSchema.clear(); | ||
// proparseSchema.loadSchema("C:\\Work\\Proparse\\Github\\proparse\\src\\test\\SCL3301\\schema.txt"); | ||
|
||
// proparseEnv.configSet ("propath", "C:\\Work_STREAM\\SmartComponentLibrary\\Develop122\\ABL"); | ||
|
||
proparseEnv.configSet ("batch-mode", "false"); | ||
proparseEnv.configSet ("opsys", "WIN32"); | ||
proparseEnv.configSet ("proversion", "12.2"); | ||
proparseEnv.configSet ("window-system", "MS-WINXP"); | ||
|
||
|
||
File file = new File("C:\\Work\\Proparse\\Github\\proparse\\src\\test\\github55\\testCode.p"); | ||
// File file = new File("C:\\Projects\\proparse\\src\\test\\github55\\testCode.p"); | ||
ParseUnit pu = new ParseUnit(file); | ||
|
||
pu.treeParser01(); | ||
|
||
} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/*------------------------------------------------------------------------ | ||
File : testCode.p | ||
Purpose : | ||
Syntax : | ||
Description : | ||
Author(s) : Daniel | ||
Created : Mon Oct 04 11:57:10 CET 2021 | ||
Notes : | ||
----------------------------------------------------------------------*/ | ||
|
||
/* *************************** Definitions ************************** */ | ||
|
||
block-level on error undo, throw. | ||
|
||
/* ******************** Preprocessor Definitions ******************** */ | ||
|
||
/* preprocessor in middle and at the end of checked preprocessor variable*/ | ||
&if defined(i_tt{&prefix}companydata{&suffix}) = 0 &then | ||
&global-define i_tt{&prefix}companydata{&suffix} yes | ||
define {&scope} temp-table tt{&prefix}CompanyData{&suffix} no-undo {&reference-only} before-table bt{&prefix}CompanyData{&suffix} | ||
field Company as character /* bedrijf */. | ||
&ENDIF | ||
|
||
|
||
/* preprocessor at begining of checked preprocessor variable */ | ||
&IF DEFINED({&PREFIX}TTEqSearchModel-I) = 0 &THEN | ||
&GLOBAL-DEFINE {&PREFIX}TTEqSearchModel-I 1 | ||
|
||
def {&SCOPE} temp-table {&PREFIX}ttEqSearchModel no-undo {&REFERENCE-ONLY} | ||
field SortOrder as int. | ||
|
||
&ENDIF | ||
|
||
/* *************************** Main Block *************************** */ | ||
&SCOP QUERY-NAME Query-Main | ||
&Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH baktype NO-LOCK INDEXED-REPOSITION. | ||
|
||
&IF DEFINED(OPEN-QUERY-{&QUERY-NAME}) NE 0 &THEN | ||
define variable hQuery as handle no-undo. | ||
define variable hBuffer as handle no-undo. | ||
&ENDIF |