Matt Wette writes: Hi Matt!
Find small bugfix for GOTO attached. I'm making some progress with Mescc. The compiler layout starts to make some sense now and after getting function calls and parameters in place and many special cases for call/if/for/when it seems that I finally have an idea that works for handling tests and expressions. So, now I'm starting list of tests that uses goto, which i'll need anyway for the core evaluator. Greetings, Jan.
>From 19310561509a9c8babd57e0067d49b10980cf388 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sat, 7 Jan 2017 12:00:59 +0100 Subject: [PATCH] bugfix: unquoto goto label. * module/nyacc/lang/c99/mach.d/c99act.scm (act-v): Unquote goto label. --- module/nyacc/ChangeLog | 5 +++++ module/nyacc/lang/c99/mach.d/c99act.scm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/nyacc/ChangeLog b/module/nyacc/ChangeLog index 1b08290..549a544 100644 --- a/module/nyacc/ChangeLog +++ b/module/nyacc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-07 Jan Nieuwenhuizen <jann...@gnu.org> + + * module/nyacc/lang/c99/mach.d/c99act.scm (act-v): Unquote goto + label. + 2017-01-02 Matt Wette <mwe...@alumni.caltech.edu> * lang/c99/cppbody.scm (expand-cpp-mref): skip ws between ident diff --git a/module/nyacc/lang/c99/mach.d/c99act.scm b/module/nyacc/lang/c99/mach.d/c99act.scm index 10b5ffe..17f3f43 100644 --- a/module/nyacc/lang/c99/mach.d/c99act.scm +++ b/module/nyacc/lang/c99/mach.d/c99act.scm @@ -690,7 +690,7 @@ ;; opt-expression => expression (lambda ($1 . $rest) $1) ;; jump-statement => "goto" identifier ";" - (lambda ($3 $2 $1 . $rest) `(goto $2)) + (lambda ($3 $2 $1 . $rest) `(goto ,$2)) ;; jump-statement => "continue" ";" (lambda ($2 $1 . $rest) '(continue)) ;; jump-statement => "break" ";" -- 2.10.2
-- Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl