guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libguile/eval.c: parse failed on input "x37" [WAS: [ANN] nyacc 0.80.3 re


From: Jan Nieuwenhuizen
Subject: libguile/eval.c: parse failed on input "x37" [WAS: [ANN] nyacc 0.80.3 released]
Date: Mon, 24 Jul 2017 14:59:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Matt Wette writes:

The below condensed excerpt from Guile's eval.c gives

    (unknown):1: parse failed at state 299, on input "x37"
    scaffold/tests/t.c:55: C99 parse error

This looks pretty tricky and I'm not really working on this atm, just
thought to let you know.

Greetings,
janneke


typedef int scm_t_bits;
typedef int scm_t_cell;
typedef int *SCM;

#define SCM_UNPACK(x) ((scm_t_bits) (x))
#define SCM_UNPACK_POINTER(x) ((scm_t_bits *) (SCM_UNPACK (x)))
#define SCM_PACK_POINTER(x) (SCM_PACK ((scm_t_bits) (x)))
#define SCM2PTR(x) ((scm_t_cell *) (SCM_UNPACK_POINTER (x)))
#define SCM_GC_CELL_OBJECT(x, n) (((SCM *)SCM2PTR (x)) [n])
#define SCM_GC_CELL_WORD(x, n)   (SCM_UNPACK (SCM_GC_CELL_OBJECT ((x), (n))))
#define SCM_CELL_WORD(x, n) SCM_GC_CELL_WORD ((x), (n))
#define SCM_CELL_WORD_0(x) SCM_CELL_WORD ((x), 0)
#define SCM_CELL_TYPE(x) SCM_CELL_WORD_0 (x)


#define SCM_IMP(x)              (6 & SCM_UNPACK (x))
#define SCM_NIMP(x)             (!SCM_IMP (x))
#define SCM_HEAP_OBJECT_P(x)    (SCM_NIMP (x))

#define SCM_TYP7(x)             (0x7f & SCM_CELL_TYPE (x))
#define SCM_HAS_HEAP_TYPE(x, type, tag)                         \
  (SCM_NIMP (x) && type (x) == (tag))
#define SCM_HAS_TYP7(x, tag)    (SCM_HAS_HEAP_TYPE (x, SCM_TYP7, tag))
#define scm_tc7_atomic_box      0x37

int
main ()
{
  return SCM_HAS_TYP7 (0, scm_tc7_atomic_box);
}

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]