Csound Csound-dev Csound-tekno Search About

[Csnd] Parser error?

Date2013-11-11 09:11
FromMarco Stroppa
Subject[Csnd] Parser error?
Dear Csounders,

I wonder whether something has changed in the new parser of Csound 6.
The following line compiles without problems in 5.19:

iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))

while in Csound 6 the error below is displayed.

error: syntax error, unexpected '(', expecting ':'  (token "(") line 23:
>>>iamp         = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs ( <<<
Parsing failed due to invalid input!
WARNING: Stopping on parser failure

Any cues, please, about how to solve the problem?

Thank you very much in advance.

Marco


Date2013-11-11 09:21
Fromfrancesco
Subject[Csnd] Re: Parser error?
Hello Marco,
i guess it has something to do with bracket.
Try to remove space before bracket, perhaps here:
ampdbfs (p4), i.e. ampdbfs(p4).

If i am correct ... 

Csound6 has problems with space before bracket due to new 
functional use of opcodes (ok, maybe this is not the right way to say).
Anyway should be that. Maybe.

ciao,
francesco.
 




--
View this message in context: http://csound.1045644.n5.nabble.com/Parser-error-tp5729441p5729442.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-11-11 09:23
FromVictor Lazzarini
SubjectRe: [Csnd] Parser error?
Try taking out space between ampdbfs and (p4), that is not parsing in Csound 6.

On 11 Nov 2013, at 09:11, Marco Stroppa  wrote:

> Dear Csounders,
> 
> I wonder whether something has changed in the new parser of Csound 6.
> The following line compiles without problems in 5.19:
> 
> iamp 		= (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))
> 
> while in Csound 6 the error below is displayed.
> 
> error: syntax error, unexpected '(', expecting ':'  (token "(") line 23:
> >>>iamp         = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs ( <<<
> Parsing failed due to invalid input!
> WARNING: Stopping on parser failure
> 
> Any cues, please, about how to solve the problem?
> 
> Thank you very much in advance.
> 
> Marco
> 



Date2013-11-11 09:40
FromLuis Antunes Pena
SubjectRe: [Csnd] Parser error?
I had similar errors too. I think the problem is with the space between ampdbfs and the next bracket. Instead of (ampdbfs (p4) try (ampdbfs(p4)
Luis

Am 11.11.13 10:11, schrieb Marco Stroppa:
Dear Csounders,

I wonder whether something has changed in the new parser of Csound 6.
The following line compiles without problems in 5.19:

iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))

while in Csound 6 the error below is displayed.

error: syntax error, unexpected '(', expecting ':'  (token "(") line 23:
>>>iamp         = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs ( <<<
Parsing failed due to invalid input!
WARNING: Stopping on parser failure

Any cues, please, about how to solve the problem?

Thank you very much in advance.

Marco



--
signatur luis antunes pena
Severinswall 54
D-50678 Köln

http://luisantunespena.eu

+49 (0)221 29020757
+49 (0)176 968 09 867 (mobile)