91 |
string is parsed equally whether there is a $ or not. The character |
string is parsed equally whether there is a $ or not. The character |
92 |
$ is used by convention in user macros. */ |
$ is used by convention in user macros. */ |
93 |
|
|
94 |
static boolean check_is_macro_escaped (m4_syntax_table *syntax); |
static bool check_is_macro_escaped (m4_syntax_table *syntax); |
95 |
static int add_syntax_attribute (m4_syntax_table *syntax, int ch, int code); |
static int add_syntax_attribute (m4_syntax_table *syntax, int ch, int code); |
96 |
static int remove_syntax_attribute (m4_syntax_table *syntax, int ch, int code); |
static int remove_syntax_attribute (m4_syntax_table *syntax, int ch, int code); |
97 |
|
|
134 |
syntax->ecomm.string = xstrdup (DEF_ECOMM); |
syntax->ecomm.string = xstrdup (DEF_ECOMM); |
135 |
syntax->ecomm.length = strlen (syntax->ecomm.string); |
syntax->ecomm.length = strlen (syntax->ecomm.string); |
136 |
|
|
137 |
syntax->is_single_quotes = TRUE; |
syntax->is_single_quotes = true; |
138 |
syntax->is_single_comments = TRUE; |
syntax->is_single_comments = true; |
139 |
syntax->is_macro_escaped = FALSE; |
syntax->is_macro_escaped = false; |
140 |
|
|
141 |
add_syntax_attribute (syntax, syntax->lquote.string[0], M4_SYNTAX_LQUOTE); |
add_syntax_attribute (syntax, syntax->lquote.string[0], M4_SYNTAX_LQUOTE); |
142 |
add_syntax_attribute (syntax, syntax->rquote.string[0], M4_SYNTAX_RQUOTE); |
add_syntax_attribute (syntax, syntax->rquote.string[0], M4_SYNTAX_RQUOTE); |
287 |
return syntax->ecomm.string; |
return syntax->ecomm.string; |
288 |
} |
} |
289 |
|
|
290 |
boolean |
bool |
291 |
m4_is_syntax_single_quotes (m4_syntax_table *syntax) |
m4_is_syntax_single_quotes (m4_syntax_table *syntax) |
292 |
{ |
{ |
293 |
assert (syntax); |
assert (syntax); |
294 |
return syntax->is_single_quotes; |
return syntax->is_single_quotes; |
295 |
} |
} |
296 |
|
|
297 |
boolean |
bool |
298 |
m4_is_syntax_single_comments (m4_syntax_table *syntax) |
m4_is_syntax_single_comments (m4_syntax_table *syntax) |
299 |
{ |
{ |
300 |
assert (syntax); |
assert (syntax); |
301 |
return syntax->is_single_comments; |
return syntax->is_single_comments; |
302 |
} |
} |
303 |
|
|
304 |
boolean |
bool |
305 |
m4_is_syntax_macro_escaped (m4_syntax_table *syntax) |
m4_is_syntax_macro_escaped (m4_syntax_table *syntax) |
306 |
{ |
{ |
307 |
assert (syntax); |
assert (syntax); |
370 |
return code; |
return code; |
371 |
} |
} |
372 |
|
|
373 |
static boolean |
static bool |
374 |
check_is_macro_escaped (m4_syntax_table *syntax) |
check_is_macro_escaped (m4_syntax_table *syntax) |
375 |
{ |
{ |
376 |
int ch; |
int ch; |
377 |
|
|
378 |
syntax->is_macro_escaped = FALSE; |
syntax->is_macro_escaped = false; |
379 |
for (ch = 256; --ch >= 0; ) |
for (ch = 256; --ch >= 0; ) |
380 |
if (m4_has_syntax (syntax, ch, M4_SYNTAX_ESCAPE)) |
if (m4_has_syntax (syntax, ch, M4_SYNTAX_ESCAPE)) |
381 |
{ |
{ |
382 |
syntax->is_macro_escaped = TRUE; |
syntax->is_macro_escaped = true; |
383 |
break; |
break; |
384 |
} |
} |
385 |
|
|