Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Syntax error with :
Victor Lazzarini <[email protected]> Tue, 28 Oct 2025 15:51:11 +0000
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <[email protected]> |
I can try that. Prof. Victor Lazzarini Maynooth University Ireland > On 28 Oct 2025, at 15:14, Steven Yi <[email protected]> wrote: > > I think we could try this: > > ^{IDENT}:/[ \t\n] { char *pp = yytext; > > to match at the start of the line only. > >> On Tue, Oct 28, 2025 at 4:44 AM Victor Lazzarini >> <[email protected]> wrote: >> >> Do you remember what version used to work? >> This I think is a lexer error, picked up here >> >> {IDENT}:/[ \t\n] { char *pp = yytext; >> while (*pp==' ' || *pp=='\t') pp++; >> *lvalp = make_label(csound, pp); return LABEL_TOKEN; >> } >> >> so it looks like it was there from the beginning of the new parser. >> >> Not sure how it could be disambiguated as anything forming that pattern is read as a label. >> I guess that rule would have to be changed not to make a label but something that could later be disambiguated in the parser. >> >> Prof. Victor Lazzarini >> Maynooth University >> Ireland >> >> On 27 Oct 2025, at 22:36, Eduardo Moguillansky <[email protected]> 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. >> This line gives an error: >> >> k2 = k0 > 0 ? k0: -1 >> >> error: syntax error, unexpected LABEL_TOKEN (token "k0:") from file xxx.csd (1) >> >> It is ok if the ":" has a space before the variable >> >> k2 = k0 > 0 ? k0 : -1 >> >> The code used to work some months ago, so this might be a recent change. I guess it should not be difficult to disambiguate the parsing, since a label should start a line. >> >> Thanks, >> Eduardo >> >> >>