Changeset 4578 for trunk/compiler
- Timestamp:
- 11/07/08 13:23:12 (2 months ago)
- Files:
-
- 1 modified
-
trunk/compiler/logtalk.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4574 r4578 266 266 :- dynamic('$lgt_pp_file_rclause_'/1). % '$lgt_pp_file_rclause_'(Clause) 267 267 268 :- dynamic('$lgt_pp_cc_if_found_'/ 0). % '$lgt_pp_cc_if_found_'268 :- dynamic('$lgt_pp_cc_if_found_'/1). % '$lgt_pp_cc_if_found_'(Goal) 269 269 :- dynamic('$lgt_pp_cc_skipping_'/0). % '$lgt_pp_cc_skipping_' 270 270 :- dynamic('$lgt_pp_cc_mode_'/1). % '$lgt_pp_cc_mode_'(Action) … … 4740 4740 '$lgt_tr_file'(end_of_file, _, _, _, _) :- 4741 4741 '$lgt_pp_object_'(Obj, _, _, _, _, _, _, _, _, _, _), 4742 throw( entity_ending_directive_missing(object, Obj)).4742 throw(directive_missing(end_object, object(Obj))). 4743 4743 4744 4744 '$lgt_tr_file'(end_of_file, _, _, _, _) :- 4745 4745 '$lgt_pp_protocol_'(Ptc, _, _, _, _), 4746 throw( entity_ending_directive_missing(protocol, Ptc)).4746 throw(directive_missing(end_protocol, protocol(Ptc))). 4747 4747 4748 4748 '$lgt_tr_file'(end_of_file, _, _, _, _) :- 4749 4749 '$lgt_pp_category_'(Ctg, _, _, _, _, _), 4750 throw(entity_ending_directive_missing(category, Ctg)). 4750 throw(directive_missing(end_category, category(Ctg))). 4751 4752 '$lgt_tr_file'(end_of_file, _, _, _, _) :- 4753 '$lgt_pp_cc_if_found_'(Goal), 4754 throw(directive_missing(endif, if(Goal))). 4751 4755 4752 4756 '$lgt_tr_file'(end_of_file, _, _, _, _) :- … … 5034 5038 retractall('$lgt_pp_file_path_'(_, _)), 5035 5039 retractall('$lgt_pp_file_rclause_'(_)), 5036 retractall('$lgt_pp_cc_if_found_' ),5040 retractall('$lgt_pp_cc_if_found_'(_)), 5037 5041 retractall('$lgt_pp_cc_skipping_'), 5038 5042 retractall('$lgt_pp_cc_mode_'(_)). … … 5342 5346 '$lgt_pp_cc_mode_'(Value), % not top-level if 5343 5347 !, 5344 assert z('$lgt_pp_cc_if_found_'),5348 asserta('$lgt_pp_cc_if_found_'(Goal)), 5345 5349 ( Value == seek -> % we're looking for an else 5346 5350 asserta('$lgt_pp_cc_mode_'(ignore)) % so ignore this if ... endif … … 5356 5360 '$lgt_tr_directive'(if(Goal), _, _, _) :- 5357 5361 !, 5358 assert z('$lgt_pp_cc_if_found_'),5362 asserta('$lgt_pp_cc_if_found_'(Goal)), 5359 5363 ( call(Goal) -> 5360 5364 asserta('$lgt_pp_cc_mode_'(skip)) … … 5373 5377 5374 5378 '$lgt_tr_directive'(elif(Goal), _, _, _) :- 5375 \+ '$lgt_pp_cc_if_found_' ,5379 \+ '$lgt_pp_cc_if_found_'(_), 5376 5380 throw(error(unmatched_directive, directive(elif(Goal)))). 5377 5381 … … 5394 5398 5395 5399 '$lgt_tr_directive'(else, _, _, _) :- 5396 \+ '$lgt_pp_cc_if_found_' ,5400 \+ '$lgt_pp_cc_if_found_'(_), 5397 5401 throw(error(unmatched_directive, directive(else))). 5398 5402 … … 5412 5416 5413 5417 '$lgt_tr_directive'(endif, _, _, _) :- 5414 \+ '$lgt_pp_cc_if_found_' ,5418 \+ '$lgt_pp_cc_if_found_'(_), 5415 5419 throw(error(unmatched_directive, directive(endif))). 5416 5420 5417 5421 '$lgt_tr_directive'(endif, _, _, _) :- 5418 retract('$lgt_pp_cc_if_found_' ),5422 retract('$lgt_pp_cc_if_found_'(_)), 5419 5423 retract('$lgt_pp_cc_mode_'(Value)), 5420 5424 ( Value == ignore ->
