Re: Unquoted strings in BASIC
Hans Ã…berg <[email protected]> Mon, 2 Dec 2024 15:49:33 +0100
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
> On 2 Dec 2024, at 03:10, Maury Markowitz <[email protected]> = wrote: >=20 > I had managed to get to this point for testing the conditional states: >=20 > <DATA>[^0-9][A-Za-z]*[,:\n] { > yytext[strlen(yytext) - 1] =3D '\0'; > yylval.s =3D str_new(yytext + 1); > return STRING; > } Notice that start conditions are implemented as defines in Flex, so give = them unique names. Above you could not use =E2=80=9CDATA=E2=80=9D for = something else. As an example, I implemented arbitrary identifiers =E2=80=9C=E2=80=A6=E2=80= =9D using %x any_identifier here: = https://git.savannah.gnu.org/cgit/metalogic-inference.git/tree/src/databas= e-lexer.ll