summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 104b75b..f68fd40 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -379,6 +379,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
%x St_Text
%x St_SkipTitle
%x St_Anchor
+%x St_Snippet
%x St_Sections
%s St_SecLabel1
@@ -961,6 +962,13 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
warn(g_fileName,yylineno,"warning: Unexpected character `%s' while looking for section label or title",yytext);
}
+
+<St_Snippet>[^\n]+ |
+<St_Snippet>[^\n]*\n {
+ g_token->name = yytext;
+ g_token->name = g_token->name.stripWhiteSpace();
+ return TK_WORD;
+ }
/* Generic rules that work for all states */
<*>\n {
@@ -1126,6 +1134,11 @@ void doctokenizerYYsetStateAnchor()
BEGIN(St_Anchor);
}
+void doctokenizerYYsetStateSnippet()
+{
+ BEGIN(St_Snippet);
+}
+
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );