Changes
The main changes from the ANTLR2 version are:Support of the forward directive:
procedure normalizeselector;forward;Support for output values:
write and writeln can have special parameters called output values, parameters followed by a colon and an integer (see http://jcoppens.com/soft/pfc2/prog/pascal-fc_lrm.pdf, p 74). E.g:WRITE(LOGFILE,' ',STRPTR:1,' string')Allow no program parameters: e.g.
program TEX; (instead of program X(foo,bar);),Fixed bug in case statements:
caseStatement
: CASE^ expression OF!
caseListElement ( SEMI! caseListElement )*
( SEMI! ELSE! statements )?
END!
;
|
caseStatement
: CASE^ expression OF!
caseListElement ( SEMI! caseListElement )* SEMI!?
( ELSE! statements )?
END!
;
|
ASCIIcode=0..255; yields
<TYPEDECL value="=" line="8">
<IDENT value="ASCIIcode" line="8">
</IDENT>
<SUBRANGE value="SUBRANGE" line="8">
<NUM_INT value="0" line="8">
</NUM_INT>
<NUM_INT value="255" line="8">
</NUM_INT>
</SUBRANGE>
</TYPEDECL>
Support for packed 1..255 (that one sometimes sees): This requires that unpackedStructuredType can also be a subrangeType. Unfortunately, the rules related to types are no longer a tree, and this results in many warnings.The BLOCK AST node means a block: In the previous version a
repeat .... until was mapped to a block even in the absence of begin ... end. This is no longer the case.