Mercurial > hg > Papers > 2012 > aplas
changeset 16:b5bef0479ef5
modify how to implement rectype
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 15 Jun 2012 02:20:36 +0900 |
parents | 68d2c32f74cf |
children | 02bd9a41010f |
files | paper/rectype.ind |
diffstat | 1 files changed, 26 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/paper/rectype.ind Fri Jun 15 00:24:11 2012 +0900 +++ b/paper/rectype.ind Fri Jun 15 02:20:36 2012 +0900 @@ -1,6 +1,7 @@ -title: Recursive type syntax in Continuation based C \newcommand{\rectype}{{\tt \_\_rectype}} +\newcommand{\code}{{\tt \_\_code}} --author: Shinji Kono, Nobuyasu Oshiro @@ -219,6 +220,31 @@ p's argument type is same csA that function pointer. +--How to implement \rectype +\rectype syntx is implemented overwriting AST. +First, \rectype syntax make Tree same \code(\ref{fig:tree1}). +Second, Tree was created to be rectype flag. +Thrid, To overwrite AST(\ref{fig:tree2}). + +\begin{figure}[htpb] + \begin{minipage}{0.5\hsize} + \begin{center} +\scalebox{0.35}{\includegraphics{figure/tree1.pdf}} + \end{center} + \caption{AST of function pointer} + \label{fig:tree1} + \end{minipage} + \begin{minipage}{0.2\hsize} + \begin{center} +\scalebox{0.35}{\includegraphics{figure/tree2.pdf}} + \end{center} + \caption{AST of \rectype} + \label{fig:tree2} +\end{minipage} +\end{figure} + + + It is the same as the following. @@ -227,28 +253,6 @@ p(csB); } ---Implementation of \rectype in CbC on GCC - - -\begin{figure}[htpb] - \begin{minipage}{0.5\hsize} - \begin{center} -\scalebox{0.35}{\includegraphics{figure/tree1.pdf}} - \end{center} - \caption{} - \label{fig:tree1} - \end{minipage} - \begin{minipage}{0.2\hsize} - \begin{center} -\scalebox{0.35}{\includegraphics{figure/tree2.pdf}} - \end{center} - \caption{\rectype} - \label{fig:tree2} -\end{minipage} -\end{figure} - - - --Method other than \rectype struct interface {