Commit Graph

605 Commits

Author SHA1 Message Date
Matt Wette 9559240282 nyacc: new release 0.75.5 2017-02-17 08:30:20 -08:00
Matt Wette 883a93ce60 nyacc: new release 0.74.4 2017-02-16 16:14:42 -08:00
Matt Wette f831edafe9 nyacc: minor cpp fixes 2017-02-16 16:12:40 -08:00
Matt Wette 5b34d2b2e7 nyacc: merge from 0.75.3 2017-02-16 11:03:11 -08:00
Matt Wette 16bf996c93 nyacc: new release 0.75.3 2017-02-16 06:26:10 -08:00
Matt Wette 2d35221753 nyacc: new release 0.75.2 2017-02-16 06:24:56 -08:00
Matt Wette 49a7200b72 nyacc: new release 0.75.1 2017-02-16 06:12:32 -08:00
Matt Wette 2b57b3dc6e nyacc: new release 0.74.0 2017-02-15 20:49:07 -08:00
Matt Wette 1ae749b25f nyacc: I think cpp is working now 2017-02-15 19:58:29 -08:00
Matt Wette 5baa7f33b1 nyacc: working cpp now, I hope 2017-02-14 19:24:59 -08:00
Matt Wette 8a821d03d6 nyacc: CPP not yet working for file mode 2017-02-12 14:29:18 -08:00
Matt Wette ea7f0b3a01 nyacc: working on cpp issues 2017-02-11 13:04:38 -08:00
Matt Wette d03ea06c84 nyacc: C99 CPP for code is better 2017-02-05 07:52:44 -08:00
Matt Wette e534225328 nyacc: starting to work on reframing 2017-01-20 14:51:55 -08:00
Matt Wette 85cb3731cc nyacc: more CPP fixes 2017-01-18 17:26:41 -08:00
Matt Wette 50fc6f6966 nyacc: redesign lang/c99/cppbocy.scm:scan-cpp-input 2017-01-17 05:50:45 -08:00
Jan Nieuwenhuizen f738d4381d mescc: Support goto in while body.
* module/language/c99/compiler.mes (ast->info): Support goto in while
  body.
* doc/examples/t.c (test): Test it.
2017-03-10 07:01:51 +01:00
Jan Nieuwenhuizen f612feec47 core+mini-mes: Move function name to struct function.
* module/language/c99/compiler.mes (expr->arg): Handle char arguments.
* doc/examples/cons-mes.c (struct function): Add name field.
* doc/examples/mini-mes.c: Likewise.
  (mes_builtins): Update.
* mes.c: Likewise.
* build-aux/mes-snarf.scm: Update.
2017-03-09 23:27:12 +01:00
Jan Nieuwenhuizen e9560e95a5 mescc: Support strings in struct initialization.
* module/mes/elf-util.mes (add-s:-prefix, drop-s:-prefix): New functions.
* module/mes/elf-util.scm: Export them.
* module/language/c99/compiler.mes (string->global): Add `s:' prefix
  to global strings.  Update users.
  (expr->arg): Update.
  (expr->accu): Handle string expressions.
  (initzer->global): New function.
  (struct-field): Handle string field.
* doc/examples/t.c: Test it.
* doc/examples/mini-mes.c: Use it.

dun!
2017-03-09 08:14:27 +01:00
Jan Nieuwenhuizen 64e73dcf29 mescc: Display sexps better.
* module/mes/elf.mes (make-elf): Only display data sections smaller
  than 200 bytes.
* doc/examples/mini-mes.c (simple_bload_env): Read mini-0-32.mes.
* doc/examples/cons-mes.c (display_): Support symbols and specials.
* doc/examples/tiny-mes.c: Likewise.
* lib.c:
* mes.c:
2017-03-07 22:33:59 +01:00
Jan Nieuwenhuizen dd52f580fb mescc: Compile all of mini-mes.
* module/language/c99/compiler.mes (case->jump-info): Support single statement.
* module/mes/elf-util.mes (function-prefix): Workaround for reversed
  functions.  FIXME!
* module/mes/elf.mes:
* scaffold/mini-mes.c (type_t): Rename FUNCTION to TFUNCTION for Nyacc.
  Add missing symbols.
  (eval_apply): Uncomment most.
* scaffold/tiny-mes.c:
* scaffold/cons-mes.c: Remove cruft.
2017-03-06 07:14:15 +01:00
Jan Nieuwenhuizen 78e70f9024 mescc: Support struct assignment.
* module/mes/libc-i386.mes (i386:base-address->accu-address,
  i386:accu+n, i386:base+n): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes (ast->info): Use them.
* doc/examples/t.c: Test them.
* doc/examples/cons-mes.c: Drop workarounds.
* doc/examples/mini-mes.c: Likewise.
* mes.c:
2017-03-02 20:26:13 +01:00
Jan Nieuwenhuizen 08ea0da745 mescc: Fix add, sub, lshift.
* module/language/c99/compiler.mes (expr->accu): Fix add, sub, lshift.
* doc/examples/t.c: Test them.
* doc/examples/cons-mes.c:
* doc/examples/mini-mes.c:
2017-03-02 20:19:53 +01:00
Jan Nieuwenhuizen c9b251616a mescc: Support any expression as arg.
* module/language/c99/compiler.mes (expr->arg): Also push parameter,
  always return info.
  (ast->info): Loop over args.  Fixes using function calls in arguments.
* module/mes/libc-i386.mes (i386:push-arg): Remove.
  (i386:call, i386:call-accu): Remove arguments parameter.
* doc/examples/t.c: Test it.
2017-02-27 07:50:33 +01:00
Jan Nieuwenhuizen 394a3925be mescc: Rename expr->accu*.
* module/language/c99/compiler.mes (expr->accu*): Rename from expr->accuX.
2017-03-02 06:41:19 +01:00
Jan Nieuwenhuizen 07c4b02fa3 mescc: Fixes for goto.
* module/mes/libc-i386.mes (XXjump): New function.
* module/mes/libc-i386.scm: Export it.
* module/language/c99/compiler.mes (case->jump-info, ast->info): Use it.
* scaffold/t.c: Test it.
* GNUmakefile (cons-mes): New target.
* scaffold/cons-mes.c: New file.
* scaffold/mini-mes.c:
2017-04-02 12:13:04 +02:00
Jan Nieuwenhuizen 184c9f2641 mescc: Mini-mes runs (cons 0 1) dump.
* module/mes/libc-i386.mes (i386:Xjump-z, i386:Xjump-c,
  i386:Xjump-nc): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes (case->jump-info, test-jump->info,
  ast->info): Use them.
* doc/examples/t.c: Test it.
* doc/examples/mini-mes.c: Run it.
2017-02-24 13:27:39 +01:00
Jan Nieuwenhuizen 70e4aec861 mescc: Run mini-mes.
* .gitignore: Ignore tiny-mes and tiny .mo's.
* doc/examples/tiny-mes.c: Simplify.
* doc/examples/mini-mes.c: Use simplifications from tiny-mes.
* doc/examples/t.c (read_test, struct_test): New functions.
  (test): Add tests for arena, g_cells globals.
* module/mes/elf-util.mes (dec->hex): New function.
  (lambda/label->list): Add text-address parameter.  Update callers.
* module/language/c99/compiler.mes (make, info, clone): Add init field.
  (.init): New function.
  (ident->accu): Add exceptions for globals.
* module/mes/elf-util.scm: Export it.
* module/mes/libc-i386.mes (i386:accu->base-ref,
  i386:byte-accu->base-ref, i386:accu->base-ref+n,
  i386:accu->global-ref, i386:global-ref->accu, i386:global-ref->base,
  i386:global-add, i386:global->accu):, i386:local-ref->accu,
  i386:local-ptr->accu, i386:local-ptr->base): New functions.
* module/mes/libc-i386.scm: Export them.
2017-01-29 15:22:39 +01:00
Jan Nieuwenhuizen 8692fa3bb8 doc: Add gdb assembly debugging info.
* HACKING: Add gdb assembly debugging info.
2017-01-22 14:16:22 +01:00
Jan Nieuwenhuizen 4d5ba83392 doc: Add fosdem talk.
* .gitignore: Ignore beamer/tex stuff.
* doc/fosdem/fosdem.org: New file.
* doc/fosdem/GuixSD.png: New file.
* doc/fosdem/LISP-1-5-page-13-bottom.png: New file.
* doc/fosdem/LISP-1.5-page-13-bottom.png: New file.
* doc/fosdem/LISP-1.5-page-13.pdf: New file.
* doc/fosdem/LISP-1.5-page-13.png: New file.
* doc/fosdem/beamercolorthemeX.sty: New file.
* doc/fosdem/beamerthemeX.sty: New file.
* doc/fosdem/bootstrap-graph.png: New file.
* doc/fosdem/egg.jpeg: New file.
* doc/fosdem/egg.png: New file.
* doc/fosdem/egg.xcf: New file.
* doc/fosdem/fosdem.pdf: New file.
* doc/fosdem/fsb-logo-guile-guix-gnu.png: New file.
* doc/fosdem/fsb-logo-guile-guix-gnu.xcf: New file.
* doc/fosdem/fsb-logo-guile-guix-mes.png: New file.
* doc/fosdem/fsb-logo-guile-guix-mes.xcf: New file.
* doc/fosdem/fsb-logo.png: New file.
* doc/fosdem/guix-build-bootstrap-tarballs.log: New file.
* doc/fosdem/html.sty: New file.
* doc/fosdem/mes.png: New file.
* doc/fosdem/mes.xcf: New file.
2017-01-21 16:15:34 +01:00
Jan Nieuwenhuizen 452b231645 mescc: bugfix: arg as function call.
* module/language/c99/compiler.mes (expr->arg):
2017-01-21 13:17:24 +01:00
Jan Nieuwenhuizen 61e14e6e24 mini-mes: gcc: run (cons 0 1). 2017-01-18 07:38:45 +01:00
Matt Wette e00d18b59f nyacc: new release 0.74.3 2017-01-15 08:51:21 -08:00
Matt Wette 50301b8fd7 nyacc: CPP working better now 2017-01-15 08:47:49 -08:00
Matt Wette 7e39956858 nyacc: something working 2017-01-14 15:16:28 -08:00
Matt Wette 532687f6d8 nyacc: still debugginug 2017-01-14 13:30:47 -08:00
Matt Wette bd3f15af64 nyacc: working # and ## I think, but lots of debug output too 2017-01-11 16:37:58 -08:00
Matt Wette 5652db7984 nyacc: exceptions worked on.. still need to fix # 2017-01-11 08:14:45 -08:00
Matt Wette d644043ef8 nyacc: new release 0.74.2 2017-01-10 20:10:32 -08:00
Matt Wette 91023edbf4 nyacc: fixed C99 use of 'defined XYZ' (no parens) 2017-01-10 20:06:28 -08:00
Matt Wette 09b9c41dba nyacc: merged master 2017-01-10 18:57:27 -08:00
Matt Wette cc5f5ac96f nyacc: working on fixes 2017-01-10 18:56:00 -08:00
Jan Nieuwenhuizen c210959c49 mescc: Read and display sexp dumped by mes.
* lib.c (dump)[MES_HACK]: Dump small hello-world sexp, to be handled by
* doc/examples/tiny-mes.c (display_): New function.
* module/mes/libc-i386.mes (i386:accu->base, i386:mem->accu,
  i386:mem+n->accu): New functions.
* module/mes/libc-i386.scm: Export them.
* GNUmakefile (mes-32): New target.
2017-01-10 20:05:47 +01:00
Jan Nieuwenhuizen 2bb9f2b818 mescc: Support global pointer assignments.
* module/mes/libc-i386.mes (base->accu-ref, local-ref->base): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes (base->ident-ref, ident-ref->base):
  New functions.
2017-01-17 18:57:41 +01:00
Jan Nieuwenhuizen bf9539c565 mescc: Add data as loadable ELF section.
* module/mes/elf.mes (make-elf): Add data as loadable section too.
2017-01-17 18:48:54 +01:00
Jan Nieuwenhuizen 11f7f67a45 mescc: Support switch.
* module/language/c99/compiler.mes (case->jump-info): New function.
  (ast->info): Use it.
* doc/examples/t.c (swits): Test it.
2017-01-17 19:03:08 +01:00
Jan Nieuwenhuizen 04218971c5 mescc: Handle enums.
* module/language/c99/compiler.mes (<types>, <constants>): New slots for info.
 (make, clone): Add them.
 (.types, .constants): New accessors.
2017-01-10 22:44:01 +01:00
Jan Nieuwenhuizen 961559f32e mescc: Update for.
* module/language/c99/compiler.mes (ast->info): Rewrite for to use
  test->jump->info.
2017-01-10 20:51:29 +01:00
Jan Nieuwenhuizen 5fae0f7bff scm: Add string-delete.
* module/srfi/srfi-13.mes (string-delete): New function.
2017-01-17 18:48:28 +01:00
Jan Nieuwenhuizen 6ffca4bf61 mescc: Add open/read C-tests.
* scaffold/m.c: New file.
* scaffold/tiny-mes.c: New file.
* GNUmakefile (m, tiny-mes): New targets.
* scaffold/micro-mes.c: Update gcc-libc bits.
* scaffold/mini-mes.c: Likewise.
2017-04-02 12:10:38 +02:00