90 lines
2.4 KiB
Org Mode
90 lines
2.4 KiB
Org Mode
-*-mode:org-*-
|
|
|
|
* minimal bootstrap binary, via Scheme, into C compiler/linker
|
|
** core: mes.c
|
|
*** make mes.c smaller
|
|
**** replace mes.c:quasiquote by quasiquote.mes
|
|
***** SPEEDUP
|
|
**** cleanup environment/closures
|
|
*** make mes.c faster
|
|
*** use GC
|
|
*** move from C to hex/assembly
|
|
|
|
** bugs
|
|
See bugs/
|
|
|
|
*** find/fix hygiene problem: see lib/match.scm ;; X vs x
|
|
Is it in let, define-syntax, match or intrinsically in define-macro?
|
|
|
|
** parse C using PEG
|
|
http://piumarta.com/software/peg/
|
|
*** Simple Guile test:
|
|
make guile-peg
|
|
*** PEG on Mes does not work yet:
|
|
make peg
|
|
**** syntax-case
|
|
***** portable syntax-case Andre van Tonder
|
|
***** psyntax.pp
|
|
***** hook-up sc-expand, see guile-1.0?: scheme:eval-transformer
|
|
Find out how to hook-up sc-expand in eval/apply.
|
|
|
|
** parse C using LALR
|
|
*** Translate cgram.y into lalr, generate AST
|
|
*** 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
|
|
*** any, each?
|
|
|
|
|
|
* assorted info
|
|
** ASM
|
|
http://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html
|
|
|
|
Basically, you issue an int 0x80, with the __NR_syscallname number
|
|
(from asm/unistd.h) in eax, and parameters (up to six) in ebx, ecx,
|
|
edx, esi, edi, ebp respectively.
|
|
|
|
** ELF
|
|
7f 45 4c 46
|
|
|
|
http://www.muppetlabs.com/~breadbox/software/tiny/
|
|
|
|
http://www.cirosantilli.com/elf-hello-world/
|
|
|
|
** SCM
|
|
http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/scm2e.tar.Z
|
|
wget http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/scm3c13.tar.Z
|
|
http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/scm4a5.tar.Z
|
|
|
|
http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/scm5a1.tar.gz --> syntax-rules
|
|
http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/scm5c0.tar.gz
|
|
|
|
|
|
define-
|
|
|
|
http://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
|
|
|
http://www.cs.indiana.edu/chezscheme/syntax-case/
|
|
|
|
1.4..2.9:
|
|
http://groups.csail.mit.edu/mac/ftpdir/siod/
|
|
|
|
http://groups.csail.mit.edu/mac/ftpdir/s48/archive/scheme48-0-21.tar.gz
|
|
|
|
Macros:
|
|
http://www.bcl.hamilton.ie/~barak/teach/F97/CS257/macros.html
|
|
|
|
|
|
syntax-case/syntax-rules in clojure
|
|
https://github.com/qbg/syntax-rules/blob/master/src/qbg/syntax_rules.clj
|