* [ANN] NYACC version 0.79.4 is released
@ 2017-05-27 4:23 Matt Wette
2017-05-29 15:42 ` Matt Wette
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Matt Wette @ 2017-05-27 4:23 UTC (permalink / raw)
To: guile-user
NYACC version 0.79.4 is released.
This version adds updated documentation and install infrastructure.
It will install a draft nyacc-ug.info <http://nyacc-ug.info/> (user’s guide) file.
NYACC, for Not Yet Another Compiler Compiler!, is set of guile modules for
generating parsers and lexical analyzers. It also provides sample parsers
and pretty-printers using SXML trees as an intermediate representation.
NYACC maturity is beta level.
NYACC is free software; the full source distribution is available through
tarball repository:
https://download.savannah.gnu.org/releases/nyacc/
git repository:
git://git.savannah.nongnu.org/nyacc.git
home page and project page:
http://www.nongnu.org/nyacc
https://savannah.nongnu.org/projects/nyacc
For support see:
https://savannah.nongnu.org/support/?group=nyacc
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANN] NYACC version 0.79.4 is released
2017-05-27 4:23 [ANN] NYACC version 0.79.4 is released Matt Wette
@ 2017-05-29 15:42 ` Matt Wette
2017-05-29 15:54 ` Nala Ginrut
2017-06-03 7:03 ` Nyacc parse error tcc.h: DEF_BWL Jan Nieuwenhuizen
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-05-29 15:42 UTC (permalink / raw)
To: guile-user
> On May 26, 2017, at 9:23 PM, Matt Wette <matt.wette@gmail.com> wrote:
>
> NYACC version 0.79.4 is released.
>
> This version adds updated documentation and install infrastructure.
> It will install a draft nyacc-ug.info <http://nyacc-ug.info/> (user’s guide) file.
>
> NYACC, for Not Yet Another Compiler Compiler!, is set of guile modules for
> generating parsers and lexical analyzers. It also provides sample parsers
> and pretty-printers using SXML trees as an intermediate representation.
>
Hi All,
I just updated the user’s manual on the project site:
http://www.nongnu.org/nyacc/nyacc-ug.html <http://www.nongnu.org/nyacc/nyacc-ug.html>
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANN] NYACC version 0.79.4 is released
2017-05-29 15:42 ` Matt Wette
@ 2017-05-29 15:54 ` Nala Ginrut
2017-05-29 16:06 ` Matt Wette
0 siblings, 1 reply; 13+ messages in thread
From: Nala Ginrut @ 2017-05-29 15:54 UTC (permalink / raw)
To: Matt Wette; +Cc: Guile User
Cool! Is the JS parser strict to ES6?
2017年5月29日 下午11:42,"Matt Wette" <matt.wette@gmail.com>写道:
>
> > On May 26, 2017, at 9:23 PM, Matt Wette <matt.wette@gmail.com> wrote:
> >
> > NYACC version 0.79.4 is released.
> >
> > This version adds updated documentation and install infrastructure.
> > It will install a draft nyacc-ug.info <http://nyacc-ug.info/> (user’s
> guide) file.
> >
> > NYACC, for Not Yet Another Compiler Compiler!, is set of guile modules
> for
> > generating parsers and lexical analyzers. It also provides sample
> parsers
> > and pretty-printers using SXML trees as an intermediate representation.
> >
>
> Hi All,
>
> I just updated the user’s manual on the project site:
>
> http://www.nongnu.org/nyacc/nyacc-ug.html <http://www.nongnu.org/nyacc/
> nyacc-ug.html>
>
> Matt
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANN] NYACC version 0.79.4 is released
2017-05-29 15:54 ` Nala Ginrut
@ 2017-05-29 16:06 ` Matt Wette
2017-05-29 16:08 ` Matt Wette
2017-05-29 16:14 ` Nala Ginrut
0 siblings, 2 replies; 13+ messages in thread
From: Matt Wette @ 2017-05-29 16:06 UTC (permalink / raw)
To: Nala Ginrut; +Cc: Guile User
> On May 29, 2017, at 8:54 AM, Nala Ginrut <nalaginrut@gmail.com> wrote:
>
> Cool! Is the JS parser strict to ES6?
>
3rd edition — 1999.
I don’t have a later spec. Is it avaiable?
Also, IMO Guile can’t fully implement ECMAScript because (1) string code points are 16 bit, (2) numbers are embedded in 64 bit IEEE floats.
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANN] NYACC version 0.79.4 is released
2017-05-29 16:06 ` Matt Wette
@ 2017-05-29 16:08 ` Matt Wette
2017-05-29 16:14 ` Nala Ginrut
1 sibling, 0 replies; 13+ messages in thread
From: Matt Wette @ 2017-05-29 16:08 UTC (permalink / raw)
To: Matt Wette; +Cc: Guile User
> On May 29, 2017, at 9:06 AM, Matt Wette <matt.wette@gmail.com> wrote:
>
>
>> On May 29, 2017, at 8:54 AM, Nala Ginrut <nalaginrut@gmail.com> wrote:
>>
>> Cool! Is the JS parser strict to ES6?
>>
>
> 3rd edition — 1999.
>
> I don’t have a later spec. Is it avaiable?
>
> Also, IMO Guile can’t fully implement ECMAScript because (1) string code points are 16 bit, (2) numbers are embedded in 64 bit IEEE floats.
>
Oh, and ObjectLiterals and FunctionExpressions are not enabled in v0.79.4. Next release has those, which required update to lair to support the `$prec’ for resolving reduce-reduce conflicts.
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANN] NYACC version 0.79.4 is released
2017-05-29 16:06 ` Matt Wette
2017-05-29 16:08 ` Matt Wette
@ 2017-05-29 16:14 ` Nala Ginrut
1 sibling, 0 replies; 13+ messages in thread
From: Nala Ginrut @ 2017-05-29 16:14 UTC (permalink / raw)
To: Matt Wette; +Cc: Guile User
Maybe not implement it with Guile native string, just take advantage of
bytevector.But there must be an abstract layer.
I will try to implement ES6 when I finish guile-lua-rebirth. I think
guile-es6 could provide another concurrent framework based on delimited
continuations different from call back hell in nodejs.
The es6 spec is here
https://www.ecma-international.org/ecma-262/6.0/
2017年5月30日 上午12:06,"Matt Wette" <matt.wette@gmail.com>写道:
>
> > On May 29, 2017, at 8:54 AM, Nala Ginrut <nalaginrut@gmail.com> wrote:
> >
> > Cool! Is the JS parser strict to ES6?
> >
>
> 3rd edition — 1999.
>
> I don’t have a later spec. Is it avaiable?
>
> Also, IMO Guile can’t fully implement ECMAScript because (1) string code
> points are 16 bit, (2) numbers are embedded in 64 bit IEEE floats.
>
> Matt
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Nyacc parse error tcc.h: DEF_BWL
2017-05-27 4:23 [ANN] NYACC version 0.79.4 is released Matt Wette
2017-05-29 15:42 ` Matt Wette
@ 2017-06-03 7:03 ` Jan Nieuwenhuizen
2017-06-03 12:59 ` Matt Wette
2017-06-03 7:10 ` Nyacc bad escape sequence compiling tcc.h: is_space Jan Nieuwenhuizen
2017-06-03 7:18 ` Nyacc parse error tcc.h: anonymous union in struct Jan Nieuwenhuizen
3 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-03 7:03 UTC (permalink / raw)
To: Matt Wette; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
Matt Wette writes:
Hi Matt!
> NYACC version 0.79.4 is released.
Congrats and thanks!
I have been working on Mes towards compiling tcc.c from tinycc[1] from
latest mob development[2] and was real happy to find that Nyacc handles
most everything, truly amazing piece of work!
I did find some Nyacc parsing problems, most of which were easy to work
around. Now that I finally got round updating to 0.79.4, and verified
that Mescc works OK, I'll be sending some bugs I found that are still
present.
First isolated bug when compiling tcc.c is
08:50:26 janneke@dundal:~/src/mes [env]
$ mescc.scm bugs/def-bwl.c
parsing: input
(unknown):1: parse failed at state 88, on input "DEF_BWL"
bugs/def-bwl.c:20: C99 parse error
Greetings,
janneke
[1] http://tinycc.org
[2] http://repo.or.cz/tinycc.git
[-- Attachment #2: def-bwl.c --]
[-- Type: application/octet-stream, Size: 528 bytes --]
#define DEF_BWL(x) \
DEF(TOK_ASM_ ## x ## b, #x "b") \
DEF(TOK_ASM_ ## x ## w, #x "w") \
DEF(TOK_ASM_ ## x ## l, #x "l") \
DEF(TOK_ASM_ ## x, #x)
#if 1 // !__MESC__
#define DEF_BWLX DEF_BWL
#else // Workaround for Nyacc
#define DEF_BWLX(x) \
DEF(TOK_ASM_ ## x ## b, #x "b") \
DEF(TOK_ASM_ ## x ## w, #x "w") \
DEF(TOK_ASM_ ## x ## l, #x "l") \
DEF(TOK_ASM_ ## x, #x)
#endif
enum tcc_token {
TOK_LAST
#define DEF(id, str) ,id
DEF_BWLX(mov)
#undef DEF
};
int
main (int argc, char *argv[])
{
return TOK_ASM_mov;
}
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Nyacc bad escape sequence compiling tcc.h: is_space
2017-05-27 4:23 [ANN] NYACC version 0.79.4 is released Matt Wette
2017-05-29 15:42 ` Matt Wette
2017-06-03 7:03 ` Nyacc parse error tcc.h: DEF_BWL Jan Nieuwenhuizen
@ 2017-06-03 7:10 ` Jan Nieuwenhuizen
2017-06-03 7:18 ` Nyacc parse error tcc.h: anonymous union in struct Jan Nieuwenhuizen
3 siblings, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-03 7:10 UTC (permalink / raw)
To: Matt Wette; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]
Matt Wette writes:
Hi Matt!
The second tcc.c problem looks like a silly little bug?
Backtrace:
19 (apply-smob/1 #<catch-closure db0080>)
In ice-9/boot-9.scm:
713:2 18 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 17 (_ #(#(#<directory (guile-user) e61140>)))
619:8 16 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (mescc) e…>) …) …) …) …) …) …) …) …) …) …) …) …) …) …))
In ice-9/ports.scm:
462:17 15 (call-with-output-file _ _ #:binary _ #:encoding _)
473:4 14 (with-output-to-port _ _)
In ice-9/eval.scm:
293:34 13 (_ #(#(#<directory (mescc) e87aa0> () () ("bugs/is-space.c") #f #f () ())))
In srfi/srfi-1.scm:
592:17 12 (map1 ("bugs/is-space.c"))
In ice-9/ports.scm:
444:17 11 (call-with-input-file _ _ #:binary _ #:encoding _ #:guess-encoding _)
469:4 10 (with-input-from-port _ _)
In /tmp/guix-build-mes-git.drv-0/source/module/language/c99/compiler.mes:
2194:16 9 (_)
99:21 8 (c99-input->ast #:defines _ #:includes _)
In ice-9/boot-9.scm:
837:9 7 (catch c99-error #<procedure 101b500 at nyacc/lang/c99/parser.scm:78:3 ()> #<procedure 7f1929b30…> …)
In nyacc/lang/c99/parser.scm:
85:13 6 (_)
In ice-9/boot-9.scm:
837:9 5 (catch nyacc-error #<procedure 1043f60 at nyacc/lang/c99/parser.scm:42:7 ()> #<procedure 7f1929b…> …)
In nyacc/parse.scm:
104:35 4 (_ #<procedure 1017c00 at nyacc/lang/c99/body.scm:304:8 ()> #:debug _)
In nyacc/lang/c99/body.scm:
537:21 3 (_)
519:16 2 (read-token)
In nyacc/lex.scm:
274:28 1 (read-c-chlit _)
In unknown file:
0 (scm-error misc-error #f "~A" ("bad escape sequence") #f)
ERROR: In procedure scm-error:
ERROR: bad escape sequence
[-- Attachment #2: is-space.c --]
[-- Type: application/octet-stream, Size: 237 bytes --]
static inline int is_space(int ch) {
#if !__MESC__
// cannot enable this...
return ch == ' ' || ch == '\t' || ch == '\v' || ch == '\f' || ch == '\r';
return ch == ' ' || ch == '\t';
#else
return ch == ' ' || ch == '\t';
#endif
}
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Nyacc parse error tcc.h: anonymous union in struct
2017-05-27 4:23 [ANN] NYACC version 0.79.4 is released Matt Wette
` (2 preceding siblings ...)
2017-06-03 7:10 ` Nyacc bad escape sequence compiling tcc.h: is_space Jan Nieuwenhuizen
@ 2017-06-03 7:18 ` Jan Nieuwenhuizen
2017-06-03 15:19 ` Matt Wette
3 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-03 7:18 UTC (permalink / raw)
To: Matt Wette; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
Matt Wette writes:
Hi Matt!
The last Nyacc problem I found when compiling tcc.c, AFAICS
$ mescc.scm bugs/anonymous-union.c
parsing: input
bugs/anonymous-union.c:7: parse failed at state 94, on input ";"
bugs/anonymous-union.c:7: C99 parse error
Greetings,
janneke
[-- Attachment #2: anonymous-union.c --]
[-- Type: application/octet-stream, Size: 414 bytes --]
typedef struct Sym {
int v; /* symbol token */
#if 1 // !__MESC__
union {
int asm_label; /* associated asm label */
int scope; /* scope level for locals */
};
#else // Workaround: union apparently only to save space and size of struct is not important
//union {
int asm_label; /* associated asm label */
int scope; /* scope level for locals */
//};
#endif
} Sym;
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Nyacc parse error tcc.h: DEF_BWL
2017-06-03 7:03 ` Nyacc parse error tcc.h: DEF_BWL Jan Nieuwenhuizen
@ 2017-06-03 12:59 ` Matt Wette
2017-06-03 13:03 ` Matt Wette
0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-06-03 12:59 UTC (permalink / raw)
To: Guile User
> On Jun 3, 2017, at 12:03 AM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
> Matt Wette writes:
>
> Hi Matt!
>
>> NYACC version 0.79.4 is released.
>
> Congrats and thanks!
>
> I have been working on Mes towards compiling tcc.c from tinycc[1] from
> latest mob development[2] and was real happy to find that Nyacc handles
> most everything, truly amazing piece of work!
>
> I did find some Nyacc parsing problems, most of which were easy to work
> around. Now that I finally got round updating to 0.79.4, and verified
> that Mescc works OK, I'll be sending some bugs I found that are still
> present.
>
> First isolated bug when compiling tcc.c is
>
> 08:50:26 janneke@dundal:~/src/mes [env]
> $ mescc.scm bugs/def-bwl.c
> parsing: input
> (unknown):1: parse failed at state 88, on input "DEF_BWL"
> bugs/def-bwl.c:20: C99 parse error
>
> Greetings,
> janneke
>
> [1] http://tinycc.org
> [2] http://repo.or.cz/tinycc.git
>
> <def-bwl.c>
> --
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Are you asking me to chase down the code that triggers a bug? Please post a few lines around the indicated line.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Nyacc parse error tcc.h: DEF_BWL
2017-06-03 12:59 ` Matt Wette
@ 2017-06-03 13:03 ` Matt Wette
2017-06-03 19:08 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-06-03 13:03 UTC (permalink / raw)
To: Guile User
> On Jun 3, 2017, at 5:59 AM, Matt Wette <matt.wette@gmail.com> wrote:
>
> Are you asking me to chase down the code that triggers a bug? Please post a few lines around the indicated line.
Sorry, I missed the attachment.
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Nyacc parse error tcc.h: anonymous union in struct
2017-06-03 7:18 ` Nyacc parse error tcc.h: anonymous union in struct Jan Nieuwenhuizen
@ 2017-06-03 15:19 ` Matt Wette
0 siblings, 0 replies; 13+ messages in thread
From: Matt Wette @ 2017-06-03 15:19 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: guile-user
> On Jun 3, 2017, at 12:18 AM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
> Matt Wette writes:
>
> Hi Matt!
>
> The last Nyacc problem I found when compiling tcc.c, AFAICS
>
> $ mescc.scm bugs/anonymous-union.c
> parsing: input
> bugs/anonymous-union.c:7: parse failed at state 94, on input ";"
> bugs/anonymous-union.c:7: C99 parse error
>
> Greetings,
> janneke
>
> <anonymous-union.c>
> --
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Thanks for banging on c99. I will start looking into this today. — Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Nyacc parse error tcc.h: DEF_BWL
2017-06-03 13:03 ` Matt Wette
@ 2017-06-03 19:08 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-03 19:08 UTC (permalink / raw)
To: Matt Wette; +Cc: Guile User
Matt Wette writes:
>> On Jun 3, 2017, at 5:59 AM, Matt Wette <matt.wette@gmail.com> wrote:
>>
>> Are you asking me to chase down the code that triggers a bug?
>> Please post a few lines around the indicated line.
>
> Sorry, I missed the attachment.
Sorry, I wrote `see attached' initially but apparently dropped that later ;-)
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-06-03 19:08 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 4:23 [ANN] NYACC version 0.79.4 is released Matt Wette
2017-05-29 15:42 ` Matt Wette
2017-05-29 15:54 ` Nala Ginrut
2017-05-29 16:06 ` Matt Wette
2017-05-29 16:08 ` Matt Wette
2017-05-29 16:14 ` Nala Ginrut
2017-06-03 7:03 ` Nyacc parse error tcc.h: DEF_BWL Jan Nieuwenhuizen
2017-06-03 12:59 ` Matt Wette
2017-06-03 13:03 ` Matt Wette
2017-06-03 19:08 ` Jan Nieuwenhuizen
2017-06-03 7:10 ` Nyacc bad escape sequence compiling tcc.h: is_space Jan Nieuwenhuizen
2017-06-03 7:18 ` Nyacc parse error tcc.h: anonymous union in struct Jan Nieuwenhuizen
2017-06-03 15:19 ` Matt Wette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).