-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
39 changed files
with
567 additions
and
162 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
2 changes: 1 addition & 1 deletion
2
TypeCobol.Test/Parser/Programs/Cobol85/CopyReplace4ColonErr.PGM.txt
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
92 changes: 92 additions & 0 deletions
92
TypeCobol.Test/Parser/Programs/Cobol85/Replace/ReplaceWithLeading.ProcessedTokens.txt
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,92 @@ | ||
Line 7[26,26] <27, Error, Syntax> - Syntax error : "LEADING" and "TRAILING" can only be used to replace one single text word. This REPLACE operation cannot be applied and is discarded. | ||
Line 8[54,54] <27, Error, Syntax> - Syntax error : "LEADING" and "TRAILING" can only be used to replace one single text word. This REPLACE operation cannot be applied and is discarded. | ||
Line 13[24,31] <27, Error, Syntax> - Syntax error : Missing '(' or ')' in PICTURE string | ||
Line 16[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 17[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 20[11,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 21[16,16] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 24[18,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 25[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 28[18,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 29[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 32[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... (' | ||
Line 33[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... (' | ||
Line 36[18,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... )' | ||
Line 37[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... )' | ||
Line 40[11,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var:1:' | ||
Line 41[11,20] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var:1X:' | ||
Line 60[15,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 61[15,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1X' | ||
Line 65[11,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 66[17,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var' | ||
Line 16[28,29] <27, Error, Syntax> - Syntax error : extraneous input '. ' expecting {ProgramIdentification, ProgramEnd, ClassIdentification, ClassEnd, FactoryEnd, ObjectIdentification, ObjectEnd, MethodEnd, ProcedureDivisionHeader, WorkingStorageSectionHeader, LocalStorageSectionHeader, LinkageSectionHeader, FileDescriptionEntry, DataDescriptionEntry, DataRedefinesEntry, DataRenamesEntry, DataConditionEntry, ExecStatement, FunctionDeclarationEnd, GlobalStorageSectionHeader} | ||
--- Processed Tokens --- | ||
|
||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. DVZS0OSM. | ||
data division. | ||
working-storage section. | ||
REPLACE LEADING ==C-Nb== BY ==1== | ||
LEADING ==C-NbX== BY ==3== | ||
LEADING ==(C-Nb)== BY ==5== | ||
LEADING ==Nb== BY ==7 9== | ||
. | ||
|
||
*Parenthesis separator - Replace OK | ||
01 Var1 PIC X(1) . | ||
01 Var1 PIC X(1X) . | ||
|
||
*Semi colon BEFORE - Word to replace at end - Replace OK | ||
01 Var:1 pic X. | ||
01 Var:1X pic X. | ||
|
||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 1 :Var pic X. | ||
01 1X :Var pic X. | ||
|
||
*Semi colon AFTER - Word to replace at end - Replace KO | ||
01 VarC-Nb: pic X. | ||
01 VarC-NbX: pic X. | ||
|
||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 1Var : pic X. | ||
01 1XVar : pic X. | ||
|
||
*Parenthesis BEFORE - Replace OK | ||
01 Var(1 pic X. | ||
01 Var(1X pic X. | ||
|
||
*Parenthesis AFTER - Replace KO | ||
01 VarC-Nb) pic X. | ||
01 VarC-NbX) pic X. | ||
|
||
*Semi colons AROUND - Replace OK | ||
01 Var:1: pic X. | ||
01 Var:1X: pic X. | ||
|
||
*Literals - Replace KO | ||
01 Var0 pic X(10) value ' C-Nb' . | ||
01 Var0 pic X(10) value 'C-Nb'. | ||
|
||
01 Var0 pic X(10) value " C-Nb" . | ||
01 Var0 pic X(10) value " C-Nb". | ||
|
||
*No separator - Replace OK | ||
01 1Var PIC X. | ||
01 1XVar PIC X. | ||
|
||
*No separator - Replace KO | ||
01 VarC-Nb PIC X. | ||
01 VarC-NbX PIC X. | ||
|
||
*Comma separator - Replace KO | ||
*It's a known bug in our parser | ||
01 Var 1 pic X. | ||
01 Var 1X pic X. | ||
|
||
*Comma separator - Replace OK | ||
*It's a known bug in our parser | ||
01 1 Var pic X. | ||
01 1X Var pic X. | ||
|
||
end program DVZS0OSM. |
68 changes: 68 additions & 0 deletions
68
TypeCobol.Test/Parser/Programs/Cobol85/Replace/ReplaceWithLeading.rdz.cbl
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,68 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. DVZS0OSM. | ||
data division. | ||
working-storage section. | ||
REPLACE LEADING ==C-Nb== BY ==1== | ||
LEADING ==C-NbX== BY ==3== | ||
LEADING ==(C-Nb)== BY ==5== | ||
LEADING ==Nb== BY ==7 9== | ||
. | ||
*Parenthesis separator - Replace OK | ||
01 Var1 PIC X(C-Nb). *> Result = X(1) | ||
01 Var1 PIC X(C-NbX). *> Result = X(1X) | ||
*Semi colon BEFORE - Word to replace at end - Replace OK | ||
01 Var:C-Nb pic X. *> Result = Var:1 | ||
01 Var:C-NbX pic X. *> Result = Var:1X | ||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 C-Nb:Var pic X. *> Result = 1:Var | ||
01 C-NbX:Var pic X. *> Result = 1X:Var | ||
*Semi colon AFTER - Word to replace at end - Replace KO | ||
01 VarC-Nb: pic X. | ||
01 VarC-NbX: pic X. | ||
|
||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 C-NbVar: pic X. *> Result = 1Var: | ||
01 C-NbXVar: pic X. *> Result = 1XVar: | ||
*Parenthesis BEFORE - Replace OK | ||
01 Var(C-Nb pic X. *> Result = Var(1 | ||
01 Var(C-NbX pic X. *> Result = Var(1X | ||
*Parenthesis AFTER - Replace KO | ||
01 VarC-Nb) pic X. | ||
01 VarC-NbX) pic X. | ||
*Semi colons AROUND - Replace OK | ||
01 Var:C-Nb: pic X. *> Result = Var:1: | ||
01 Var:C-NbX: pic X. *> Result = Var:1X: | ||
*Literals - Replace KO | ||
01 Var0 pic X(10) value ' C-Nb' . | ||
01 Var0 pic X(10) value 'C-Nb'. | ||
01 Var0 pic X(10) value " C-Nb" . | ||
01 Var0 pic X(10) value " C-Nb". | ||
*No separator - Replace OK | ||
01 C-NbVar PIC X. *> Result = 1Var | ||
01 C-NbXVar PIC X. *> Result = 1XVar | ||
*No separator - Replace KO | ||
01 VarC-Nb PIC X. | ||
01 VarC-NbX PIC X. | ||
*Comma separator - Replace KO | ||
*It's a known bug in our parser | ||
01 Var,C-Nb pic X. | ||
01 Var,C-NbX pic X. | ||
*Comma separator - Replace OK | ||
*It's a known bug in our parser | ||
01 C-Nb,Var pic X. *> Result = 1,Var | ||
01 C-NbX,Var pic X. *> Result = 1X,Var | ||
end program DVZS0OSM. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
92 changes: 92 additions & 0 deletions
92
TypeCobol.Test/Parser/Programs/Cobol85/Replace/ReplaceWithTrailing.ProcessedTokens.txt
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,92 @@ | ||
Line 7[27,27] <27, Error, Syntax> - Syntax error : "LEADING" and "TRAILING" can only be used to replace one single text word. This REPLACE operation cannot be applied and is discarded. | ||
Line 8[55,55] <27, Error, Syntax> - Syntax error : "LEADING" and "TRAILING" can only be used to replace one single text word. This REPLACE operation cannot be applied and is discarded. | ||
Line 13[24,31] <27, Error, Syntax> - Syntax error : Missing '(' or ')' in PICTURE string | ||
Line 16[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 17[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 20[11,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 21[16,16] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 24[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 25[20,20] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 28[18,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 29[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... :' | ||
Line 32[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... (' | ||
Line 33[14,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... (' | ||
Line 36[18,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... )' | ||
Line 37[19,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... )' | ||
Line 40[11,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var:1:' | ||
Line 41[11,20] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var:X1:' | ||
Line 60[15,18] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 61[15,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... X1' | ||
Line 65[11,14] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... 1' | ||
Line 66[17,19] <27, Error, Syntax> - Syntax error : no viable alternative at input '01 ... Var' | ||
Line 16[28,29] <27, Error, Syntax> - Syntax error : extraneous input '. ' expecting {ProgramIdentification, ProgramEnd, ClassIdentification, ClassEnd, FactoryEnd, ObjectIdentification, ObjectEnd, MethodEnd, ProcedureDivisionHeader, WorkingStorageSectionHeader, LocalStorageSectionHeader, LinkageSectionHeader, FileDescriptionEntry, DataDescriptionEntry, DataRedefinesEntry, DataRenamesEntry, DataConditionEntry, ExecStatement, FunctionDeclarationEnd, GlobalStorageSectionHeader} | ||
--- Processed Tokens --- | ||
|
||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. DVZS0OSM. | ||
data division. | ||
working-storage section. | ||
REPLACE TRAILING ==C-Nb== BY ==1== | ||
TRAILING ==C-NbX== BY ==3== | ||
TRAILING ==(C-Nb)== BY ==5== | ||
TRAILING ==Nb== BY ==7 9== | ||
. | ||
|
||
*Parenthesis separator - Replace OK | ||
01 Var1 PIC X(1) . | ||
01 Var1 PIC X(X1) . | ||
|
||
*Semi colon BEFORE - Word to replace at end - Replace OK | ||
01 Var:1 pic X. | ||
01 Var:X1 pic X. | ||
|
||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 1 :Var pic X. | ||
01 X1 :Var pic X. | ||
|
||
*Semi colon AFTER - Word to replace at end - Replace OK | ||
01 Var1 : pic X. | ||
01 VarX1 : pic X. | ||
|
||
*Semi colon AFTER - Word to replace before - Replace KO | ||
01 C-NbVar: pic X. | ||
01 XC-NbVar: pic X. | ||
|
||
*Parenthesis BEFORE - Replace OK | ||
01 Var(1 pic X. | ||
01 Var(X1 pic X. | ||
|
||
*Parenthesis AFTER - Replace OK | ||
01 Var1 ) pic X. | ||
01 VarX1 ) pic X. | ||
|
||
*Semi colons AROUND - Replace OK | ||
01 Var:1: pic X. | ||
01 Var:X1: pic X. | ||
|
||
*Literals - Replace KO | ||
01 Var0 pic X(10) value ' C-Nb' . | ||
01 Var0 pic X(10) value 'C-Nb'. | ||
|
||
01 Var0 pic X(10) value " C-Nb" . | ||
01 Var0 pic X(10) value " C-Nb". | ||
|
||
*No separator - Replace KO | ||
01 C-NbVar PIC X. | ||
01 XC-NbVar PIC X. | ||
|
||
*No separator - Replace OK | ||
01 Var1 PIC X. | ||
01 VarX1 PIC X. | ||
|
||
*Comma separator - Replace OK | ||
*It's a known bug in our parser | ||
01 Var 1 pic X. | ||
01 Var X1 pic X. | ||
|
||
*Comma separator - Replace KO | ||
*It's a known bug in our parser | ||
01 1 Var pic X. | ||
01 X1 Var pic X. | ||
|
||
end program DVZS0OSM. |
68 changes: 68 additions & 0 deletions
68
TypeCobol.Test/Parser/Programs/Cobol85/Replace/ReplaceWithTrailing.rdz.cbl
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,68 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. DVZS0OSM. | ||
data division. | ||
working-storage section. | ||
REPLACE TRAILING ==C-Nb== BY ==1== | ||
TRAILING ==C-NbX== BY ==3== | ||
TRAILING ==(C-Nb)== BY ==5== | ||
TRAILING ==Nb== BY ==7 9== | ||
. | ||
*Parenthesis separator - Replace OK | ||
01 Var1 PIC X(C-Nb). *> Result = X(1) | ||
01 Var1 PIC X(XC-Nb). *> Result = X(X1) | ||
*Semi colon BEFORE - Word to replace at end - Replace OK | ||
01 Var:C-Nb pic X. *> Result = Var:1 | ||
01 Var:XC-Nb pic X. *> Result = Var:X1 | ||
*Semi colon AFTER - Word to replace before - Replace OK | ||
01 C-Nb:Var pic X. *> Result = 1:Var | ||
01 XC-Nb:Var pic X. *> Result = X1:Var | ||
*Semi colon AFTER - Word to replace at end - Replace OK | ||
01 VarC-Nb: pic X. *> Result = Var1: | ||
01 VarXC-Nb: pic X. *> Result = VarX1: | ||
*Semi colon AFTER - Word to replace before - Replace KO | ||
01 C-NbVar: pic X. | ||
01 XC-NbVar: pic X. | ||
*Parenthesis BEFORE - Replace OK | ||
01 Var(C-Nb pic X. *> Result = Var(1 | ||
01 Var(XC-Nb pic X. *> Result = Var(X1 | ||
*Parenthesis AFTER - Replace OK | ||
01 VarC-Nb) pic X. *> Result = Var1) | ||
01 VarXC-Nb) pic X. *> Result = VarX1) | ||
*Semi colons AROUND - Replace OK | ||
01 Var:C-Nb: pic X. *> Result = Var:1: | ||
01 Var:XC-Nb: pic X. *> Result = Var:X1: | ||
*Literals - Replace KO | ||
01 Var0 pic X(10) value ' C-Nb' . | ||
01 Var0 pic X(10) value 'C-Nb'. | ||
01 Var0 pic X(10) value " C-Nb" . | ||
01 Var0 pic X(10) value " C-Nb". | ||
*No separator - Replace KO | ||
01 C-NbVar PIC X. | ||
01 XC-NbVar PIC X. | ||
*No separator - Replace OK | ||
01 VarC-Nb PIC X. *> Result = Var1 | ||
01 VarXC-Nb PIC X. *> Result = VarX1 | ||
*Comma separator - Replace OK | ||
*It's a known bug in our parser | ||
01 Var,C-Nb pic X. *> Result = Var,1 | ||
01 Var,XC-Nb pic X. *> Result = Var,X1 | ||
*Comma separator - Replace KO | ||
*It's a known bug in our parser | ||
01 C-Nb,Var pic X. | ||
01 XC-Nb,Var pic X. | ||
end program DVZS0OSM. |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.