Csound Csound-dev Csound-tekno Search About

[Csnd] bug in new parser?

Date2012-04-28 14:20
Fromluis jure
Subject[Csnd] bug in new parser?
AttachmentsNone  newparsertest.csd  

Date2012-04-28 16:12
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] bug in new parser?
odd -- i keep getting that warning, but I will take a look

btw that is not a syntax error; it is semantics

>
> hello list,
>
> please excuse if this a "feature" and not a bug, but i was surprised to
> find that the new parser ignores an important syntax error without a
> warning.
>
> if you use a variable before it was defined, the new parser apparently
> goes on silently, as can be seen in the following minimal example (also in
> the attached file as a complete csd):
>
> instr 1
>
> asig	=	asig*.1
> asig	rand	.5
> 	out	asig
>
> endin
>
> using the old parser, i get the familiar:
>
> *********
> error:  input arg 'asig' used before defined
> 1 syntax errors in orchestra.  compilation invalid
> *********
>
> but the new parser completely ignores the offending line, and compiles the
> orchestra without even a warning:
>
> *********
> SECTION 1:
> new alloc for instr 1:
> B  0.000 ..  3.000 T  3.000 TT  3.000 M:  0.50000
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.		   overall amps:  0.50000
> 	   overall samples out of range:        0
> 0 errors in performance
> *********
>
>
> best,
>
> lj
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>



Date2012-04-29 13:01
Fromluis jure
SubjectRe: [Csnd] bug in new parser?
on 2012-04-28 at 16:12 jpff@cs.bath.ac.uk wrote:

>odd -- i keep getting that warning, but I will take a look

it's funny, i downloaded the latest sources (5.17.6) and compiled just
with "scons", using all the default options (i used custom-linux-jpff.py
as custom.py, btw).

i keep getting:

SECTION 1:
new alloc for instr 1:
B  0.000 ..  3.000 T  3.000 TT  3.000 M:  0.50000
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.		   overall amps:  0.50000
	   overall samples out of range:        0
0 errors in performance


>btw that is not a syntax error; it is semantics

of course, thank you for the reminder. 

Date2012-04-29 13:55
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] bug in new parser?
I agree it is wrong.  Not had time to search for it yet but I suspect that
a1 = a1*0,1 is not caught but
a1 = aaaa*0,1 is

the message can still apear I think.  Will get onto it soon

==John ff
>
> on 2012-04-28 at 16:12 jpff@cs.bath.ac.uk wrote:
>
>>odd -- i keep getting that warning, but I will take a look
>
> it's funny, i downloaded the latest sources (5.17.6) and compiled just
> with "scons", using all the default options (i used custom-linux-jpff.py
> as custom.py, btw).
>
> i keep getting:
>
> SECTION 1:
> new alloc for instr 1:
> B  0.000 ..  3.000 T  3.000 TT  3.000 M:  0.50000
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.		   overall amps:  0.50000
> 	   overall samples out of range:        0
> 0 errors in performance
>
>
>>btw that is not a syntax error; it is semantics
>
> of course, thank you for the reminder.
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>



Date2012-04-29 15:03
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] bug in new parser?
Yes i was right
looks like it sets the "previously defined" flag too soon.  Staring at the
code
==John

> I agree it is wrong.  Not had time to search for it yet but I suspect that
> a1 = a1*0,1 is not caught but
> a1 = aaaa*0,1 is
>
> the message can still apear I think.  Will get onto it soon
>
> ==John ff
>>
>


Date2012-04-29 19:05
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] bug in new parser?
> Yes i was right
> looks like it sets the "previously defined" flag too soon.  Staring at the
> code

Short update.  There is a note in the code remarking that it is wrong but
so far have not managed to work out how to fix.  Basically it marks the
lhs of an assignment as in use before analysing the rhs,  so your example
is not caught but similar errors are

Back to staring at the code

==John


Date2012-04-29 19:46
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] bug in new parser?
I have committed a change that I think fixes this non-error report.

Passed my tesys but as ever, caution,

==John ff

PS WIll fix in CS6 soon as well



Date2012-05-01 00:02
FromSteven Yi
SubjectRe: [Csnd] bug in new parser?
After pulling from git, I ran into a crash with argtyp2. I think it
might be due to the fix, but am investigating now.

On Sun, Apr 29, 2012 at 7:46 PM,   wrote:
> I have committed a change that I think fixes this non-error report.
>
> Passed my tesys but as ever, caution,
>
> ==John ff
>
> PS WIll fix in CS6 soon as well
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-05-01 01:20
FromSteven Yi
SubjectRe: [Csnd] bug in new parser?
I'm not sure what the rationale was in the fix; reverting to before
the fix got rid of the crash.

On Tue, May 1, 2012 at 12:02 AM, Steven Yi  wrote:
> After pulling from git, I ran into a crash with argtyp2. I think it
> might be due to the fix, but am investigating now.
>
> On Sun, Apr 29, 2012 at 7:46 PM,   wrote:
>> I have committed a change that I think fixes this non-error report.
>>
>> Passed my tesys but as ever, caution,
>>
>> ==John ff
>>
>> PS WIll fix in CS6 soon as well
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>