# HG changeset patch # User Nobuyasu Oshiro # Date 1339696228 -32400 # Node ID 02bd9a41010f619074a98446373606e9e8eae2e8 # Parent b5bef0479ef502ffef331949f3af27028b2042b4 modify How to implement rectype syntax diff -r b5bef0479ef5 -r 02bd9a41010f paper/rectype.ind --- 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