|
|
@ -12,20 +12,41 @@ Include directives |
|
|
(preproc_include (system_lib_string))) |
|
|
(preproc_include (system_lib_string))) |
|
|
|
|
|
|
|
|
============================================ |
|
|
============================================ |
|
|
Defines |
|
|
|
|
|
|
|
|
Object-like macro definitions |
|
|
============================================ |
|
|
============================================ |
|
|
|
|
|
|
|
|
#define SIZE 1024 |
|
|
|
|
|
|
|
|
#define ONE |
|
|
|
|
|
#define TWO int a = b; |
|
|
|
|
|
#define THREE \ |
|
|
|
|
|
c == d ? \ |
|
|
|
|
|
e : \ |
|
|
|
|
|
f |
|
|
|
|
|
|
|
|
#define SOMETHING \ |
|
|
|
|
|
x + \ |
|
|
|
|
|
y |
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
(translation_unit |
|
|
|
|
|
(preproc_def (identifier)) |
|
|
|
|
|
(preproc_def (identifier) (preproc_arg)) |
|
|
|
|
|
(preproc_def (identifier) (preproc_arg))) |
|
|
|
|
|
|
|
|
|
|
|
============================================ |
|
|
|
|
|
Function-like macro definitions |
|
|
|
|
|
============================================ |
|
|
|
|
|
|
|
|
|
|
|
#define ONE() a |
|
|
|
|
|
#define TWO(b) c |
|
|
|
|
|
#define THREE(d, e) f |
|
|
|
|
|
#define FOUR(...) g |
|
|
|
|
|
#define FIVE(h, i, ...) j |
|
|
|
|
|
|
|
|
--- |
|
|
--- |
|
|
|
|
|
|
|
|
(translation_unit |
|
|
(translation_unit |
|
|
(preproc_define (identifier)) |
|
|
|
|
|
(preproc_define (identifier))) |
|
|
|
|
|
|
|
|
(preproc_function_def (identifier) (preproc_params) (preproc_arg)) |
|
|
|
|
|
(preproc_function_def (identifier) (preproc_params (identifier)) (preproc_arg)) |
|
|
|
|
|
(preproc_function_def (identifier) (preproc_params (identifier) (identifier)) (preproc_arg)) |
|
|
|
|
|
(preproc_function_def (identifier) (preproc_params) (preproc_arg)) |
|
|
|
|
|
(preproc_function_def (identifier) (preproc_params (identifier) (identifier)) (preproc_arg))) |
|
|
|
|
|
|
|
|
============================================ |
|
|
============================================ |
|
|
Ifdefs |
|
|
Ifdefs |
|
|
@ -60,10 +81,10 @@ int b; |
|
|
(preproc_ifdef |
|
|
(preproc_ifdef |
|
|
(identifier) |
|
|
(identifier) |
|
|
(declaration (identifier) (identifier)) |
|
|
(declaration (identifier) (identifier)) |
|
|
(preproc_define (identifier)) |
|
|
|
|
|
|
|
|
(preproc_def (identifier) (preproc_arg)) |
|
|
(preproc_else |
|
|
(preproc_else |
|
|
(declaration (identifier) (identifier)) |
|
|
(declaration (identifier) (identifier)) |
|
|
(preproc_define (identifier)))) |
|
|
|
|
|
|
|
|
(preproc_def (identifier) (preproc_arg)))) |
|
|
|
|
|
|
|
|
(preproc_ifdef |
|
|
(preproc_ifdef |
|
|
(identifier) |
|
|
(identifier) |
|
|
|