19%option never-interactive
20%option prefix="doctokenizerYY"
22%option extra-type="struct doctokenizerYY_state *"
26#define YY_TYPEDEF_YY_SCANNER_T
53#define YY_NO_UNISTD_H 1
90 std::stack< std::unique_ptr<DocLexerContext> >
lexerStack;
96#define lineCount(s,len) do { for(int i=0;i<(int)len;i++) if (s[i]=='\n') yyextra->yyLineNr++; } while(0)
109 int nl1 = text.
find(
'\n');
110 int nl2 = text.
find(
"\\ilinebr");
111 if (nl1!=-1 && nl1<nl2)
113 return text.
mid(nl1+1);
117 if (text.
at(nl2+8)==
' ') nl2++;
118 return text.
mid(nl2+8);
127 if (str==0 || length==std::string::npos)
return 0;
131 for (i=0;i<length;i++)
135 indent+=tabSize - (indent%tabSize);
137 else if (str[i]==
'\n')
141 else if (str[i]==
'\\' &&
qstrncmp(str+i+1,
"ilinebr",7)==0)
145 if (str[i+1]==
' ') i++;
158#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
162#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
169#define YY_DECL static Token doctokenizerYYlex(yyscan_t yyscanner)
172#define yyterminate() return Token::make_TK_EOF()
The common base class of all entity definitions found in the sources.
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
#define Config_getInt(name)
QCString extractPartAfterNewLine(const QCString &text)
static void processSection(yyscan_t yyscanner)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static void handleHtmlTag(yyscan_t yyscanner, const char *text)
static const char * getLexerFILE()
static int computeIndent(const char *str, size_t length)
Portable versions of functions that are platform dependent.
int qstrncmp(const char *str1, const char *str2, size_t len)
DocLexerContext(const TokenInfo &tk, int r, int lvl, yy_size_t pos, const char *s, YY_BUFFER_STATE bs)
Data associated with a token used by the comment block parser.
const Definition * definition
std::stack< int > stateStack
std::stack< std::unique_ptr< DocLexerContext > > lexerStack
181ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
182LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
183CODEID [a-zA-Z][a-zA-Z0-9+]*
184PHPTYPE [?]?[\\:a-z_A-Z0-9\x80-\xFF\-]+
185CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
186CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
187CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
188DOXYCFG [A-Z][A-Z_0-9]*
189MAILADDR ("mailto:")?[a-z_A-Z0-9\x80-\xFF.+-]+"@"[a-z_A-Z0-9\x80-\xFf-]+("."[a-z_A-Z0-9\x80-\xFf\-]+)+[a-z_A-Z0-9\x80-\xFf\-]+
190MAILWS [\t a-z_A-Z0-9\x80-\xFF+-]
191MAILADDR2 {MAILWS}+{BLANK}+("at"|"AT"|"_at_"|"_AT_"){BLANK}+{MAILWS}+("dot"|"DOT"|"_dot_"|"_DOT_"|"point"|"POINT"|"_point_"|"_POINT_"){BLANK}+{MAILWS}+
192LISTITEM {BLANK}*[-]("#")?{WS}
193MLISTITEM {BLANK}*[+*]{WS}
194OLISTITEM {BLANK}*("0"|[1-9][0-9]*)"."{BLANK}
195CLISTITEM {BLANK}*[-]{BLANK}*"\["[ xX]"\]"
196ENDLIST {BLANK}*"."{BLANK}*(\n|"\\ilinebr")
197ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
198ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
199URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=\x80-\xFF]
200URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
201URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
202FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
203FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
204FILECHARS {FILEICHAR}*{FILEECHAR}+
205HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
206VFILEMASK {FILECHARS}("."{FILECHARS})*
207FILEMASK {VFILEMASK}|{HFILEMASK}
208LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)?
209VERBATIM "verbatim"{BLANK}*
210SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
211SPCMD2 {CMD}[\\@<>&$#%~".+=|!?-]
212SPCMD3 {CMD}_form#[0-9]+
215INOUT "in"|"out"|("in"{BLANK}*","?{BLANK}*"out")|("out"{BLANK}*","?{BLANK}*"in")
216PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
218TEMPCHAR [a-z_A-Z0-9.,: \t\*\&\(\)\[\]]
219FUNCCHAR [a-z_A-Z0-9,:<> \t\n\^\*\&\[\]]|{VARARGS}|"\\ilinebr"
220FUNCPART {FUNCCHAR}*("("{FUNCCHAR}*")"{FUNCCHAR}*)?
222TEMPLPART "<"{TEMPCHAR}*("<"{TEMPCHAR}*("<"{TEMPCHAR}*">")?">")?">"
223ANONNS "anonymous_namespace{"[^}]*"}"
224SCOPEPRE (({ID}{TEMPLPART}?)|{ANONNS}){SCOPESEP}
225SCOPEKEYS ":"({ID}":")*
226SCOPECPP {SCOPEPRE}*(~)?{ID}{TEMPLPART}?
227SCOPECPPN {SCOPEPRE}*(~)?{ID}
228SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
229SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
230SCOPEMSKN {SCOPECPPN}|{SCOPEOBJC}
231FUNCARG "("{FUNCPART}")"({BLANK}*("volatile"|"const"){BLANK})?
232FUNCARG2 "("{FUNCPART}")"({BLANK}*("volatile"|"const"))?
233OPNEW {BLANK}+"new"({BLANK}*"[]")?
234OPDEL {BLANK}+"delete"({BLANK}*"[]")?
235OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"|"<=>"
236OPCAST {BLANK}+[^<(\r\n.,][^(\r\n.,]*
237OPMASK ({BLANK}*{OPNORM}{FUNCARG})
238OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
239OPMASKOP2 ({BLANK}*{OPNORM}{FUNCARG2}?)|({OPCAST}{FUNCARG2})
240LNKWORD1 ("::"|"#")?{SCOPEMASK}
241LNKWORDN ("::"|"#")?{SCOPEMSKN}
242CVSPEC {BLANK}*("const"|"volatile")
243LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
244LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
245CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
246ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
247CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
248WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""([^"\n]*(\\\"|\n)?)*[^"\n]*"\"")
249WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
250WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
251WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
252CAPTION [cC][aA][pP][tT][iI][oO][nN]
253HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
254HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u"|"del"|"ins"|"s"
255HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U"|"DEL"|"INS"|"S"
256HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
257HTMLTAG_STRICT "<"(("/")?){HTMLKEYW}({WS}+{ATTRIB})*{WS}*(("/")?)">"
258REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
259REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
260REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
261REFWORD3 ({ID}":")*{ID}":"?
262REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
263REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
264REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
265REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
266RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$"
267LINENR {BLANK}*([1-9][0-9]*|"0"|"-1")
269SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[0-9]{1,2})?)?
336<St_Para>^{LISTITEM} {
337 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
340 uint32_t dashPos =
static_cast<uint32_t
>(text.findRev(
'-'));
341 assert(dashPos!=
static_cast<uint32_t
>(-1));
342 yyextra->token.isEnumList = text.at(dashPos+1)==
'#';
343 yyextra->token.isCheckedList =
false;
344 yyextra->token.id = -1;
346 return Token::make_TK_LISTITEM();
#define lineCount(s, len)
348<St_Para>^{CLISTITEM} {
350 int dashPos = text.
findRev(
'-');
351 yyextra->token.isEnumList =
false;
352 yyextra->token.isCheckedList =
true;
357 return Token::make_TK_LISTITEM();
int findRev(char c, int index=-1, bool cs=TRUE) const
359<St_Para>^{MLISTITEM} {
360 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
367 std::string text(yytext);
368 static const reg::Ex re(R
"([*+][^*+]*$)");
371 size_t listPos =
match.position();
372 assert(listPos!=std::string::npos);
373 yyextra->token.isEnumList =
false;
374 yyextra->token.isCheckedList =
false;
375 yyextra->token.id = -1;
377 return Token::make_TK_LISTITEM();
Class representing a regular expression.
Object representing the matching results.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
380<St_Para>^{OLISTITEM} {
381 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
387 std::string text(yytext);
388 static const reg::Ex re(R
"(\d+)");
391 size_t markPos =
match.position();
392 assert(markPos!=std::string::npos);
393 yyextra->token.isEnumList =
true;
394 yyextra->token.isCheckedList =
false;
397 yyextra->token.id = ok ? id : -1;
400 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
403 return Token::make_TK_LISTITEM();
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
406<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} {
407 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
410 uint32_t dashPos =
static_cast<uint32_t
>(text.
findRev(
'-'));
411 assert(dashPos!=
static_cast<uint32_t
>(-1));
412 yyextra->token.isEnumList = text.
at(dashPos+1)==
'#';
413 yyextra->token.isCheckedList =
false;
414 yyextra->token.id = -1;
416 return Token::make_TK_LISTITEM();
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
418<St_Para>{BLANK}*\n{CLISTITEM} {
421 int dashPos = text.
findRev(
'-');
422 yyextra->token.isEnumList =
false;
423 yyextra->token.isCheckedList =
true;
428 return Token::make_TK_LISTITEM();
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString right(size_t len) const
430<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} {
431 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
439 static const reg::Ex re(R
"([*+][^*+]*$)");
442 size_t markPos =
match.position();
443 assert(markPos!=std::string::npos);
444 yyextra->token.isEnumList =
FALSE;
445 yyextra->token.isCheckedList =
false;
446 yyextra->token.id = -1;
448 return Token::make_TK_LISTITEM();
const std::string & str() const
451<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} {
452 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
460 static const reg::Ex re(R
"(\d+)");
463 size_t markPos =
match.position();
464 assert(markPos!=std::string::npos);
465 yyextra->token.isEnumList =
true;
466 yyextra->token.isCheckedList =
false;
469 yyextra->token.id = ok ? id : -1;
472 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
475 return Token::make_TK_LISTITEM();
479 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
483 return Token::make_TK_ENDLIST();
485<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} {
486 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
489 size_t dotPos =
static_cast<size_t>(text.
findRev(
'.'));
491 return Token::make_TK_ENDLIST();
493<St_Para>"{"{BLANK}*"@linkplain"/{WS}+ {
494 yyextra->token.name =
"javalinkplain";
495 return Token::make_TK_COMMAND_AT();
497<St_Para>"{"{BLANK}*"@link"/{WS}+ {
498 yyextra->token.name =
"javalink";
499 return Token::make_TK_COMMAND_AT();
501<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
502 yyextra->token.name =
"inheritdoc";
503 return Token::make_TK_COMMAND_AT();
509 yyextra->token.name =
"_form";
static Token char_to_command(char c)
518 yyextra->token.name = yytext+1;
519 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
523<St_Para>"\\ilinebr" {
529 yyextra->token.name = yytext+1;
530 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
535 yyextra->token.name =
"param";
537 bool isIn = s.find(
"in")!=-1;
538 bool isOut = s.find(
"out")!=-1;
560<St_Para>{URLPROTOCOL}{URLMASK}/[,\.] {
561 yyextra->token.name=yytext;
562 yyextra->token.isEMailAddr=
FALSE;
563 return Token::make_TK_URL();
565<St_Para>{URLPROTOCOL}{URLMASK} {
566 yyextra->token.name=yytext;
567 yyextra->token.isEMailAddr=
FALSE;
568 return Token::make_TK_URL();
570<St_Para>"<"{URLPROTOCOL}{URLMASK}">" {
571 yyextra->token.name=yytext;
572 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
573 yyextra->token.isEMailAddr=
FALSE;
574 return Token::make_TK_URL();
577 yyextra->token.name=yytext;
578 yyextra->token.name.stripPrefix(
"mailto:");
579 yyextra->token.isEMailAddr=
TRUE;
580 return Token::make_TK_URL();
582<St_Para>"<"{MAILADDR}">" {
583 yyextra->token.name=yytext;
584 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
585 yyextra->token.name.stripPrefix(
"mailto:");
586 yyextra->token.isEMailAddr=
TRUE;
587 return Token::make_TK_URL();
589<St_Para>"<"{MAILADDR2}">" {
590 yyextra->token.name=yytext;
591 return Token::make_TK_WORD();
595 int index=tagName.find(
':');
596 if (index<0) index=0;
597 yyextra->token.name = tagName.left(index);
598 int text_begin = index+2;
599 int text_end =
static_cast<int>(tagName.length())-1;
600 if (tagName[text_begin-1]==
':')
603 if (tagName[text_end-1]==
'#')
608 yyextra->token.text = tagName.mid(text_begin,text_end-text_begin);
609 return Token::make_TK_RCSTAG();
611<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" |
612<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" {
614 name = name.left(
static_cast<int>(name.length())-1);
616 for (
int i=
static_cast<int>(value.
length())-1;i>=0;i--) unput(value.
at(i));
QCString getenv(const QCString &variable)
618<St_Para>"<blockquote>‍" {
622 YY_CURRENT_BUFFER->yy_at_bol=1;
625 return Token::make_TK_HTMLTAG();
630 return Token::make_TK_HTMLTAG();
632<St_Para,St_Text>"&"{ID}";" {
633 yyextra->token.name = yytext;
634 return Token::make_TK_SYMBOL();
639<St_Para>{ID}/"<"{HTMLKEYW}">"+ {
642 yyextra->token.name = yytext;
643 return Token::make_TK_LNKWORD();
645<St_Para>{LNKWORDN}/("<"{HTMLKEYW}">")+ {
646 yyextra->token.name = yytext;
647 return Token::make_TK_LNKWORD();
650<St_Para>{LNKWORD1}{FUNCARG} |
653 yyextra->token.name = yytext;
654 return Token::make_TK_LNKWORD();
656<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
657 yyextra->token.name = yytext;
658 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
659 unput(yytext[(
int)yyleng-1]);
660 return Token::make_TK_LNKWORD();
664<St_Para,St_Text>[\-+0-9] |
665<St_Para,St_Text>{WORD1} |
666<St_Para,St_Text>{WORD2} {
667 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
670 yyextra->token.name = &yytext[1];
672 yyextra->token.name = yytext;
673 return Token::make_TK_WORD();
675<St_Text>({ID}".")+{ID} {
676 yyextra->token.name = yytext;
677 return Token::make_TK_WORD();
679<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
681 yyextra->token.name = yytext;
682 return Token::make_TK_WORD();
687<St_Para,St_Text>{BLANK}+ |
688<St_Para,St_Text>{BLANK}*\n{BLANK}* {
690 yyextra->token.chars=yytext;
691 return Token::make_TK_WHITESPACE();
693<St_Text>[\\@<>&$#%~] {
694 yyextra->token.name = yytext;
697<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
698 if (yyextra->insidePre || yyextra->autoListLevel==0)
704<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
705 if (yyextra->insidePre || yyextra->autoListLevel==0)
710<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
711 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
717<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
718 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
724<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
725<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
727 if (yyextra->insidePre)
729 yyextra->token.chars=yytext;
730 return Token::make_TK_WHITESPACE();
738 for (i=0;i<yyextra->token.indent;i++)
744 YY_CURRENT_BUFFER->yy_at_bol=1;
746 return Token::make_TK_NEWPARA();
749<St_CodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
750 yyextra->token.name = yytext;
751 int i=yyextra->token.name.find(
'{');
752 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
755<St_iCodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
756 yyextra->token.name = yytext;
757 int i=yyextra->token.name.find(
'{');
758 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
761<St_CodeOpt>"\\ilinebr" |
767<St_iCodeOpt>"\\ilinebr" |
773<St_Code>{WS}*{CMD}"endcode" {
775 return Token::make_RetVal_OK();
777<St_iCode>{WS}*{CMD}"endicode" {
779 return Token::make_RetVal_OK();
781<St_XmlCode>{WS}*"</code>" {
783 return Token::make_RetVal_OK();
785<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
786<St_Code,St_iCode,St_XmlCode>\n |
787<St_Code,St_iCode,St_XmlCode>. {
789 yyextra->token.verb+=yytext;
791<St_HtmlOnlyOption>" [block]" {
792 yyextra->token.name=
"block";
795<St_HtmlOnlyOption>.|\n {
799<St_HtmlOnlyOption>"\\ilinebr" {
803<St_HtmlOnly>{CMD}"endhtmlonly" {
804 return Token::make_RetVal_OK();
806<St_HtmlOnly>[^\\@\n$]+ |
810 yyextra->token.verb+=yytext;
812<St_ManOnly>{CMD}"endmanonly" {
813 return Token::make_RetVal_OK();
815<St_ManOnly>[^\\@\n$]+ |
819 yyextra->token.verb+=yytext;
821<St_RtfOnly>{CMD}"endrtfonly" {
822 return Token::make_RetVal_OK();
824<St_RtfOnly>[^\\@\n$]+ |
828 yyextra->token.verb+=yytext;
830<St_LatexOnly>{CMD}"endlatexonly" {
831 return Token::make_RetVal_OK();
833<St_LatexOnly>[^\\@\n]+ |
837 yyextra->token.verb+=yytext;
839<St_XmlOnly>{CMD}"endxmlonly" {
840 return Token::make_RetVal_OK();
842<St_XmlOnly>[^\\@\n]+ |
846 yyextra->token.verb+=yytext;
848<St_DbOnly>{CMD}"enddocbookonly" {
849 return Token::make_RetVal_OK();
851<St_DbOnly>[^\\@\n]+ |
855 yyextra->token.verb+=yytext;
857<St_Verbatim>{CMD}"endverbatim" {
858 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
859 return Token::make_RetVal_OK();
861<St_ILiteral>{CMD}"endiliteral " {
863 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
864 return Token::make_RetVal_OK();
866<St_iVerbatim>{CMD}"endiverbatim" {
867 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
868 return Token::make_RetVal_OK();
870<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
871<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
872<St_Verbatim,St_iVerbatim,St_ILiteral>. {
874 yyextra->token.verb+=yytext;
876<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
878 return Token::make_RetVal_OK();
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
880<St_ILiteralOpt>"\\ilinebr" |
881<St_ILiteralOpt>"\n" |
883 yyextra->token.sectionId =
"";
885 return Token::make_RetVal_OK();
887<St_Dot>{CMD}"enddot" {
888 return Token::make_RetVal_OK();
894 yyextra->token.verb+=yytext;
896<St_Msc>{CMD}("endmsc") {
897 return Token::make_RetVal_OK();
903 yyextra->token.verb+=yytext;
905<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
907 return Token::make_RetVal_OK();
909<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
911 return Token::make_RetVal_OK();
913<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
915 return Token::make_RetVal_OK();
917<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
919 return Token::make_RetVal_OK();
921<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
923 return Token::make_RetVal_OK();
925<St_PlantUMLOpt>"\\ilinebr" |
926<St_PlantUMLOpt>"\n" |
928 yyextra->token.sectionId =
"";
930 return Token::make_RetVal_OK();
932<St_PlantUML>{CMD}"enduml" {
933 return Token::make_RetVal_OK();
935<St_PlantUML>[^\\@\n]+ |
939 yyextra->token.verb+=yytext;
945 yyextra->token.chars=yytext;
946 return Token::make_TK_WHITESPACE();
954 return Token::make_TK_NONE();
956<St_Title>"\\ilinebr" {
958 return Token::make_TK_NONE();
960<St_TitleN>"&"{ID}";" {
961 yyextra->token.name = yytext;
962 return Token::make_TK_SYMBOL();
964<St_TitleN>{HTMLTAG} {
965 yyextra->token.name = yytext;
967 return Token::make_TK_HTMLTAG();
971 return Token::make_TK_NONE();
973<St_TitleN>"\\ilinebr" {
975 return Token::make_TK_NONE();
979 yyextra->token.name = yytext+1;
985 yyextra->token.name = &yytext[1];
987 yyextra->token.name = yytext;
988 return Token::make_TK_WORD();
993 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
996 yyextra->token.name = &yytext[1];
998 yyextra->token.name = yytext;
999 return Token::make_TK_WORD();
1002 yyextra->token.chars=yytext;
1003 return Token::make_TK_WHITESPACE();
1005<St_TitleQ>"&"{ID}";" {
1006 yyextra->token.name = yytext;
1007 return Token::make_TK_SYMBOL();
1009<St_TitleQ>(\n|"\\ilinebr") {
1011 return Token::make_TK_NONE();
1013<St_TitleQ>{SPCMD1} |
1014<St_TitleQ>{SPCMD2} {
1015 yyextra->token.name = yytext+1;
1019<St_TitleQ>{WORD1NQ} |
1020<St_TitleQ>{WORD2NQ} {
1021 yyextra->token.name = yytext;
1022 return Token::make_TK_WORD();
1025 yyextra->token.chars=yytext;
1026 return Token::make_TK_WHITESPACE();
1030 return Token::make_TK_NONE();
1032<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1033 yyextra->token.name = yytext;
1034 int pos = yyextra->token.name.find(
'=');
1036 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1039<St_TitleV>[^ \t\r\n]+ {
1041 yyextra->token.chars = yytext;
1043 return Token::make_TK_WORD();
1045<St_TitleV,St_TitleA>. {
1047 return Token::make_TK_NONE();
1049<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1051 return Token::make_TK_NONE();
1054<St_Anchor>{LABELID}{WS}? {
1057 return Token::make_TK_WORD();
1061 return Token::make_TK_NONE();
1064 if (yytext[0] ==
'"')
1066 yyextra->token.name=yytext+1;
1067 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1071 yyextra->token.name=yytext;
1073 return Token::make_TK_WORD();
1077 return Token::make_TK_NONE();
1079<St_Cite>(\n|"\\ilinebr") {
1081 return Token::make_TK_NONE();
1085 return Token::make_TK_NONE();
1087<St_DoxyConfig>{DOXYCFG} {
1088 yyextra->token.name=yytext;
1089 return Token::make_TK_WORD();
1091<St_DoxyConfig>{BLANK} {
1093 return Token::make_TK_NONE();
1095<St_DoxyConfig>(\n|"\\ilinebr") {
1097 return Token::make_TK_NONE();
1101 return Token::make_TK_NONE();
1103<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1104 yyextra->token.name=yytext;
1105 return Token::make_TK_WORD();
1107<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1108 yyextra->token.name=yytext;
1109 return Token::make_TK_WORD();
1112 yyextra->token.name=yytext;
1113 return Token::make_TK_WORD();
1117 return Token::make_TK_NONE();
1119<St_Ref>{WS}+"\""{WS}* {
1123<St_Ref>(\n|"\\ilinebr") {
1125 return Token::make_TK_NONE();
1127<St_Ref>"\""[^"\n]+"\"" {
1128 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1129 return Token::make_TK_WORD();
1133 return Token::make_TK_NONE();
1135<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1136 yyextra->token.name = yytext;
1137 return Token::make_TK_WORD();
1139<St_IntRef>{BLANK}+"\"" {
1142<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1143 yyextra->token.name = yytext;
1144 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1145 return Token::make_TK_WORD();
1147<St_SetScope>{SCOPEMASK}"<" {
1148 yyextra->token.name = yytext;
1149 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1150 yyextra->sharpCount=1;
1151 BEGIN(St_SetScopeEnd);
1153<St_SetScope>{BLANK} {
1155<St_SetScopeEnd>"<" {
1156 yyextra->token.name += yytext;
1157 yyextra->sharpCount++;
1159<St_SetScopeEnd>">" {
1160 yyextra->token.name += yytext;
1161 yyextra->sharpCount--;
1162 if (yyextra->sharpCount<=0)
1164 return Token::make_TK_WORD();
1168 yyextra->token.name += yytext;
1170<St_Ref2>"&"{ID}";" {
1171 yyextra->token.name = yytext;
1172 return Token::make_TK_SYMBOL();
1174<St_Ref2>"\""|\n|"\\ilinebr" {
1176 return Token::make_TK_NONE();
1178<St_Ref2>{HTMLTAG_STRICT} {
1181 return Token::make_TK_HTMLTAG();
1185 yyextra->token.name = yytext+1;
1192 yyextra->token.name = yytext;
1193 return Token::make_TK_WORD();
1196 yyextra->token.chars=yytext;
1197 return Token::make_TK_WHITESPACE();
1199<St_XRefItem>{LABELID} {
1200 yyextra->token.name=yytext;
1203 BEGIN(St_XRefItem2);
1205<St_XRefItem2>[0-9]+"." {
1207 numStr=numStr.left((
int)yyleng-1);
1208 yyextra->token.id=numStr.toInt();
1209 return Token::make_RetVal_OK();
1211<St_Para,St_Title,St_Ref2>"<!--" {
1212 yyextra->commentState = YY_START;
1215<St_Param>"\""[^\n\"]+"\"" {
1216 yyextra->token.name = yytext+1;
1217 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1218 return Token::make_TK_WORD();
1220<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1223 int j = params.find(
'&');
1224 int i = params.find(
'$');
1226 if (j<i && j>=0) i=j;
1228 yyextra->token.name = types+
"#"+params.
mid(i);
1229 return Token::make_TK_WORD();
QCString left(size_t len) const
1231<St_Param>[^ \t\n,@\\]+ {
1232 yyextra->token.name = yytext;
1233 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1235 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1237 return Token::make_TK_WORD();
1239<St_Param>{WS}*","{WS}*
1242 yyextra->token.chars=yytext;
1243 return Token::make_TK_WHITESPACE();
1245<St_Prefix>"\""[^\n\"]*"\"" {
1246 yyextra->token.name = yytext+1;
1247 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1248 return Token::make_TK_WORD();
1252 return Token::make_TK_NONE();
1255 yyextra->token.name+=yytext;
1257<St_Options>{WS}*":"{WS}* {
1259 yyextra->token.name+=
":";
1261<St_Options>{WS}*","{WS}* |
1264 yyextra->token.name+=
",";
1267 return Token::make_TK_WORD();
1270 yyextra->token.name+=yytext;
1273 return Token::make_TK_WORD();
1275<St_Emoji>[:0-9_a-z+-]+ {
1276 yyextra->token.name=yytext;
1277 return Token::make_TK_WORD();
1281 return Token::make_TK_NONE();
1283<St_QuotedString>"\"" {
1284 yyextra->token.name=
"";
1285 BEGIN(St_QuotedContent);
1287<St_QuotedString>(\n|"\\ilinebr") {
1289 return Token::make_TK_NONE();
1293 return Token::make_TK_NONE();
1295<St_QuotedContent>"\"" {
1296 return Token::make_TK_WORD();
1298<St_QuotedContent>. {
1299 yyextra->token.name+=yytext;
1301<St_ShowDate>{WS}+{SHOWDATE} {
1303 yyextra->token.name=yytext;
1304 return Token::make_TK_WORD();
1306<St_ShowDate>(\n|"\\ilinebr") {
1308 return Token::make_TK_NONE();
1312 return Token::make_TK_NONE();
1314<St_ILine>{LINENR}/[\\@\n\.] |
1315<St_ILine>{LINENR}{BLANK} {
1320 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1324 yyextra->yyLineNr = nr;
1326 return Token::make_TK_WORD();
1329 return Token::make_TK_NONE();
1331<St_IFile>{BLANK}*{FILEMASK} {
1333 return Token::make_TK_WORD();
1335<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1338 yyextra->fileName = text.
mid(1,text.
length()-2);
1339 return Token::make_TK_WORD();
1341<St_File>{FILEMASK} {
1342 yyextra->token.name = yytext;
1343 return Token::make_TK_WORD();
1345<St_File>"\""[^\n\"]+"\"" {
1347 yyextra->token.name = text.
mid(1,text.
length()-2);
1348 return Token::make_TK_WORD();
1350<St_Pattern>[^\\\r\n]+ {
1351 yyextra->token.name += yytext;
1353<St_Pattern>"\\ilinebr" {
1354 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1355 return Token::make_TK_WORD();
1359 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1360 return Token::make_TK_WORD();
1363 yyextra->token.name += yytext;
1365<St_Link>{LINKMASK}|{REFWORD} {
1366 yyextra->token.name = yytext;
1367 return Token::make_TK_WORD();
1370 BEGIN(yyextra->commentState);
1378<St_SkipTitle>(\n|"\\ilinebr") {
1379 if (*yytext ==
'\n') unput(
'\n');
1380 return Token::make_TK_NONE();
1385<St_Sections>[^\n@\<]+
1386<St_Sections>{CMD}("<"|{CMD})
1387<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1390 int s=tag.find(
"id=");
1394 if (c==
'\'' || c==
'"')
1396 int e=tag.find(c,s+4);
1400 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1406<St_Sections>{CMD}"anchor"{BLANK}+ {
1408 BEGIN(St_SecLabel1);
static constexpr int Anchor
1410<St_Sections>{CMD}"ianchor"{BLANK}+ {
1412 BEGIN(St_SecLabel1);
1414<St_Sections>{CMD}"section"{BLANK}+ {
1416 BEGIN(St_SecLabel2);
static constexpr int Section
1418<St_Sections>{CMD}"subsection"{BLANK}+ {
1420 BEGIN(St_SecLabel2);
static constexpr int Subsection
1422<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1424 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1426<St_Sections>{CMD}"paragraph"{BLANK}+ {
1428 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1430<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1432 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1434<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1436 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1438<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1439 yyextra->endMarker=
"endverbatim";
1442<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1443 yyextra->endMarker=
"endiverbatim";
1446<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1447 yyextra->endMarker=
"endiliteral";
1450<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1451 yyextra->endMarker=
"enddot";
1454<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1455 yyextra->endMarker=
"endmsc";
1458<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1459 yyextra->endMarker=
"enduml";
1462<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1463 yyextra->endMarker=
"endhtmlonly";
1466<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1467 yyextra->endMarker=
"endlatexonly";
1470<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1471 yyextra->endMarker=
"endmanonly";
1474<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1475 yyextra->endMarker=
"endrtfonly";
1478<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1479 yyextra->endMarker=
"endxmlonly";
1482<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1483 yyextra->endMarker=
"enddocbookonly";
1486<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1487 yyextra->endMarker=
"endcode";
1490<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1491 yyextra->endMarker=
"endicode";
1494<St_Sections>"<!--" {
1495 yyextra->endMarker=
"-->";
1498<St_SecSkip>{CMD}{ID} {
1499 if (yyextra->endMarker==yytext+1)
1505 if (yyextra->endMarker==yytext)
1510<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1512<St_SecSkip>(\n|"\\ilinebr")
1514<St_Sections>(\n|"\\ilinebr")
1515<St_SecLabel1>{LABELID} {
1517 yyextra->secLabel = yytext;
1521<St_SecLabel2>{LABELID}{BLANK}+ |
1522<St_SecLabel2>{LABELID} {
1523 yyextra->secLabel = yytext;
1524 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1527<St_SecTitle>[^\n]+ |
1528<St_SecTitle>[^\n]*\n {
1530 yyextra->secTitle = yytext;
1531 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1532 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1534 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1539<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1540 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1543<St_Snippet>[^\\\n]+ {
1544 yyextra->token.name += yytext;
1547 yyextra->token.name += yytext;
1549<St_Snippet>(\n|"\\ilinebr") {
1551 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1552 return Token::make_TK_WORD();
1558 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1564 yyextra->token.name = yytext;
1568 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1576 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1578 const char *p = yyextra->inputString + yyextra->inputPos;
1579 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1580 yyextra->inputPos+=c;
1586 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1589 if (yyextra->definition)
1591 file = yyextra->definition->getOutputFileBase();
1595 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1601 si->
setType(yyextra->secType);
1607 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1610 yyextra->token.text = tagText;
1611 yyextra->token.attribs.
clear();
1612 yyextra->token.endTag =
FALSE;
1613 yyextra->token.emptyTag =
FALSE;
1617 if (tagText.
at(1)==
'/')
1619 yyextra->token.endTag =
TRUE;
1624 int i = startNamePos;
1625 for (i=startNamePos; i < (int)yyleng; i++)
1628 char c = tagText.
at(i);
1629 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1631 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1635 int startAttribList = i;
1636 while (i<(
int)yyleng)
1638 char c=tagText.
at(i);
1640 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1642 if (c ==
'>')
break;
1646 yyextra->token.emptyTag =
TRUE;
1651 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1654 optName = tagText.
mid(startName,endName-startName).
lower();
1656 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1657 if (tagText.
at(i)==
'=')
1659 int startAttrib=0, endAttrib=0;
1662 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1663 if (tagText.
at(i)==
'\'')
1669 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1671 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1673 else if (tagText.
at(i)==
'"')
1678 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1680 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1686 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1688 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1690 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1691 if (optName ==
"align") optValue = optValue.
lower();
1692 else if (optName ==
"valign")
1694 optValue = optValue.
lower();
1695 if (optValue ==
"center") optValue=
"middle";
1703 yyextra->token.attribs.emplace_back(optName,optValue);
1705 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1718 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1720 yyextra->lexerStack.push(
1721 std::make_unique<DocLexerContext>(
1722 yyextra->token,YY_START,
1723 yyextra->autoListLevel,
1725 yyextra->inputString,
1726 YY_CURRENT_BUFFER));
1727 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1733 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1735 if (yyextra->lexerStack.empty())
return FALSE;
1736 const auto &ctx = yyextra->lexerStack.top();
1737 yyextra->autoListLevel = ctx->autoListLevel;
1738 yyextra->inputPos = ctx->inputPos;
1739 yyextra->inputString = ctx->inputString;
1740 yyextra->token = ctx->token;
1742 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1743 yy_switch_to_buffer(ctx->state, yyscanner);
1746 yyextra->lexerStack.pop();
1754 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1763 doctokenizerYYlex_destroy(
p->yyscanner);
1768 return doctokenizerYYlex(
p->yyscanner);
1774 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1782 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1786 yyextra->inputString = input.
data();
1788 yyextra->inputPos = 0;
1789 yyextra->definition = d;
1790 yyextra->fileName = fileName;
1792 yyextra->yyLineNr = 1;
1793 doctokenizerYYlex(yyscanner);
1799 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1800 yyextra->autoListLevel = 0;
1801 yyextra->inputString = input;
1802 yyextra->inputPos = 0;
1803 yyextra->fileName = fileName;
1804 yyextra->insidePre =
FALSE;
1805 yyextra->markdownSupport = markdownSupport;
1806 yyextra->insideHtmlLink = insideHtmlLink;
1813 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1814 return &yyextra->token;
1820 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1822 return &yyextra->token;
1828 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1829 yyextra->insideHtmlLink =
false;
1836 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1843 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1850 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1851 yyextra->token.verb=
"";
1852 yyextra->token.name=
"";
1859 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1860 yyextra->token.verb=
"";
1861 yyextra->token.name=
"";
1868 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1869 yyextra->token.verb=
"";
1870 yyextra->token.name=
"";
1877 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1878 yyextra->token.verb=
"";
1879 yyextra->token.name=
"";
1880 BEGIN(St_HtmlOnlyOption);
1886 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1887 yyextra->token.verb=
"";
1894 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1895 yyextra->token.verb=
"";
1902 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1903 yyextra->token.verb=
"";
1910 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1911 yyextra->token.verb=
"";
1918 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1919 yyextra->token.verb=
"";
1920 BEGIN(St_LatexOnly);
1926 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1927 yyextra->token.verb=
"";
1934 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1935 yyextra->token.verb=
"";
1936 BEGIN(St_ILiteralOpt);
1942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1943 yyextra->token.verb=
"";
1950 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1951 yyextra->token.verb=
"";
1952 BEGIN(St_iVerbatim);
1958 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1959 yyextra->token.verb=
"";
1966 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1967 yyextra->token.verb=
"";
1974 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1975 yyextra->token.verb=
"";
1976 yyextra->token.sectionId=
"";
1977 BEGIN(St_PlantUMLOpt);
1983 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1984 yyextra->token.verb=
"";
1991 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1998 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2005 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2012 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2019 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2020 yyextra->token.name =
"";
2027 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2034 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2041 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2042 BEGIN(St_DoxyConfig);
2048 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2055 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2062 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2069 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2070 BEGIN(St_SkipTitle);
2076 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2083 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2090 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2091 yyextra->token.name=
"";
2098 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2105 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2106 yyextra->token.name=
"";
2113 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2114 yyextra->token.name=
"";
2121 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2122 yyextra->token.name=
"";
2129 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2136 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2137 BEGIN(St_QuotedString);
2143 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2150 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2151 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2157 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2158 yyextra->insidePre = b;
2164 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2166 int l =
static_cast<int>(tagName.
length());
2168 for (
int i=l-1;i>=0;i--)
2178 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2179 yyextra->autoListLevel++;
2185 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2186 yyextra->autoListLevel--;
2192 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2193 yyextra->yyLineNr = lineno;
2199 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2200 return yyextra->yyLineNr;
2206 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2207 yyextra->stateStack.push(YYSTATE);
2213 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2214 assert(!yyextra->stateStack.empty());
2215 BEGIN(yyextra->stateStack.top());
2216 yyextra->stateStack.pop();
2219#include "doctokenizer.l.h"
static bool isFlagSet(const DebugMask mask)
void setStateTitleAttrValue()
void setStateILiteralOpt()
void init(const char *input, const QCString &fileName, bool markdownSupport, bool insideHtmlLink)
void setLineNr(int lineno)
void setStatePlantUMLOpt()
void findSections(const QCString &input, const Definition *d, const QCString &fileName)
void setInsidePre(bool b)
void unputString(const QCString &tag)
void setStateInternalRef()
void setStateDoxyConfig()
void setStateQuotedString()
std::unique_ptr< Private > p
void pushBackHtmlTag(const QCString &tag)
const T * find(const std::string &key) const
bool isEmpty() const
Returns TRUE iff the string is empty.
class that provide information about a section.
void setType(SectionType t)
void setFileName(const QCString &fn)
static SectionManager & instance()
returns a reference to the singleton
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
const char * qPrint(const char *s)
doctokenizerYY_state extra