54 |
AT_TEST_SYNCLINE([Prologue synch line], |
AT_TEST_SYNCLINE([Prologue synch line], |
55 |
[[%{ |
[[%{ |
56 |
#error "2" |
#error "2" |
57 |
|
void yyerror (const char *s); |
58 |
|
int yylex (void); |
59 |
%} |
%} |
60 |
%% |
%% |
61 |
exp: '0'; |
exp: '0'; |
72 |
[[%union { |
[[%union { |
73 |
#error "2" |
#error "2" |
74 |
} |
} |
75 |
|
%{ |
76 |
|
void yyerror (const char *s); |
77 |
|
int yylex (void); |
78 |
|
%} |
79 |
%% |
%% |
80 |
exp: '0'; |
exp: '0'; |
81 |
]], |
]], |
89 |
|
|
90 |
AT_TEST_SYNCLINE([Postprologue synch line], |
AT_TEST_SYNCLINE([Postprologue synch line], |
91 |
[[%{ |
[[%{ |
92 |
/* Nothing here. */ |
void yyerror (const char *s); |
93 |
|
int yylex (void); |
94 |
%} |
%} |
95 |
%union |
%union |
96 |
{ |
{ |
97 |
int ival; |
int ival; |
98 |
} |
} |
99 |
%{ |
%{ |
100 |
#error "9" |
#error "10" |
101 |
%} |
%} |
102 |
%% |
%% |
103 |
exp: '0'; |
exp: '0'; |
104 |
]], |
]], |
105 |
[input.y:9: #error "9" |
[input.y:10: #error "10" |
106 |
]) |
]) |
107 |
|
|
108 |
|
|
111 |
## ------------------- ## |
## ------------------- ## |
112 |
|
|
113 |
AT_TEST_SYNCLINE([Action synch line], |
AT_TEST_SYNCLINE([Action synch line], |
114 |
[[%% |
[[%{ |
115 |
|
void yyerror (const char *s); |
116 |
|
int yylex (void); |
117 |
|
%} |
118 |
|
%% |
119 |
exp: |
exp: |
120 |
{ |
{ |
121 |
#error "4" |
#error "8" |
122 |
}; |
}; |
123 |
]], |
]], |
124 |
[input.y:4: #error "4" |
[input.y:8: #error "8" |
125 |
]) |
]) |
126 |
|
|
127 |
|
|
130 |
## --------------------- ## |
## --------------------- ## |
131 |
|
|
132 |
AT_TEST_SYNCLINE([Epilogue synch line], |
AT_TEST_SYNCLINE([Epilogue synch line], |
133 |
[[%% |
[[%{ |
134 |
|
void yyerror (const char *s); |
135 |
|
int yylex (void); |
136 |
|
%} |
137 |
|
%% |
138 |
exp: '0'; |
exp: '0'; |
139 |
%% |
%% |
140 |
#error "4" |
#error "8" |
141 |
]], |
]], |
142 |
[input.y:4: #error "4" |
[input.y:8: #error "8" |
143 |
]) |
]) |