[D66] Wetenschap is het geloof in de onwetendheid van experts: de computertaal strings
René Oudeweg
roudeweg at gmail.com
Sun Jan 15 18:38:52 CET 2023
Nerds,
Ik ga het eens proberen met pacc:
https://paccrat.org/
a compiler compiler
generereert van PEG grammar een packrat parser.
https://en.wikipedia.org/wiki/Parsing_expression_grammar
Ik strip gewoon de numerical literals, de class en de lambda uit de
python PEG grammar, eens kijken hoe ver ik met mn python-- aka strings68
kom ... :)
Het wordt dus geen C-achtige taal, maar python-achtig met identing ipv
brackets voor codeblokken.
ipv
if __name__ == "__main__":
do_iets()
while(1) :
print("8")
wordt het:
// 6 is the keyword for the main entry code block for the program
// 8 is the keyword for a repeating infinite loop
// 1 is the keyword for initialization block
// 9 is the keyword for the exit cleanup code block
1:
a="foobar" // global static string
6:
do_iets()
8:
print "8"
9:
print "exiting"
Hopelijk een beta versie voor 1 April...
R.O.
On 1/15/23 14:19, René Oudeweg wrote:
>
> Pardon,
>
> Er zijn geen getallen in de computertaal strings, dus het onderstaande
> kan niet.
>
>
> R.O.
>
>
> On 1/15/23 14:16, René Oudeweg wrote:
>>
>> Het karakter '6' is ook gereserveerd als keyword in de taal strings.
>>
>> 6(12) {
>>
>> print "foo";
>>
>> }
>>
>>
>> Dit betekent, herhaal de lus 12 keer.
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tuxtown.net/pipermail/d66/attachments/20230115/8423858c/attachment-0001.html>
More information about the D66
mailing list