[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FW: which parser to use
From: |
Hans Aberg |
Subject: |
Re: FW: which parser to use |
Date: |
Sat, 27 Oct 2001 12:27:51 +0200 |
At 14:36 -0600 2001/10/26, MEHTA,HIREN (A-SanJose,ex1) wrote:
>I want to generate a parser from a grammer which can be used
>inside a kernel. The problem with bison/yacc is that it includes
>stdlib.h and it uses malloc/realloc and other routines. Is there
>any way to get around this ?
Essentially, the skeleton in bison.simple uses an allocator (alloca or
malloc) and a deallocator (nothing or free()). Essentially, you should be
able to just replace them.
This might be done by say a macro in the .y source file, or by editing
bison.simple; The latter you may have to try, if you need some more radical
changes.
If you want to know what Bison writes, you can create and use a skeleton
file bison.empty containing only:
%% actions /* The action file replaces this line. */
Then you will know if it is possible to make additions to write your own
skeleton code.
>Please advise on how I should go about generating parser which
>is going to be part of kernel.
>
>Please cc me as I am not subscribed to the list.
You can subscribe at: http://mail.gnu.org/mailman/listinfo/help-bison
Hans Aberg