trim
[build-config.git] / doc / lex_testing_code.c
blob6a108bcde02bfaeb2088ff0e99e6c5ed89a3aed8
2 static char c='a';
5 # script comment test
6 // C99 comment test
7 /** C89 extended comment test / **/
9 static int iTmp1; /* comment after content */
10 static int iTmp2; /** comment after content, and it will be treat as a normal str
11 **/
13 * other multi-line comment after content
15 static int iTmp3; /* comment after content, and it will be treat as a normal str
18 static char str[]=$'abcdefghi\n';
20 char test_str[]="$ABC${ABC//\}/}\}";
22 int a=\
23 123;
24 int b=$ABC${ABC//\}/}\}
27 # script comment test
29 int array[] = {
30 1, 98238, 83283, 29209, 32328
33 static struct kconf_id kconf_id_array[] = {
34 { "mainmenu", T_MAINMENU, TF_COMMAND },
35 { "allnoconfig_y", T_OPT_ALLNOCONFIG_Y, TF_OPTION }, // T_ALLNOCONFIG_Y => T_OPT_ALLNOCONFIG_Y
39 #define KCONF_ID_ARRAY_SIZE (sizeof(kconf_id_array)/sizeof(struct kconf_id))
48 #shfunc foo()
50 # writing sh script code here.
54 * grammar extention.
56 #grammar extend()
58 %token T_EXTEND
60 extend_expr:
61 T_EXTEND ( ext_param_list ) \{ statement \} {
62 /* grammar extension */
66 ext_param_list:
67 /* empty */
68 | T_WORD
69 | ext_param_list , T_WORD
72 /**
73 ** vartype is a module, it provide init()/get()/set()/cvt()/new()/del() with
74 ** module name pfx.
75 ** eg: env var 'SHELL_NAME', can be defined as an alias. then, access it as a
76 ** normal variable in c.
77 **/
78 #alias VARNAME(VARTYPE, VARNAME)
89 static int iTmp2; /** comment after content, and it will be treat as a normal str
90 **/
92 * other multi-line comment after content
94 static int iTmp3; /* comment after content, and it will be treat as a normal str
97 config