2016-07-10 13:31:45 +00:00
|
|
|
-*-mode:org-*-
|
2016-07-17 13:00:47 +00:00
|
|
|
* define-syntax and syntax-rules
|
|
|
|
** syntax.mes
|
2016-07-22 15:13:51 +00:00
|
|
|
Using define-macro-based version.
|
|
|
|
** psyntax.pp
|
|
|
|
Find out how to hook-up sc-expand in eval/apply.
|
2016-07-17 13:00:47 +00:00
|
|
|
** bugs
|
2016-07-22 20:12:05 +00:00
|
|
|
See bugs/
|
2016-07-17 13:00:47 +00:00
|
|
|
** run PEG
|
2016-07-22 23:38:25 +00:00
|
|
|
*** Simple Guile test:
|
|
|
|
make guile-peg
|
|
|
|
*** PEG on Mes does not work yet:
|
|
|
|
make peg
|
|
|
|
**** v define-syntax-rule
|
|
|
|
**** v assq-ref
|
|
|
|
**** v assq-set!
|
|
|
|
**** datum->syntax
|
|
|
|
**** syntax->datum
|
|
|
|
**** syntax-case
|
2016-07-17 13:00:47 +00:00
|
|
|
** parse C using PEG
|
|
|
|
http://piumarta.com/software/peg/
|
2016-07-23 12:39:33 +00:00
|
|
|
** C grammar in lex/yacc
|
|
|
|
https://github.com/rabishah/Mini-C-Compiler-using-Flex-And-Yacc
|
|
|
|
https://www.lysator.liu.se/c/ANSI-C-grammar-y.html
|
|
|
|
http://www2.cs.uidaho.edu/~jeffery/courses/nmsu/370/cgram.y
|
|
|
|
https://github.com/ProgramLeague/C-Compilerp
|
|
|
|
*** parsing in scheme
|
|
|
|
ftp://ftp.cs.indiana.edu/pub/scheme-repository/code/lang/cgram-ll1
|
|
|
|
** Tiny C
|
|
|
|
https://en.wikipedia.org/wiki/Tiny_C_Compiler
|
|
|
|
** Sub C
|
|
|
|
http://www.t3x.org/subc/index.html
|
|
|
|
**
|
|
|
|
https://groups.google.com/forum/#!topic/comp.lang.lisp/VPuX0VsjTTE
|
2016-07-10 13:31:45 +00:00
|
|
|
** implement core primitives: DONE
|
|
|
|
begin
|
|
|
|
define
|
|
|
|
if
|
|
|
|
lambda
|
|
|
|
letrec
|
|
|
|
quote
|
|
|
|
set!
|
2016-07-17 13:00:47 +00:00
|
|
|
** implement minimal needed for psyntax.pp:
|
2016-07-10 20:43:23 +00:00
|
|
|
v "string"
|
2016-07-11 08:38:02 +00:00
|
|
|
v #(v e c t o r)
|
2016-07-10 13:31:45 +00:00
|
|
|
#\CHAR
|
2016-07-11 08:48:25 +00:00
|
|
|
v assq
|
2016-07-11 17:32:11 +00:00
|
|
|
v call-with-values
|
2016-07-10 22:15:28 +00:00
|
|
|
v char?
|
2016-07-17 20:35:00 +00:00
|
|
|
v for-each
|
2016-07-10 22:21:45 +00:00
|
|
|
v length
|
2016-07-10 22:15:28 +00:00
|
|
|
v list
|
2016-07-11 08:38:02 +00:00
|
|
|
v list->vector
|
|
|
|
v make-vector
|
2016-07-11 09:05:17 +00:00
|
|
|
v memq
|
|
|
|
v memv
|
2016-07-10 22:15:28 +00:00
|
|
|
v string
|
2016-07-10 20:43:23 +00:00
|
|
|
v string-append
|
|
|
|
v string?
|
2016-07-10 22:15:28 +00:00
|
|
|
v symbol?
|
2016-07-11 17:32:11 +00:00
|
|
|
v values
|
2016-07-11 08:38:02 +00:00
|
|
|
v vector
|
|
|
|
v vector->list
|
|
|
|
v vector-length
|
|
|
|
v vector-ref
|
|
|
|
v vector-set!
|
|
|
|
v vector?
|
2016-07-11 20:16:11 +00:00
|
|
|
v procedure?
|
2016-07-17 20:35:00 +00:00
|
|
|
*** any, each?
|
|
|
|
*** hook-up sc-expand, see guile-1.0?: scheme:eval-transformer
|
|
|
|
*** implement extras:
|
|
|
|
v (gensym)
|
2016-07-17 13:00:47 +00:00
|
|
|
** implement minimal needed for define-macro-based define-syntax
|
|
|
|
v char?
|
|
|
|
v assq
|
|
|
|
v define-macro
|
2016-07-17 20:35:00 +00:00
|
|
|
v equal?
|
|
|
|
v member
|
2016-07-17 13:00:47 +00:00
|
|
|
v let loop
|
|
|
|
v nested define-macro
|
|
|
|
v nested define
|
|
|
|
v boolean?
|
|
|
|
v list?
|
|
|
|
v <=, >=
|
|
|
|
v string->symbol
|
|
|
|
v and
|
|
|
|
v or
|
|
|
|
v ,@ unquote-splicing
|