|
|
DataMuseum.dkPresents historical artifacts from the history of: DANOSI |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DANOSI Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 2719 (0xa9f)
Types: TextFile
Names: »RULE015.PAS«
└─⟦02956c927⟧ Bits:30010510 DVBS1.SW2114.src.2.14-1 SW2114 REAL #1/4 TIME PASCAL SOURCE REL 2.14
└─⟦this⟧ »RTP\RULE015.PAS«
└─⟦4f587ad96⟧ Bits:30010518 DVBS1.SW2114.src.2.7-1 SW2114 1/4 Real Time Pascal 2.7 92.06.16
└─⟦this⟧ »RTP\RULE015.PAS«
└─⟦a2a9e188c⟧ Bits:30010526 DVBS1.SW2114.src.2.6-4 RTP Compiler Source SW2104+SW2114 Disk 1 92.02.03 HEJ HHA
└─⟦this⟧ »RTP\RULE015.PAS«
└─⟦b607d6035⟧ Bits:30010532 RTP compiler Source 1 2.14 26/9(?)-92 DVBS1.SW2114.src.2.14-8
└─⟦this⟧ »RULE015.PAS«
└─⟦fd2665794⟧ Bits:30010523 DVBS1.SW2114.src.2.6-1 RTP compiler source SW2104+SW2114 Disk#1 30/1-92 HHA
└─⟦this⟧ »RTP\RULE015.PAS«
{$O+,F+}\r
unit rule015;\r
interface\r
uses pscplm,sthunit,sthcom,sthp34,mpaunit,p3cmmn;\r
\r
PROCEDURE rule_constant_declaration\r
(\r
VAR\r
i_code : codes;\r
current_level, current_offset: word\r
);\r
implementation\r
uses rule066,p3math,p3rw;\r
\r
\r
PROCEDURE rule_constant_declaration\r
( (*Call Return*)\r
VAR\r
i_code: codes;\r
current_level, current_offset: word\r
);\r
\r
(* ------------------------------------------------------------------------\r
Pass2Code: 15\r
constant declaration ::= CONSTDECL(SYMBOL)<expression>ENDCONSTDECL\r
\r
Pass3Code: 15\r
-.\r
Symbol Table:\r
-.\r
\r
===========================================================================\r
\r
Error Messages and Warnings:\r
e_implemented\r
-.\r
External Dependencies:\r
struc_cnst_area (defined in PASS3CMMN.INC)\r
rule_test_set (defined in PASS3CMMN.INC)\r
-.\r
External Effects:\r
struc_cnst_area (defined in PASS3CMMN.INC)\r
rule_test_set (defined in PASS3CMMN.INC)\r
-.\r
Stack Appetite:\r
-.\r
Comments:\r
-.\r
Outstanding:\r
The size of the constant may be found in the expression stack rather\r
than the ST.\r
-.\r
------------------------------------------------------------------------ *)\r
\r
CONST\r
rule_version= 005;\r
(*#BEGINTEST\r
this_rule = 015;\r
(*ENDTEST#*)\r
\r
VAR\r
(*#BEGINTEST\r
rule_test : BOOLEAN;\r
(*ENDTEST#*) \r
stck_ix ,\r
object_size : WORD;\r
\r
st_const_symbol: st_address;\r
st_ptr : st_elemptr;\r
BEGIN\r
\r
(*#BEGINTEST\r
rule_test:= i_code IN rule_test_set;\r
\r
IF rule_test THEN\r
WRITELN\r
(\r
testoutput, ' Begin Rule ', this_rule:3,\r
' V', (pass3_version + rule_version):3,\r
'/ ', WORD(i_code):3\r
)\r
;\r
(*ENDTEST#*) \r
\r
load_symbol(st_const_symbol);\r
\r
elementnumber:= elementnumber + 1;\r
\r
load_expression(i_code, e_stck^, current_level, current_offset);\r
\r
st_retrieve(st_const_symbol, st_ptr);\r
st_retrieve(st_ptr^.typeref, st_ptr);\r
\r
object_size:= st_ptr^.st_size;\r
\r
if not e_stck^.const_expr and \r
( (*not(dynamictype in st_ptr^.spec_struct) or*)\r
(object_size<>0) )\r
(* fam type binding or dynamic *) then\r
errormsg(this_pass, e_not_constant_expr);\r
\r
\r
st_get(st_const_symbol, st_ptr);\r
\r
st_ptr^.st_size:= object_size;\r
\r
WITH e_stck^ DO\r
BEGIN\r
IF stck[ last_fct ].kind=csimpleconst THEN\r
begin\r
st_ptr^.const_kind:= csimpleconst;\r
st_ptr^.const_val:= stck[ last_fct ].ii_value;\r
end\r
ELSE\r
IF stck[ last_fct ].kind=ccaddr THEN\r
BEGIN\r
st_ptr^.const_kind:= cstrucconst;\r
st_ptr^.st_struc_symb:= stck[ last_fct ].st_strucc_symbol;\r
END\r
ELSE\r
errormsg(this_pass, e_implemented)\r
\r
END;\r
\r
(* - 'i_code' is 'cendconstdecl'. *)\r
\r
(*#BEGINTEST\r
IF rule_test THEN\r
WRITELN\r
(\r
testoutput, ' - End Rule ', this_rule: 3,\r
' V', (pass3_version + rule_version): 3,\r
'/ ', WORD(i_code): 3\r
);\r
(*ENDTEST#*)\r
\r
END (* procedure rule_constant_declaration *);\r
END.\r
«eof»