[Top][All Lists]

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

Re: Bytestructures: a "type system" for bytevectors

From: Matt Wette
Subject: Re: Bytestructures: a "type system" for bytevectors
Date: Mon, 20 Jun 2016 16:47:29 -0700

> On Jun 20, 2016, at 3:05 PM, Taylan Ulrich Bayırlı/Kammer <address@hidden> 
> wrote:
> [SNIP]
>  Would I have to write a C parser in Scheme, or can we cheat somehow?

scheme@(guile-user)> (use-modules (nyacc lang c99 parser))
scheme@(guile-user)> (use-modules (ice-9 pretty-print))
scheme@(guile-user)> (pretty-print (with-input-from-string "int printf(char 
*fmt, ...);" parse-c99))
  (decl (decl-spec-list (type-spec (fixed-type "int")))
              (ident "printf")
                  (decl-spec-list (type-spec (fixed-type "char")))
                  (param-declr (ptr-declr (pointer) (ident "fmt"))))

nyacc is an all-guile implementation of yacc and comes with a c99 parser, 
available from   
The parser outputs parse trees in sxml format.   It is beta-level code.


reply via email to

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