summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-10-06 19:08:54 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-10-06 19:08:54 (GMT)
commiteb9911da9adbb91449d7fcad9bbc33a8152e1727 (patch)
treec1062a06b0267bdf027f00efb00f1fb2b70db5c5 /src/doctokenizer.l
parent5ed55684b0226c2371f1d39cd7f984da44c9ccb1 (diff)
downloadDoxygen-eb9911da9adbb91449d7fcad9bbc33a8152e1727.zip
Doxygen-eb9911da9adbb91449d7fcad9bbc33a8152e1727.tar.gz
Doxygen-eb9911da9adbb91449d7fcad9bbc33a8152e1727.tar.bz2
Release-1.2.18-20021006
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index f26f979..4ab99b0 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -264,6 +264,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
%x St_Ref
%x St_Ref2
%x St_IntRef
+%x St_Text
%%
<St_Para>\r /* skip carriage return */
@@ -349,17 +350,17 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
g_token->endTag = startNamePos==2;
return TK_HTMLTAG;
}
-<St_Para>"&"{ID}";" { /* special symbol */
+<St_Para,St_Text>"&"{ID}";" { /* special symbol */
g_token->name = yytext;
return TK_SYMBOL;
}
-<St_Para>{LNKWORD1} |
+<St_Para>{LNKWORD1}/[^a-z_A-Z0-9] |
<St_Para>{LNKWORD2} {
g_token->name = yytext;
return TK_LNKWORD;
}
-<St_Para>{WORD1} |
-<St_Para>{WORD2} { /* function call */
+<St_Para,St_Text>{WORD1} |
+<St_Para,St_Text>{WORD2} { /* function call */
g_token->name = yytext;
return TK_WORD;
@@ -369,11 +370,15 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
*/
goto find_rule;
}
-<St_Para>{BLANK}+ |
-<St_Para>{BLANK}*\n{BLANK}* { /* white space */
+<St_Para,St_Text>{BLANK}+ |
+<St_Para,St_Text>{BLANK}*\n{BLANK}* { /* white space */
g_token->chars=yytext;
return TK_WHITESPACE;
}
+<St_Text>[\\@<>&$#%~] {
+ g_token->name = yytext;
+ return TK_COMMAND;
+ }
<St_Para>({BLANK}*\n)+{BLANK}*\n {
/* start of a new paragraph */
return TK_NEWPARA;
@@ -588,6 +593,11 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
<*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character");
}
+<*>[\\@<>&$#%~] { /* unescaped special character */
+ warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
+ g_token->name = yytext;
+ return TK_COMMAND;
+ }
<*>. {
warn(g_fileName,yylineno,"Error: Unexpected character `%s'",yytext);
}
@@ -672,6 +682,11 @@ void doctokenizerYYsetStateInternalRef()
BEGIN(St_IntRef);
}
+void doctokenizerYYsetStateText()
+{
+ BEGIN(St_Text);
+}
+
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );