[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unquoted strings in BASIC
From: |
Maury Markowitz |
Subject: |
Re: Unquoted strings in BASIC |
Date: |
Sun, 1 Dec 2024 13:08:34 -0500 |
> On Dec 1, 2024, at 12:31 PM, EML <eml-bison@cyconix.com> wrote:
>
> This matches, among other things, a string which starts with a double quote,
> terminated by a newline, with no closing quote. Not even Basic can be that
> bad.
Sorry to be the bearer of bad news, but BASIC is precisely that bad. Since many
PRINTs were constants and the only statement on the line, leaving these off the
end of the line added up. They only had 786 bytes free on an IMSAI, every byte
was precious.
FOCAL did the same thing, and in that case I have several common programs that
did this, notably Hammurabi which didn't fit on a PDP-8 otherwise.
> This matches a single '.', '.E0', and so on.
Both are valid in MS dialects. This project has been surprisingly educational!
> And why have you got 'yytext+1'? If you're trying to get rid of the leading
> quote, you also need a code block to get rid of the closing quote.
yytext[strlen(yytext) - 1] = '\0';
Seems to do the trick, I'm definitely not getting trailing quotes in my
strings, nor clipping the last char.
> And note that you only need one caret (^),
Fixed!
> This will probably require you to take into account the current context; see
> Hans's reply.
Yeah, I am completely new to that side of things. I'm in the bison dox now and
I can't say I'm understanding much yet.
Hmmm, just noticed Mail is addressing this to people, not the list. Annoying.
- Unquoted strings in BASIC, Maury Markowitz, 2024/12/01
- Re: Unquoted strings in BASIC, Hans Åberg, 2024/12/01
- Re: Unquoted strings in BASIC, EML, 2024/12/01
- Re: Unquoted strings in BASIC,
Maury Markowitz <=
- Re: Unquoted strings in BASIC, James K. Lowden, 2024/12/01
- Re: Unquoted strings in BASIC, Maury Markowitz, 2024/12/01
- Re: Unquoted strings in BASIC, Hans Åberg, 2024/12/02
- Re: Unquoted strings in BASIC, James K. Lowden, 2024/12/02
- Re: Unquoted strings in BASIC, Hans Åberg, 2024/12/02
- Re: Unquoted strings in BASIC, Maury Markowitz, 2024/12/03
- Re: Unquoted strings in BASIC, Hans Åberg, 2024/12/03
- Re: Unquoted strings in BASIC, James K. Lowden, 2024/12/04
- Re: Unquoted strings in BASIC, Hans Åberg, 2024/12/04