BRACKET
This commit is contained in:
parent
39b6e01243
commit
b2fd18ad1c
@ -36,7 +36,7 @@ static int looks_like_year(const char *const a, int *const year) {
|
|||||||
|
|
||||||
/* This defines `enum condition`. */
|
/* This defines `enum condition`. */
|
||||||
/*!types:re2c*/
|
/*!types:re2c*/
|
||||||
enum symbol { END, TEXT, BANG, WHITE, MAP };
|
enum symbol { END, TEXT, BANG, BRACKET, WHITE, MAP };
|
||||||
|
|
||||||
/** scanner reads a file and extracts semantic information. Valid to access
|
/** scanner reads a file and extracts semantic information. Valid to access
|
||||||
only while underlying pointers do not change. */
|
only while underlying pointers do not change. */
|
||||||
@ -89,6 +89,8 @@ scan:
|
|||||||
return s->symbol = TEXT, 1; }
|
return s->symbol = TEXT, 1; }
|
||||||
<text> @s0 "!" @s1 { s->s0 = s0, s->s1 = s1;
|
<text> @s0 "!" @s1 { s->s0 = s0, s->s1 = s1;
|
||||||
return s->symbol = BANG, 1; }
|
return s->symbol = BANG, 1; }
|
||||||
|
<text> "\\" @s0 "[" @s1 { s->s0 = s0, s->s1 = s1;
|
||||||
|
return s->symbol = BRACKET, 1; }
|
||||||
<text> "![" :=> image
|
<text> "![" :=> image
|
||||||
<text> "[" :=> command
|
<text> "[" :=> command
|
||||||
<image> * { return 0; }
|
<image> * { return 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user