On Thu Oct 18 18:00:04 2007, [EMAIL PROTECTED] wrote:
> Looks like code starting at line 298 is being interpreted as a C++- 
> style comment.
> 
> 
> 
> [li11-226:parrot] 553 $ prove -v t/codingstd/cppcomments.t t
> t/codingstd/cppcomments....1..1
> 
> #     Failed test (t/codingstd/cppcomments.t at line 58)
> # C++ comments found in 1 files:
> # /home/jimk/work/parrot/compilers/pirc/new/pir.l: DQ_STRING       \\\ 
> \n])*\<<<<heredoc id: \nHeredoc delimiter: \nheredoc:  
> \n>>>=>>>>>=>><<..=>==!=<=>=<>//&&||~~+%*/!~-,()[].=;+=-=/=*=%=**=| 
> =&=// 
> =~=.=ifgotonewn_operatorsnullunlessintnumpmcstring.arg.const.emit.endnam 
> espace.end.endm.eom.get_results.globalconst.HLL.HLL_map.invocant.lex.loa 
> dlib.local.macro.meth_call.namespace.nci_call.param.pcc_begin.pcc_begin_ 
> return.pcc_begin_yield.pcc_call.pcc_end.pcc_end_return.pcc_end_yield.pra 
> gma.result.return.sub.yield:anon:init:load:postcomp:immediate:main:metho 
> d:lex:outer:vtable:multi:unique_reg:optional:opt_flag:slurpy:named:flatP 
> SNI$P$S$N$I:.includeIncluding file \nrnewline expected after \);
> # Looks like you failed 1 test of 1.
> not ok 1 - C++ comments
> dubious
>          Test returned status 1 (wstat 256, 0x100)
> DIED. FAILED test 1
>          Failed 1/1 tests, 0.00% okay
> 

I think the right answer here is "don't scan .l files for C++ comments"... we 
have a policy of 
storing the generated .c files in the repository anyway; let's just scan those.

The easiest way to do this is by applying this patch:

$ svn diff lib/Parrot/Distribution.pm
Index: lib/Parrot/Distribution.pm
=========================================================
==========
--- lib/Parrot/Distribution.pm  (revision 22374)
+++ lib/Parrot/Distribution.pm  (working copy)
@@ -310,9 +310,6 @@
         $self->c_header_files,
         $self->pmc_source_files,
         $self->yacc_source_files,
-
-        #$self->lex_source_files,
-        map( $_->files_of_type('Lex file'), $self->lex_source_file_directories 
),
         $self->ops_source_files,
     );

... which will then avoid treating the .l files like C in all cases. 

Reply via email to