You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Qilang
I've now been running same tests and made a couple of examples where
the focus have been in the Yacc part and the segment part of the code
as well as a General Streaming method.
as an example I did a parser for a toy lang. and then created a
modified list stream that
added the capabilities to let the line column and depth be kept in
sync with the cdr of a list.
I did this code,
(def cons-stat?
[[X|L] A B C] -> true
X -> false)
(def null-stat X -> [= (head X) []])
(def head-stat [[X|L]|U] -> X)
(def tail-stat
[[#\Newline|L] Col Row Dep] -> [L 0 (+ Row 1) Dep]
[[X |L] Col Row Dep] -> [L (+ Col 1) Row Dep])
Then there is a dynamic variable, e.g. *li* that can be used according
to
(let *li* lis Code) and the defines in the code will expand lists
acording to the lis
stream. Then I just modified the code slightly and voila the example
in test.reader.qi
worked. I got,