Re: Reposting : small bug in euphoria parsing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alan Oxley wrote:
> }}}
<eucode>
> -- demo a tiny bug where Eu parsing breaks.
> -- If "trace" is coded between the procedure declaration and the
> -- first private variables, ie immediately after the proc dcl.
> -- error is "Syntax error - expected to see possibly 'end', not a type"
> -- Euphoria v2.5
> -- workaround is to put the trace(1) after the variables declarations
> --
> with trace
> procedure main()
>       trace(1)
>       integer i1
>       i1 = 0
>       i1 = i1 + 1
> end procedure
> 
> main()
> </eucode>
{{{


Refman Section 2.4.2:
 "Variable declarations inside a subroutine must all appear at the 
  beginning, before the executable statements of the subroutine."

It says it expected to see possibly 'end', since that is
one possible keyword that could legally follow a trace statement
inside a routine.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu