syck doesn't build out of the box under FreeBSD-4.7 with its standard byacc.
I applied your new gram.y first. Compilation stops at:

byacc -d -d -t -v gram.y && mv y.tab.c gram.c
byacc: e - line 11 of "gram.y", syntax error
%pure-parser
^
*** Error code 1

If I comment this line out, it builds without further errors. But 'make
check' then fails:

$ make check
Making check in lib
Making check in tests
make  check-TESTS
....

OK (4 tests)

PASS: test-basic
Segmentation fault (core dumped)
FAIL: test-parse
===================
1 of 2 tests failed
===================
*** Error code 1

Here's the backtrace from the core dump:

$ gdb -c test-parse.core test-parse
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf

Core was generated by `test-parse'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  syck_hdlr_add_node (p=0x8057000, n=0x0) at handler.c:16
16          if ( ! n->id ) n->id = (p->handler)( p, n );
(gdb) bt
#0  syck_hdlr_add_node (p=0x8057000, n=0x0) at handler.c:16
#1  0x804a906 in yyparse (parser=0x8057000) at gram.y:230
#2  0x8048bc0 in TestSyckParseString (tc=0x80500a0) at Parse.c:95
#3  0x80491dd in CuTestRun (tc=0x80500a0) at CuTest.c:166
#4  0x80492c3 in CuSuiteRun (testSuite=0x8053000) at CuTest.c:211
#5  0x8048db2 in main () at Parse.c:155
#6  0x8048815 in _start ()
(gdb) p n
$1 = (SyckNode *) 0x0
(gdb) p p
$2 = (SyckParser *) 0x8057000

Regards,

Brian.