Issues with the Pascal parsing

Here you can discuss the universal Integrated Development Environment for OpenVMS
Post Reply

Topic author
brianreiter
Contributor
Posts: 20
Joined: Fri Jun 14, 2019 4:17 pm
Reputation: 0
Status: Offline

Issues with the Pascal parsing

Post by brianreiter » Fri Nov 29, 2019 4:42 am

OK, good news is that things work better on Windows 10 running on a faster laptop with more memory.

The are some issues:

Functions and variables with a "$" a flagged with a token recognition error.

This is problematic with RTL and system service calls.

Pascal builtins such as %ROUTINE are flagged with a token recognition error.

We use these as part of the diagnostic processing

Embedded form feeds in the source are flagged with a token recognition error.

Not a huge issue, these will get removed over time.

Variants on the Case statement such as:

Code: Select all

    CASE out_of_band.control_char OF
        SMG$K_TRM_CTRLC,
        SMG$K_TRM_CTRLY,
        SMG$K_TRM_CTRLZ : $SETEF (abort_ef);

        SMG$K_TRM_CTRLW : return_status := SMG$repaint_screen (out_of_band.paste_id);
    END;
are flagged with a missing ":" error on the first line.

Mismatch ELSE expecting ; reported for:

Code: Select all

    IF ODD (return_status) THEN
    BEGIN
        { ---------------------- }
        { Process the key input. }
        { ---------------------- }

        CASE key_pressed OF

            SMG$K_TRM_PF4 : finished := TRUE;
        END;
    END
    ELSE
    BEGIN
        { ----------------------------- }
        { Failed to read the keystroke. }
        { ----------------------------- }

        IF (return_status <> SS$_TIMEOUT) THEN $EXIT (return_status);
    END;
Getting mismatched input, 'return_status' expecting {FUNCTION, PROCEDURE} for

Code: Select all

  Return_status := SMG$draw_line (column_headings_id, 2, 1, 2, 132, SMG$M_BOLD, );
Are the aligned directives supported?. Getting mismatched input '0' for

Code: Select all

    CENTRE_MAP_ELEC_TYPE         = RECORD
				       dev_elec_id       : [ALIGNED(0)] DEV_ELECTRONIC_ADD_TYPE;
				       picture_id        : [ALIGNED(0)] PICTURE_ID_TYPE;
				       subsystem_code    : [ALIGNED(0)] SUBSYSTEM_CODE_RANGE
				   END { CENTRE_MAP_ELEC_TYPE };
Has issues with variable initialisation, get mismatched input ':=' expecting ;

Code: Select all

FUNCTION initialise : INTEGER ;

VAR
    return_status	: INTEGER := SS$_NORMAL ;
    temp_iosb		: IOSB := ZERO ;
Issues with defaulting parameters to function calls.

Get more mismatched input on things such as:

Code: Select all

       report_diagnostics(      return_status,
                                 ,
                                 ,
                                 %ROUTINE,
                                 'Finish startup returned an error status')
And this:

Code: Select all

		    WRITELN ( 	oplog_file , PAD ( '' , ' ' , 41) ,
				SUBSTR ( reported_text[line_count],1,TRIMMED_LENGTH (reported_text[line_count]) ) 
				, ERROR := CONTINUE ) ;
VARYING keyword seemingly not handled

Code: Select all

   date_stamp		: VARYING [10] OF CHAR ;
Get mismatched input errors for the "10" and the "OF".



I suspect a lot of these are down to the differences between VMS Pascal and standard Pascal.

Hope this helps.

cheers

Brian
Last edited by brianreiter on Fri Nov 29, 2019 5:26 am, edited 1 time in total.


sergey_vorfolomeev
VSI Expert
Contributor
Posts: 21
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Issues with the Pascal parsing

Post by sergey_vorfolomeev » Fri Nov 29, 2019 5:20 am

Thanks for your feedback. We will try to fix this as soon as possible, but it can take a time.


Topic author
brianreiter
Contributor
Posts: 20
Joined: Fri Jun 14, 2019 4:17 pm
Reputation: 0
Status: Offline

Re: Issues with the Pascal parsing

Post by brianreiter » Fri Nov 29, 2019 9:12 am

No problem, I'll post more niggles as I find them.

Post Reply