andmarti1424 / sc-im

sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Other
4.77k stars 201 forks source link

K_FMT and S_FMT are the same ? #836

Open mingodad opened 11 months ago

mingodad commented 11 months ago

Is it intentional ?

I just added the sc-im grammar to https://mingodad.github.io/parsertl-playground/playground/ an online yacc/lex editor/tester and noticed that K_FMT and S_FMT are equal to fmt and the parser was not parsing properly the S_FMT command because it was recognizing K_FMT instead, so temporarily I changed K_FMT to kfmt to allow to parse the a.sc example.

On https://mingodad.github.io/parsertl-playground/playground/ select SC-im spreadsheet parser from Examples then click Parse to see the parser tree.

andmarti1424 commented 11 months ago

Hello. I am not yacc expert but seems that S are definitions for commands, while K are definitions for funcitions..

mingodad commented 11 months ago

Thank you for pointing out ! Looking again in the code, I found a place where it choose experres or statres but I need to look in more depth to find a way to express it in a way that's accepted by playground.