Changeset 4537 for trunk/compiler
- Timestamp:
- 10/25/08 08:56:44 (3 months ago)
- Files:
-
- 1 modified
-
trunk/compiler/logtalk.pl (modified) (34 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4535 r4537 1598 1598 ( '$lgt_compiler_flag'(report, on) -> 1599 1599 ( CCounter + LCounter =:= 0 -> % no warnings 1600 write(' (0 warnings)'), nl1600 write('% (0 warnings)'), nl 1601 1601 ; CCounter =:= 0 -> % no compilation warnings 1602 write(' ('), write(LCounter), write(' loading '),1602 write('% ('), write(LCounter), write(' loading '), 1603 1603 '$lgt_write_warnings_word'(LCounter), write(')'), nl 1604 1604 ; LCounter =:= 0 -> % no loading warnings 1605 write(' ('), write(CCounter), write(' compilation '),1605 write('% ('), write(CCounter), write(' compilation '), 1606 1606 '$lgt_write_warnings_word'(CCounter), write(')'), nl 1607 ; write(' ('), write(CCounter), write(' compilation '), % both compilation and loading warnings1607 ; write('% ('), write(CCounter), write(' compilation '), % both compilation and loading warnings 1608 1608 '$lgt_write_warnings_word'(CCounter), write(' and '), 1609 1609 write(LCounter), write(' loading '), … … 4282 4282 ( '$lgt_compiler_flag'(report, on) -> 4283 4283 '$lgt_inc_load_warnings_counter', 4284 write(' WARNING! Redefining '), write(Type), write(' '),4284 write('% WARNING! Redefining '), write(Type), write(' '), 4285 4285 current_output(Output), '$lgt_pretty_print_vars_quoted'(Output, Entity), nl, 4286 4286 ( File == nil -> … … 4288 4288 ; % we've conflicting entities coming from different source files: 4289 4289 File = Base-Path, 4290 write(' loaded from file '), write(Base), write(' ('), write(Path), write(')'), nl4290 write('% loaded from file '), write(Base), write(' ('), write(Path), write(')'), nl 4291 4291 ) 4292 4292 ; true … … 4326 4326 retractall('$lgt_pp_entity_warnings_flag_'), 4327 4327 ( '$lgt_compiler_flag'(report, on) -> 4328 write(' compiling '), write(Type), write(' '),4328 write('% compiling '), write(Type), write(' '), 4329 4329 current_output(Output), '$lgt_pretty_print_vars_quoted'(Output, Entity), 4330 4330 ( '$lgt_compiler_flag'(debug, on) -> … … 4344 4344 ( '$lgt_compiler_flag'(report, on) -> 4345 4345 ( '$lgt_pp_entity_warnings_flag_' -> 4346 nl, write(' compiled'), nl4346 nl, write('% compiled'), nl 4347 4347 ; write('compiled'), nl 4348 4348 ) … … 4358 4358 '$lgt_report_working_directory'(Directory) :- 4359 4359 ( '$lgt_compiler_flag'(report, on) -> 4360 nl, write(' +++ working on directory '), write(Directory), nl4360 nl, write('% +++ working in directory '), write(Directory), nl 4361 4361 ; true 4362 4362 ). … … 4370 4370 '$lgt_report_compiling_file'(File) :- 4371 4371 ( '$lgt_compiler_flag'(report, on) -> 4372 write(' >>> compiling source file '), writeq(File),4372 write('% >>> compiling source file '), writeq(File), 4373 4373 ( '$lgt_compiler_flag'(debug, on) -> 4374 4374 write(' in debug mode...') … … 4387 4387 '$lgt_report_up_to_date_file'(File) :- 4388 4388 ( '$lgt_compiler_flag'(report, on) -> 4389 write(' >>> compiling source file '), writeq(File), write('... up-to-date'), nl4389 write('% >>> compiling source file '), writeq(File), write('... up-to-date'), nl 4390 4390 ; true 4391 4391 ). … … 4399 4399 '$lgt_report_compiled_file'(File) :- 4400 4400 ( '$lgt_compiler_flag'(report, on) -> 4401 write(' >>> '), writeq(File), write(' source file compiled'), nl4401 write('% >>> '), writeq(File), write(' source file compiled'), nl 4402 4402 ; true 4403 4403 ). … … 4411 4411 '$lgt_report_loading_file'(File) :- 4412 4412 ( '$lgt_compiler_flag'(report, on) -> 4413 write(' <<< loading source file '), writeq(File), write('... '), nl4413 write('% <<< loading source file '), writeq(File), write('... '), nl 4414 4414 ; true 4415 4415 ). … … 4422 4422 '$lgt_report_reloading_file'(File) :- 4423 4423 ( '$lgt_compiler_flag'(report, on) -> 4424 write(' <<< reloading source file '), writeq(File), write('... '), nl4424 write('% <<< reloading source file '), writeq(File), write('... '), nl 4425 4425 ; true 4426 4426 ). … … 4433 4433 '$lgt_report_skipping_file'(File) :- 4434 4434 ( '$lgt_compiler_flag'(report, on) -> 4435 write(' <<< skipping loading of source file '), writeq(File), write(' (already loaded) '), nl4435 write('% <<< skipping loading of source file '), writeq(File), write(' (already loaded) '), nl 4436 4436 ; true 4437 4437 ). … … 4444 4444 '$lgt_report_loaded_file'(File) :- 4445 4445 ( '$lgt_compiler_flag'(report, on) -> 4446 write(' <<< '), writeq(File), write(' source file loaded'), nl4446 write('% <<< '), writeq(File), write(' source file loaded'), nl 4447 4447 ; true 4448 4448 ). … … 4455 4455 '$lgt_report_reloaded_file'(File) :- 4456 4456 ( '$lgt_compiler_flag'(report, on) -> 4457 write(' <<< '), writeq(File), write(' source file reloaded'), nl4457 write('% <<< '), writeq(File), write(' source file reloaded'), nl 4458 4458 ; true 4459 4459 ). … … 4752 4752 ), 4753 4753 ( Names == [] -> 4754 write(' WARNING! Singleton variable ')4755 ; write(' WARNING! Singleton variables ')4754 write('% WARNING! Singleton variable ') 4755 ; write('% WARNING! Singleton variables ') 4756 4756 ), 4757 4757 'lgt_report_singletons_term'(Term), … … 4866 4866 '$lgt_compiler_error_handler'(Error) :- 4867 4867 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4868 write(' ERROR! '), writeq(Error), nl,4868 write('% ERROR! '), writeq(Error), nl, 4869 4869 '$lgt_restore_global_op_table', 4870 4870 '$lgt_clean_pp_clauses', … … 4881 4881 '$lgt_report_compiler_error_message'(Error), 4882 4882 ( catch('$lgt_stream_current_line_number'(Stream, Line), _, fail) -> 4883 write(' above line: '), write(Line)4883 write('% above line: '), write(Line), nl 4884 4884 ; true 4885 ), 4886 nl. 4885 ). 4887 4886 4888 4887 … … 4890 4889 !, 4891 4890 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4892 write(' ERROR! '), writeq(Error), nl,4893 write(' in '), write(Type), write(': '), writeq(Entity), nl.4891 write('% ERROR! '), writeq(Error), nl, 4892 write('% in '), write(Type), write(': '), writeq(Entity), nl. 4894 4893 4895 4894 '$lgt_report_compiler_error_message'(error(Error, directive(Directive))) :- 4896 4895 !, 4897 4896 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4898 write(' ERROR! '), writeq(Error), nl,4899 write(' in directive: '), writeq((:- Directive)), nl.4897 write('% ERROR! '), writeq(Error), nl, 4898 write('% in directive: '), writeq((:- Directive)), nl. 4900 4899 4901 4900 '$lgt_report_compiler_error_message'(error(Error, clause(Clause))) :- 4902 4901 !, 4903 4902 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4904 write(' ERROR! '), writeq(Error), nl,4905 write(' in clause: '), writeq(Clause), nl.4903 write('% ERROR! '), writeq(Error), nl, 4904 write('% in clause: '), writeq(Clause), nl. 4906 4905 4907 4906 '$lgt_report_compiler_error_message'(error(Error, dcgrule(Rule))) :- 4908 4907 !, 4909 4908 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4910 write(' ERROR! '), writeq(Error), nl,4911 write(' in grammar rule: '), writeq((Rule)), nl.4909 write('% ERROR! '), writeq(Error), nl, 4910 write('% in grammar rule: '), writeq((Rule)), nl. 4912 4911 4913 4912 '$lgt_report_compiler_error_message'(error(Error, Term)) :- 4914 4913 !, 4915 4914 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4916 write(' ERROR! '), writeq(Error), nl,4917 write(' in: '), writeq(Term), nl.4915 write('% ERROR! '), writeq(Error), nl, 4916 write('% in: '), writeq(Term), nl. 4918 4917 4919 4918 '$lgt_report_compiler_error_message'(Error) :- 4920 4919 ('$lgt_pp_entity'(_, _, _, _, _) -> nl; true), 4921 write(' ERROR! '), writeq(Error), nl.4920 write('% ERROR! '), writeq(Error), nl. 4922 4921 4923 4922 … … 4925 4924 ( Line =:= -1 -> 4926 4925 ( catch('$lgt_stream_current_line_number'(Stream, Next), _, fail) -> 4927 write(' above line: '), write(Next)4926 write('% above line: '), write(Next) 4928 4927 ; true 4929 4928 ) 4930 ; write(' at line: '), write(Line)4929 ; write('% at line: '), write(Line) 4931 4930 ). 4932 4931 … … 5304 5303 !, 5305 5304 ( '$lgt_compiler_flag'(portability, warning) -> 5306 nl, write(' WARNING! Ignoring Prolog directive: '), writeq(Dir),5305 nl, write('% WARNING! Ignoring Prolog directive: '), writeq(Dir), 5307 5306 nl, '$lgt_report_compiler_error_line_number'(Line, Input) 5308 5307 ; true … … 5314 5313 !, 5315 5314 ( '$lgt_compiler_flag'(portability, warning) -> 5316 nl, write(' WARNING! Rewriting Prolog directive: '), writeq(Dir),5317 nl, write(' Copying resulting Prolog directive: '), writeq(RWDir),5315 nl, write('% WARNING! Rewriting Prolog directive: '), writeq(Dir), 5316 nl, write('% Copying resulting Prolog directive: '), writeq(RWDir), 5318 5317 nl, '$lgt_report_compiler_error_line_number'(Line, Input) 5319 5318 ; true … … 5324 5323 !, 5325 5324 ( '$lgt_compiler_flag'(portability, warning) -> 5326 nl, write(' WARNING! Rewriting Prolog directive: '), writeq(Dir),5327 nl, write(' Recompiling resulting Prolog directive: '), writeq(RWDir),5325 nl, write('% WARNING! Rewriting Prolog directive: '), writeq(Dir), 5326 nl, write('% Recompiling resulting Prolog directive: '), writeq(RWDir), 5328 5327 nl, '$lgt_report_compiler_error_line_number'(Line, Input) 5329 5328 ; true … … 5661 5660 '$lgt_pp_entity'(Type, _, _, _, _), 5662 5661 '$lgt_inc_compile_warnings_counter', 5663 nl, write(' WARNING! Ignoring synchronized predicate directive: '),5662 nl, write('% WARNING! Ignoring synchronized predicate directive: '), 5664 5663 write(Type), write(' already declared as synchronized!'), 5665 5664 nl, '$lgt_report_compiler_error_line_number'(Line, Input) … … 6701 6700 functor(Head, Functor, Arity), 6702 6701 '$lgt_inc_compile_warnings_counter', 6703 nl, write(' WARNING! Redefining a Logtalk built-in predicate: '),6702 nl, write('% WARNING! Redefining a Logtalk built-in predicate: '), 6704 6703 writeq(Functor/Arity), 6705 6704 nl, '$lgt_report_compiler_error_line_number'(Line, Input), … … 6716 6715 functor(Head, Functor, Arity), 6717 6716 '$lgt_inc_compile_warnings_counter', 6718 nl, write(' WARNING! Redefining a Prolog built-in predicate: '),6717 nl, write('% WARNING! Redefining a Prolog built-in predicate: '), 6719 6718 writeq(Functor/Arity), 6720 6719 nl, '$lgt_report_compiler_error_line_number'(Line, Input), … … 6730 6729 '$lgt_compiler_flag'(report, on), 6731 6730 '$lgt_inc_compile_warnings_counter', 6732 nl, write(' WARNING! Missing reference to the "monitoring" built-in protocol: '),6731 nl, write('% WARNING! Missing reference to the "monitoring" built-in protocol: '), 6733 6732 writeq(Functor/3), 6734 6733 nl, '$lgt_report_compiler_error_line_number'(Line, Input), … … 6744 6743 '$lgt_compiler_flag'(report, on), 6745 6744 '$lgt_inc_compile_warnings_counter', 6746 nl, write(' WARNING! Missing reference to the "expanding" built-in protocol: '),6745 nl, write('% WARNING! Missing reference to the "expanding" built-in protocol: '), 6747 6746 writeq(Functor/3), 6748 6747 nl, '$lgt_report_compiler_error_line_number'(Line, Input), … … 9175 9174 nl, 9176 9175 ( Objs = [_] -> 9177 write(' WARNING! Reference to unknown object: ')9178 ; write(' WARNING! References to unknown objects: ')9176 write('% WARNING! Reference to unknown object: ') 9177 ; write('% WARNING! References to unknown objects: ') 9179 9178 ), 9180 9179 '$lgt_writeq_list'(Objs) … … 9202 9201 nl, 9203 9202 ( Ptcs = [_] -> 9204 write(' WARNING! Reference to unknown protocol: ')9205 ; write(' WARNING! References to unknown protocols: ')9203 write('% WARNING! Reference to unknown protocol: ') 9204 ; write('% WARNING! References to unknown protocols: ') 9206 9205 ), 9207 9206 '$lgt_writeq_list'(Ptcs) … … 9228 9227 nl, 9229 9228 ( Ctgs = [_] -> 9230 write(' WARNING! Reference to unknown category: ')9231 ; write(' WARNING! References to unknown categories: ')9229 write('% WARNING! Reference to unknown category: ') 9230 ; write('% WARNING! References to unknown categories: ') 9232 9231 ), 9233 9232 '$lgt_writeq_list'(Ctgs) … … 10594 10593 nl, 10595 10594 ( Preds = [_] -> 10596 write(' WARNING! This declared static predicate is called but never defined: ')10597 ; write(' WARNING! These declared static predicates are called but never defined: ')10595 write('% WARNING! This declared static predicate is called but never defined: ') 10596 ; write('% WARNING! These declared static predicates are called but never defined: ') 10598 10597 ), 10599 10598 '$lgt_writeq_list'(Preds), … … 10644 10643 nl, 10645 10644 ( Preds = [_] -> 10646 write(' WARNING! This predicate is called but never defined: ')10647 ; write(' WARNING! These predicates are called but never defined: ')10645 write('% WARNING! This predicate is called but never defined: ') 10646 ; write('% WARNING! These predicates are called but never defined: ') 10648 10647 ), 10649 10648 '$lgt_writeq_list'(Preds) … … 10682 10681 nl, 10683 10682 ( Preds = [_] -> 10684 write(' WARNING! Call to non-standard Prolog built-in predicate: ')10685 ; write(' WARNING! Calls to non-standard Prolog built-in predicates: ')10683 write('% WARNING! Call to non-standard Prolog built-in predicate: ') 10684 ; write('% WARNING! Calls to non-standard Prolog built-in predicates: ') 10686 10685 ), 10687 10686 '$lgt_writeq_list'(Preds), … … 10711 10710 nl, 10712 10711 ( Functions = [_] -> 10713 write(' WARNING! Call to non-standard Prolog built-in arithmetic function: ')10714 ; write(' WARNING! Calls to non-standard Prolog built-in arithmetic functions: ')10712 write('% WARNING! Call to non-standard Prolog built-in arithmetic function: ') 10713 ; write('% WARNING! Calls to non-standard Prolog built-in arithmetic functions: ') 10715 10714 ), 10716 10715 '$lgt_writeq_list'(Functions),
