#Zinc, a systems programming language prototype
Zinc is my attempt at a low-level systems programming language prototype.
I found this parser, called Owl mirrored here, that generates parsers for visibly pushdown languages.
Visibly pushdown languages are those where recursion to other grammar productions must be guarded by tokens which can only be used for that purpose.
While somewhat limiting, this ends up meaning that all grammar productions that can “contain” other productions are wrapped in certain tokens and so the language is visually easier to parse.
And it runs in linear time.
mut i = 0
def n = 10
while 0 <= i < n {
def x = call rndi()
if i = 0 {
; verify that the fixed seed rng is working as expected
assert "rndi() = 13109595": x = 13109595
}
call puti(x)
call putc(10)
set i = i + 1
}
return i