Mercurial > hg > Papers > 2012 > aplas
changeset 17:02bd9a41010f
modify How to implement rectype syntax
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 15 Jun 2012 02:50:28 +0900 |
parents | b5bef0479ef5 |
children | 33b7a54edaa9 |
files | paper/rectype.ind |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/paper/rectype.ind Fri Jun 15 02:20:36 2012 +0900 +++ b/paper/rectype.ind Fri Jun 15 02:50:28 2012 +0900 @@ -221,10 +221,10 @@ --How to implement \rectype -\rectype syntx is implemented overwriting AST. +\rectype syntx is implemented overriding 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}). +Thrid, To override AST(\ref{fig:tree2}). \begin{figure}[htpb] \begin{minipage}{0.5\hsize} @@ -243,15 +243,14 @@ \end{minipage} \end{figure} - - - +Above AST(\ref{fig:tree2}) is made by syntax of \verb+__code csA(__rectype *p)+ . +TREE_LIST have infomation of argument. +First TREE_LIST represent that argument is function pointer(\verb+__code (*p)()+) . +Second TREE_LIST represent that csA is Fixed-length argument. +First TREE_LIST is connected with POINTER_TYPE. +POINTER_TYPE have pointer of function(FUNCTION_TYPE). +We have to override it in the pointer of csA. -It is the same as the following. - - void csA( void (*p)(void*)) { - p(csB); - } --Method other than \rectype