-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected WORD "SD" parsing cobol program #175
Comments
I haven't checked the result (maybe it doesn't even build) - but can you please recheck after applying #176 ? |
Hi, I applied the changes to libgixpp/gix_esql_parser.yy 117 %token
LOCALSTORAGEEND "End of LOCAL-STORAGE SECTION" 118 %token FD "FILE
description (FD)" 119 %token SD "SORT description (SD)" 830 ; 831 832
file_def: 833 FD token_list PERIOD {} 834 |SD token_list PERIOD {} 835 ;
836 837 838 sqlvariantstate_list: 839 %empty 840 |sqlvariantstate_list
file_def 841 |sqlvariantstate_list incfile 842 |sqlvariantstate_list
includesql I ran the commands make clean ./configure
--prefix=/opt/install --enable-pgsql --disable-mysql --disable-odbc
--disable-oracle make sudo make install But the error persists 16:16:33
/dati/HDS/home/parsbt/SC3/WORK/MU057R.PCO(99): error: syntax error,
unexpected WORD
Il 20/03/24 13:57, Simon Sobisch ha scritto:
…
|
Adjusting the code, then It just occurred to me that the parser does not need to differ between FD and SD, so you can revert the change, then only adjust the scanner as follows: --- a/libgixpp/gix_esql_scanner.ll
+++ b/libgixpp/gix_esql_scanner.ll
@@ -1245,7 +1245,7 @@ SUBSYSTEM "SQL"|"CICS"|"DLI"
return yy::gix_esql_parser::make_WORKINGEND(loc);
}
- "FD" {
+ ("FD"|"SD") {
if (driver->data_division_section == DD_SECTION_FS) {
__yy_push_state(FD_STATE);
} |
Hi, i revert the change to libgixpp/gix_esql_parser.yy.
gixpp still throws error
I added the --parser-scanner-debug parameter 00099 : 000099 SD F-FSORT |
In trying to process a cobol program for our Oracle migration project, I get the following error.
--accepting rule at line 1388("SD")
Next token is token WORD (1.1-2546: SD)
Error: popping nterm sqlvariantstate_list (1.2204-2542: )
Stack now 0 1 6 44
Error: popping nterm $@3 (1.2204: )
Stack now 0 1 6
Error: popping token Begin of FILE SECTION (1.1-2203: )
Stack now 0 1
Error: popping nterm sqlstate_list (MU057R.PCO:1.1: )
Stack now 0
Cleanup: discarding lookahead token WORD (1.1-2546: SD)
Stack now 0
/dati/HDS/home/parsbt/SC3/WORK/MU057R.PCO(99): error: syntax error, unexpected WORD
These are the Cobol lines that generate the error.
This is the syntax from the GnuCobol manual
The gixpp version
The cobc version
The text was updated successfully, but these errors were encountered: