slviajero / tinybasic

A BASIC interpreter for Arduino, ESP, RP2040, STM32, Infineon XMC and POSIX with IoT and microcontroller features.
GNU General Public License v3.0
203 stars 31 forks source link

ECMA55 test with numebrs beginning with a "." fail #17

Closed EncomLab closed 2 years ago

EncomLab commented 2 years ago

Any number starting with a decimal point causes a syntax error. For example PRINT 2+.2 causes a syntax error.

EncomLab commented 2 years ago

Further testing shows that this can be avoided by using a leading "0". Probably not worth fixing but maybe worth a note in the documentation.

slviajero commented 2 years ago

Thank you for the comment. Yes, indeed something that should be changed. It really comes because I extended integer to float and simply did this by adding a . and then another number and then E and again another number to the grammar.

Am 18.06.2022 um 02:30 schrieb Encom Lab @.***>:

Further testing shows that this can be avoided by using a leading "0". Probably not worth fixing but maybe worth a note in the documentation.

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/17#issuecomment-1159318073, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56BSSFH5O4LLPVGPOCDVPUKAXANCNFSM5ZD3SCTA. You are receiving this because you are subscribed to this thread.

slviajero commented 2 years ago

Corrected and pushed. The code can now parse .2 correctly in input and commands. Side effects not fully tested. Little oddity a=. assigns 0 to a now because . is seen as a number.

Am 18.06.2022 um 02:30 schrieb Encom Lab @.***>:

Further testing shows that this can be avoided by using a leading "0". Probably not worth fixing but maybe worth a note in the documentation.

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/17#issuecomment-1159318073, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56BSSFH5O4LLPVGPOCDVPUKAXANCNFSM5ZD3SCTA. You are receiving this because you are subscribed to this thread.

EncomLab commented 2 years ago

I am working my way through all 208 ECMA55 test cases and will share the spreadsheet of my findings. I am running the software on an ATMega 1284 SBC with an SD card, DS3231 rtc and 24C256 external eeprom.

slviajero commented 2 years ago

Super cool, actually I wanted to build a 1284 board myself. As to the ECMA55 tests - I expect many to fail. Have done too many evil things. Thanks again!

Am 18.06.2022 um 18:51 schrieb Encom Lab @.***>:

I am working my way through all 208 ECMA55 test cases and will share the spreadsheet of my findings. I am running the software on an ATMega 1284 SBC with an SD card, DS3231 rtc and 24C256 external eeprom.

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/17#issuecomment-1159514305, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56EHA662W3RFEEJ6F3TVPX5CZANCNFSM5ZD3SCTA. You are receiving this because you commented.