CordyJ / Open-TuringPlus

Open Turing+ programming language compiler
Other
8 stars 2 forks source link

Where to find more info about "tssl" ? #4

Closed mingodad closed 4 months ago

mingodad commented 4 months ago

Looking through the code I can see that the grammar/parser seems to generated with the tssl command but I can't find anything in the documentation about it and it's format.

There is some comments in src/tssl/ssl.ssl and src/tssl/ssl.t but would be nice to have an overview of it and also it's grammar.

CordyJ commented 4 months ago

https://en.wikipedia.org/wiki/S/SL_programming_language https://dl.acm.org/doi/10.1145/357162.357164

mingodad commented 4 months ago

Thank you for reply and the links !

mingodad commented 4 months ago

I now found that:

CordyJ commented 4 months ago

I now found that:

Watcon has nothing to do with S/SL, that I'm aware of.

The C one is simply the standard C implementation of S/SL. The original was in Pascal, and the one used in Turing+ is in Turing. You can only use the Turing one (tssl) with Turing+.

mingodad commented 4 months ago

It seems that watcom extended S/SL with preprocessing capabilities and use it to generate code in some places like here https://github.com/open-watcom/open-watcom-v2/blob/master/bld/wv/ssl/pp_c.ssl .

Thank you for adding the documentation here !

mingodad commented 4 months ago

Testing the tssl with src/scanparse/parse.ssl we get several warnings, I understand that there is a return (>>) on the cycles. Is this the expected output ?

Line 888: (Warning) Cycle does not contain a cycle exit
Line 1158: (Warning) Cycle does not contain a cycle exit
Line 1207: (Warning) Cycle does not contain a cycle exit
Line 1502: (Warning) Cycle does not contain a cycle exit
Line 1872: (Warning) Cycle does not contain a cycle exit
Line 2123: (Warning) Cycle does not contain a cycle exit
Line 2382: (Warning) Cycle does not contain a cycle exit
Line 2446: (Warning) Cycle does not contain a cycle exit
Line 2669: (Warning) Cycle does not contain a cycle exit
Line 2682: (Warning) Cycle does not contain a cycle exit
Line 2899: (Warning) Cycle does not contain a cycle exit
Line 2987: (Warning) Cycle does not contain a cycle exit
Line 3050: (Warning) Cycle does not contain a cycle exit
Line 3383: (Warning) Cycle does not contain a cycle exit
Line 3412: (Warning) Cycle does not contain a cycle exit
Line 3453: (Warning) Cycle does not contain a cycle exit
Line 3599: (Warning) Cycle does not contain a cycle exit
Line 3967: (Warning) Cycle does not contain a cycle exit
Line 3992: (Warning) Cycle does not contain a cycle exit
Line 4230: (Warning) Cycle does not contain a cycle exit
Line 4529: (Warning) Cycle does not contain a cycle exit
Line 4686: (Warning) Cycle does not contain a cycle exit
Line 4700: (Warning) Cycle does not contain a cycle exit
Line 4714: (Warning) Cycle does not contain a cycle exit
Line 4766: (Warning) Cycle does not contain a cycle exit
Line 4787: (Warning) Cycle does not contain a cycle exit
Line 4820: (Warning) Cycle does not contain a cycle exit
Line 4831: (Warning) Cycle does not contain a cycle exit
Line 5044: (Warning) Cycle does not contain a cycle exit
CordyJ commented 4 months ago

Is this the expected output ?

Yes.