Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Line continuation issue

Date2024-06-11 16:48
FromDave Seidel
Subject[Csnd-dev] Line continuation issue
Using develop, this code fails unless I add '\' after each line in the expression:

  aout = (adiff  * $CTL_COMBOS_DIFF1) + 
         (adiff2 * $CTL_COMBOS_DIFF2) + 
         (adiff3 * $CTL_COMBOS_DIFF3) + 
         (asum   * $CTL_COMBOS_SUM1)  + 
         (asum2  * $CTL_COMBOS_SUM2)  + 
         (aprod  * $CTL_COMBOS_PROD)

This seems like a regression to me. Is this a known parser issue, or should I make a new ticket?

Date2024-06-11 16:53
Fromvlz
SubjectRe: [Csnd-dev] Line continuation issue
yes, there is a ticket open on that exact issue,
#1886

As I said there are a few minor parser issues, and it's good time to figure out if there are others.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Jun 2024, at 16:48, Dave Seidel  wrote:
> 
> 
> Using develop, this code fails unless I add '\' after each line in the expression:
> 
>   aout = (adiff  * $CTL_COMBOS_DIFF1) + 
>          (adiff2 * $CTL_COMBOS_DIFF2) + 
>          (adiff3 * $CTL_COMBOS_DIFF3) + 
>          (asum   * $CTL_COMBOS_SUM1)  + 
>          (asum2  * $CTL_COMBOS_SUM2)  + 
>          (aprod  * $CTL_COMBOS_PROD)
> 
> This seems like a regression to me. Is this a known parser issue, or should I make a new ticket?

Date2024-06-11 16:55
FromDave Seidel
SubjectRe: [Csnd-dev] Line continuation issue
OK, cool. This is the only parser issue I've seen. When I add the continuation char (three places in my code), it runs. 

On Tue, Jun 11, 2024 at 11:53 AM vlz <viclazzarini@gmail.com> wrote:
yes, there is a ticket open on that exact issue,
#1886

As I said there are a few minor parser issues, and it's good time to figure out if there are others.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Jun 2024, at 16:48, Dave Seidel <dave.seidel@gmail.com> wrote:
>
> 
> Using develop, this code fails unless I add '\' after each line in the expression:
>
>   aout = (adiff  * $CTL_COMBOS_DIFF1) +
>          (adiff2 * $CTL_COMBOS_DIFF2) +
>          (adiff3 * $CTL_COMBOS_DIFF3) +
>          (asum   * $CTL_COMBOS_SUM1)  +
>          (asum2  * $CTL_COMBOS_SUM2)  +
>          (aprod  * $CTL_COMBOS_PROD)
>
> This seems like a regression to me. Is this a known parser issue, or should I make a new ticket?

Date2024-06-11 17:12
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] Line continuation issue
That's great, thanks.
Prof. Victor Lazzarini
Maynooth University
Ireland

On 11 Jun 2024, at 16:56, Dave Seidel <dave.seidel@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

OK, cool. This is the only parser issue I've seen. When I add the continuation char (three places in my code), it runs. 

On Tue, Jun 11, 2024 at 11:53 AM vlz <viclazzarini@gmail.com> wrote:
yes, there is a ticket open on that exact issue,
#1886

As I said there are a few minor parser issues, and it's good time to figure out if there are others.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 11 Jun 2024, at 16:48, Dave Seidel <dave.seidel@gmail.com> wrote:
>
> 
> Using develop, this code fails unless I add '\' after each line in the expression:
>
>   aout = (adiff  * $CTL_COMBOS_DIFF1) +
>          (adiff2 * $CTL_COMBOS_DIFF2) +
>          (adiff3 * $CTL_COMBOS_DIFF3) +
>          (asum   * $CTL_COMBOS_SUM1)  +
>          (asum2  * $CTL_COMBOS_SUM2)  +
>          (aprod  * $CTL_COMBOS_PROD)
>
> This seems like a regression to me. Is this a known parser issue, or should I make a new ticket?

Date2024-06-12 20:42
Fromjohn
SubjectRe: [Csnd-dev] Line continuation issue
Some thoughts.....

Looking at Engine/csound_orc.lex in cs6 the lexing of '+' is

"+"{OPTWHITE}"\n"? {
                      if (UNLIKELY(strchr(yytext, '\n')))

csound_orcset_lineno(1+csound_orcget_lineno(yyscanner),
                                             yyscanner);
                      return '+';
                    }

So the whte space after the plus is removed. So Dave's Code becomes 
  aout = (adiff  * $CTL_COMBOS_DIFF1) + (adiff2 * $CTL_COMBOS_DIFF2) +



And so e dse what we get in cs6

.  Compare this with the Engine.csound_orc.lex in cs7
On Tue, 11 Jun 2024, Dave Seidel wrote:

> Using develop, this code fails unless I add '\' after each line in the
> expression:
>   aout = (adiff  * $CTL_COMBOS_DIFF1) + 
>          (adiff2 * $CTL_COMBOS_DIFF2) + 
>          (adiff3 * $CTL_COMBOS_DIFF3) + 
>          (asum   * $CTL_COMBOS_SUM1)  + 
>          (asum2  * $CTL_COMBOS_SUM2)  + 
>          (aprod  * $CTL_COMBOS_PROD)
> 
> This seems like a regression to me. Is this a known parser issue, or should
> I make a new ticket?
> 
>

I cannot find the selfsame ode nor a version.  cs6 uses more Flex formats 
but I think it is lost.

Who wrote the cs7 lexer?  Was not me and  do not follow it.

On the other hand mu Head is hurting so thinking is hard

==John ff

Date2024-06-12 21:38
Fromvlz
SubjectRe: [Csnd-dev] Line continuation issue
Steven wrote it. Can we add that whitespace removal to it and see if it does the trick?

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 12 Jun 2024, at 20:42, john  wrote:
> 
> Some thoughts.....
> 
> Looking at Engine/csound_orc.lex in cs6 the lexing of '+' is
> 
> "+"{OPTWHITE}"\n"? {
>                     if (UNLIKELY(strchr(yytext, '\n')))
> 
> csound_orcset_lineno(1+csound_orcget_lineno(yyscanner),
>                                            yyscanner);
>                     return '+';
>                   }
> 
> So the whte space after the plus is removed. So Dave's Code becomes   aout = (adiff  * $CTL_COMBOS_DIFF1) + (adiff2 * $CTL_COMBOS_DIFF2) +
> 
> 
> 
> And so e dse what we get in cs6
> 
> .  Compare this with the Engine.csound_orc.lex in cs7
>> On Tue, 11 Jun 2024, Dave Seidel wrote:
>> 
>> Using develop, this code fails unless I add '\' after each line in the
>> expression:
>>   aout = (adiff  * $CTL_COMBOS_DIFF1) + 
>>          (adiff2 * $CTL_COMBOS_DIFF2) + 
>>          (adiff3 * $CTL_COMBOS_DIFF3) + 
>>          (asum   * $CTL_COMBOS_SUM1)  + 
>>          (asum2  * $CTL_COMBOS_SUM2)  + 
>>          (aprod  * $CTL_COMBOS_PROD)
>> This seems like a regression to me. Is this a known parser issue, or should
>> I make a new ticket?
>> 
> 
> I cannot find the selfsame ode nor a version.  cs6 uses more Flex formats but I think it is lost.
> 
> Who wrote the cs7 lexer?  Was not me and  do not follow it.
> 
> On the other hand mu Head is hurting so thinking is hard
> 
> ==John ff