[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
%code and %typed
From: |
Hans Aberg |
Subject: |
%code and %typed |
Date: |
Wed, 18 May 2005 01:14:31 +0200 |
I have gotten so far as to implement two directives into Bison, in
order to facilitate the writing of parsers for C+ and other
languages. One directive has the form
%code <identifier> {<code>}
It creates a M4 macro based on the name <identifier>, with the
expansion <code> braces "{" and "}" excluded. The idea is to enable
one to place code more in detail. I decided to use a syntax that is
better for entering code than %define. The other is a directive
%typed, which merely triggers Bison's typing mechanism, without
invoking the %union mechanism. It will be needed to be able to use
static_cast and dynamic_cast in C++ type casting.
I need to experiment more with this, but perhaps it should be it into Bison.
--
Hans Aberg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- %code and %typed,
Hans Aberg <=