Project: | Proparse Project |
Component: | Code |
Category: | bug report |
Priority: | normal |
Assigned: | Unassigned |
Status: | active |
/* Sample code, parsed with errors */
DEFINE VARIABLE hCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.
CREATE QUERY hQry.
hQry:ADD-BUFFER(BUFFER customer:HANDLE). /* parsing error: Expecting RIGHTPAREN, found : */
hQry:QUERY-PREPARE("For each customer no-lock":U).
hQry:QUERY-OPEN.
hQry:GET-FIRST.
/* Sample code, parsed with NO errors */
DEFINE VARIABLE hCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.
CREATE QUERY hQry.
hCustomer = BUFFER customer:HANDLE.
hQry:ADD-BUFFER(hCustomer). /* no parsing error */
hQry:QUERY-PREPARE("For each customer no-lock":U).
hQry:QUERY-OPEN.
hQry:GET-FIRST.
Comments
Could not reproduce. Which version?
Hi Marcel, thanks for submitting the bug report.
Can you tell us which version of Proparse (and which operating system)?
Using version 3.1b01 on Windows, I was unable to reproduce the problem. I pasted your first snippet into c:/temp/test2.p, and then ran the following:
The error status came up 0 (no error).
Running the 'Tokenlister', here is the syntax tree I get for the
hQry:ADD-BUFFER(BUFFER customer:HANDLE).
statement:Re: Could not reproduce. Which version?
I'm sorry, to create a sample program to the sports database (instead of our company database) i forgot the database name reference:
DEFINE VARIABLE hCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.
CREATE QUERY hQry.
hQry:ADD-BUFFER(BUFFER sports.customer:HANDLE). /* parsing error: Expecting RIGHTPAREN, found : */
hQry:QUERY-PREPARE("For each customer no-lock":U).
hQry:QUERY-OPEN.
hQry:GET-FIRST.
If i run your program i get the following message:
---------------------------
Message (Press HELP to view stack trace)
---------------------------
3.1b01
-2
c:/tmp/test.p:5:39: expecting RIGHTPAREN, found ':'
---------------------------
OK Help
---------------------------
Thanks, now I see it
Thanks for the clarification Marcel. Now I'm able to see the error in action. I'll see what I can do about creating a patch, at the very least I'll make sure it's fixed before the next release. Cheers.
Fixed
Hi Marcel, I implemented a fix and the test code seems to parse OK now. Can you install this build:
http://www.joanju.com/proparse/proparse_3.1b02.exe
and let me know if your code all parses OK now? If yes, then I'll update the link on my download page.
RE: Fixed
The source code parses now. Thanks!