Thank you for this build and your will to get the COBOL stuff fixed! COBOL -
add/remove comments works fine now, COBOL statements with a dot doesn't occur as
a paragraph in code explorer any more (finally that old bug was solved - good
work), COBOL - COPY section in code explorer needs to be tweaked but works in
simple cases.
1 Code explorer in general: If possible line brakes/tabs/multiple spaces should
be converted into one space. Sample for C "void myempty (char mychar ,
char mycahr2 ) {}", sample for VB-Script "sub myempty ()".
2 Is it currently possible to open the files that are referenced in include
(C/C++)/ COPY (COBOL) statements or would this be a feature request?
3 Where can one find the code clips templates? Can you copy the syntax words
into that templates (for upcoming versions) or have all keywords of current
highlighter in AC list?
4 Auto-Completion popup:
4.1 Use of CTRL/ALT leaves AC popup (francheu's request) - fine
4.2 Use of F1-F24 should leave AC popup, too.
4.3 AC popup shouldn't occur if PSPad has lost the focus or any menu
item/function key (like CTRL/ALT, F1-F24) or scrolling (via mouse wheel or
cursor keys or page-up/-down keys) was used.
5 COBOL - COPY section in code explorer:
5.1 It works in simple cases.
5.2 The COPY statement can start everywhere between column 7 and 72 and consist
of several lines, it ends with a dot. I've added a sample for that with the
comment "With stupid placements".
5.3 I think one should either a) put the name together with all clauses into the
code-explorer COPY section (everything after the COPY word until [not including]
the dot) or b) put only the name there. I tend to a), if this is possible.
6 Other COBOL stuff:
6.1 Sometimes a line is highlighted as a comment on scrolling. This occurs when
you set the cursor at column 8 after the "*" of a line commented and scroll the
text with cursor-up/-down.
6.2 Sample for syntax highlighting and Code-Explorer stuff: *
----------------------------------------------------------------
* Program PSPSAM showing some stuff for testing COBOL lexers
* (especially old errors in PSPad COBOL syntax)
* ----------------------------------------------------------------
IDENFTIFICATION DIVISION.
PROGRAM-ID. 'PSPSAM'.
* ----------------------------------------------------------------
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
SYSERR IS MY-ERR
DECIMAL-POINT IS COMMA.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MY-FILE ASSIGN TO MY-FILE-NAME
ORGANIZATION IS LINE SEQUENTIAL
FILE STATUS IS MY-FILE-STATUS.
SELECT MY-INPFILE ASSIGN TO "INPUT.DAT"
ORGANIZATION IS SEQUENTIAL
FILE STATUS IS MY-FILE-STATUS.
I-O-CONTROL.
DATA DIVISION.
FILE SECTION.
FD MY-FILE.
01 MY-FILE-REC.
02 MY-REC.
03 MY-BIG1 PIC X(32000).
03 MY-BIG2 PIC X(32000).
FD MY-INPFILE.
01 MY-INPFILE-REC.
02 MY-INPREC PIC X(320).
* ----------------------------------------------------------------
WORKING-STORAGE SECTION.
78 MY-FILE-NAME VALUE 'TEST.DAT'.
77 MY-FILE-STATUS PIC X(02).
01 PARM-1.
05 PARM-1-1 PIC X(12).
05 PARM-1-2 PIC X(10).
01 PARM-2 PIC X(80).
77 mycount pic 9(02) value 0.
COPY WSCPY.
77 BVAR PIC X(650000) BASED.
* ----------------------------------------------------------------
LOCAL-STORAGE SECTION.
*> This var is marked:
01 local-var pic 9 value zero.
88 local-var-unchanged value zero.
*> This var is NOT marked (because of two spaces):
*> Either all these vars should be marked or none
01 loc2 PIC X(12) VALUE SPACES.
77 loc3 pic 9(05) usage comp-3 value 12.
COPY LOCPY.
* ----------------------------------------------------------------
LINKAGE SECTION.
01 some-rec.
02 some-rec-1 pic 9(04).
02 some-rec-2 pic x(4096).
COPY LICPY.
* ----------------------------------------------------------------
PROCEDURE DIVISION USING some-rec.
*> Declaratives are very special. If they occur, they start with
*> the "declaratives" keyword and end with "end declaratives" (the
*> number of spaces between these two words doesn't matter).
*> They can contain multiple sections/paragraphs.
*> In 2415 they're not recognized correct as an own area (inside
*> working storage) but as empty paragraph.
DECLARATIVES.
* Error section for MY-FILE:
DEC-MY SECTION.
USE AFTER STANDARD ERROR PROCEDURE ON MY-FILE.
DM-BEG.
display 'ERROR IN MYFILE: "' MY-FILE-STATUS '"'
end-display
accept loc2
end-accept
*> returning missing in keywords
*> (note: this is an extension and doesn't have to be included)
exit program returning 1
DM-END.
EXIT SECTION.
* Error section for all files opened with INPUT:
DEC-MYIN SECTION.
USE AFTER STANDARD ERROR PROCEDURE ON INPUT.
DMI-BEG.
display 'ERROR IN MYINPFILE: "' MY-FILE-STATUS '"'
end-display
accept loc2
end-accept
exit program returning 1
DMI-END.
EXIT SECTION.
*
end declaratives.
* ----------------------------------------------------------------
MAIN SECTION.
PARA-1.
OPEN INPUT MYINPFILE
READ MYINP-REC END-READ
OPEN OUTPUT MYFILE
perform 2 times
write MYFILE from myinp-rec
end-write
end-perform
*> perform and end-perform aren't shown as belonging together
*> but this is tricky as there could be so-called
*> "out-of-line perform" (even within an inline perform) like
perform varying mycount from 2 by 3
until mycount > 9
perform some *> out-of-line perform of section
perform para-2 *> out-of-line perform of paragraph
*> here comes an out-of-line perform with additional clauses
*> and line brakes (COBOL ignores these as it ignores
*> the position within the correct coding area)
perform
para-2
varying mycount from 2 by 3
until mycount > 9
end-perform
*> Not sure if perform/end-perform thing can be fixed
CLOSE MYFILE
CLOSE MYINPFILE
ALLOCATE BVAR
MOVE ALL 'A' TO BVAR
CALL 'SUBMOD' USING PARM-1
BVAR
PARM-2.
FREE ADDRESS OF BVAR
go to para-3
continue.
PARA-2.
continue.
PARA-3.
EXIT PROGRAM.
* ----------------------------------------------------------------
SOME SECTION.
move PARM-1 to PARM-2
EXIT SECTION.
* ----------------------------------------------------------------
SOME2 SECTION.
move PARM-2 to PARM-1
continue.
* ----------------------------------------------------------------
SOME3 SECTION.
if 1 = 1
CANCEL 'SUBMOD'
*> Only if/end-if are shown as belonging together
*> (both are highlighted if the cursor is in one of them).
*> Can the "else" be highlighted there, too?
else
continue
end-if
*
evaluate true
*> Only evaluate/end-evaluate are shown as belonging together
*> (both are highlighted if the cursor is in one of them).
*> Can all "when" be highlighted there, too?
when 1 = 1
continue
when 0 = 0
continue
end-evaluate
*
exit SECTION.
* ----------------------------------------------------------------
*> Copy samples, shown in COPY section of Code-Explorer:
*> A function to open them would be nice.
*> They can have different ways of naming:
*> Without anything (most compilers will look for PDCPY.CBL,
*> then PDCPY.CPY, then PDCPY in this case)
COPY PDCPY.
*> As literal with/without full name
COPY "PDCPY2.CPY".
COPY "C:\COBOL\CPY\PDCPY2.CPY".
*> With IN clause:
COPY "PDCPY3.CPY" IN "C:\COBOL\CPY".
*> With a lot of clauses:
COPY PDCPY4
IN CPYBIB
SUPPRESS PRINTING
REPLACING ==SOMETEXT== BY ==SOME OTHER TEXT==
LEADING ==AA-== BY ==PSPSAM==.
*> With stupid placements (Bug in 2415: not shown in Code-Explorer)
COPY
SOME
.
* ----------------------------------------------------------------
* -- End of program PSPSAM ---------------------------------------
Every "COBOL-only" comment starts with "* ", every comment that says something
about PSPAD starts with "*>". The things that are fixed in 2415 are removed.
(Click the Quote link for this post to get the right indentation).
human
--
<http://forum.pspad.com/read.php?6,55988,55998>
PSPad freeware editor http://www.pspad.com