On Oct 18, 1:28 am, [EMAIL PROTECTED] (Jerry Gay) wrote:
> On 10/17/07, via RT Bernhard Schmalhofer
>
> <[EMAIL PROTECTED]> wrote:
> > # New Ticket Created by  Bernhard Schmalhofer
> > # Please include the string:  [perl #46499]
> > # in the subject line of all future correspondence about this issue.
> > # <URL:http://rt.perl.org/rt3/Ticket/Display.html?id=46499>
>
> > Currently following PIR is failing because of the '#' in the '.param' list.
>
> > .sub main :main
>
> >   ( $S1 ) = my_sub( 'hello', 'world' )
> >   say $S1
> > .end
>
> > .sub my_sub
> >     .param string  str1
> >     #
> >     .param string  str3
>
> >     .local string hello
> >     hello = concat str1, str3
>
> >     .return( hello )
> > .end
>
> > This surprised me, as I expected that '#' lines would be ignored.
> > So I propose to tweak the PIR grammar such that comment lines are allowed
>
> it's documented somewhere (perhaps in a very old ticket?) that
> *nothing* can appear between a .sub line and the .param lines, so
> comments are indeed invalid in the current implementation. i'd love to
> see that change, so comments are allowed.
> ~jerry

THe same is true for .arg directives.

I tried to solve this once, but it didn't work out. Not sure whether I
tried hard enough.
In any case, I'm working on a complete new bison file for PIR. This
one removes all these kinds of "bugs". I added the bison/flex files
under compilers/pirc/new/
I'm not sure to what extent it's possible to change imcc.y or maybe
it's better to do a rewrite of it (by adding the semantic actions to
the new version). A rewrite would also allow us to refactor the lexer,
so that it no longer uses globals (I think IMCC has too many globals
currently to be reentrant).

I'm looking forward to PDD19 being reviewed/approved, so that we have
a "final" definition of PIR. A number of issues need to be resolved
first.

kjs

Reply via email to