o**********a 发帖数: 330 | |
t****t 发帖数: 6806 | 2 no
【在 o**********a 的大作中提到】 : 多谢
|
Z*****Z 发帖数: 723 | 3 赞精简
【在 t****t 的大作中提到】 : no
|
l********a 发帖数: 1154 | |
D*****r 发帖数: 6791 | 5 cdecl.org
int* a[] ==> declare a as array of pointer to int
int (*a) [] ==> declare a as pointer to array of int
【在 o**********a 的大作中提到】 : 多谢
|
j*****I 发帖数: 2626 | 6 大侠能否讲讲一个compiler看到这个expression 怎么开始分析的?
elements有以下这些,
int
*
a
[]
第一个比较清楚. 第二个好像既不是那么清楚了. 那个element先被读,那个后被读呢?
【在 D*****r 的大作中提到】 : cdecl.org : int* a[] ==> declare a as array of pointer to int : int (*a) [] ==> declare a as pointer to array of int
|
A******g 发帖数: 612 | 7 you mean int(*a)[] == int a[] ?
【在 D*****r 的大作中提到】 : cdecl.org : int* a[] ==> declare a as array of pointer to int : int (*a) [] ==> declare a as pointer to array of int
|
D*****r 发帖数: 6791 | 8 我觉得是先;,然后int, 然后[], 然后(),然后*,然后a
具体的照着parser规则走一遍,画出Abstract syntax tree就明白了。
www.lysator.liu.se/c/ANSI-C-grammar-y.html
呢?
【在 j*****I 的大作中提到】 : 大侠能否讲讲一个compiler看到这个expression 怎么开始分析的? : elements有以下这些, : int : * : a : [] : 第一个比较清楚. 第二个好像既不是那么清楚了. 那个element先被读,那个后被读呢?
|
j*****I 发帖数: 2626 | 9 找到个blog可以帮助入门了...
http://eli.thegreenplace.net/2009/02/16/abstract-vs-concrete-sy
【在 D*****r 的大作中提到】 : 我觉得是先;,然后int, 然后[], 然后(),然后*,然后a : 具体的照着parser规则走一遍,画出Abstract syntax tree就明白了。 : www.lysator.liu.se/c/ANSI-C-grammar-y.html : : 呢?
|