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\-]*
183PHPTYPE [?]?[\\:a-z_A-Z0-9\x80-\xFF\-]+
184CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
185CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
186CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
187DOXYCFG [A-Z][A-Z_0-9]*
188MAILADDR ("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\-]+
189MAILWS [\t a-z_A-Z0-9\x80-\xFF+-]
190MAILADDR2 {MAILWS}+{BLANK}+("at"|"AT"|"_at_"|"_AT_"){BLANK}+{MAILWS}+("dot"|"DOT"|"_dot_"|"_DOT_"|"point"|"POINT"|"_point_"|"_POINT_"){BLANK}+{MAILWS}+
191LISTITEM {BLANK}*[-]("#")?{WS}
192MLISTITEM {BLANK}*[+*]{WS}
193OLISTITEM {BLANK}*("0"|[1-9][0-9]*)"."{BLANK}
194CLISTITEM {BLANK}*[-]{BLANK}*"\["[ xX]"\]"
195ENDLIST {BLANK}*"."{BLANK}*(\n|"\\ilinebr")
196ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
197ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
198URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=\x80-\xFF]
199URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
200URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
201FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@]
202FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@]
203FILECHARS {FILEICHAR}*{FILEECHAR}+
204HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
205VFILEMASK {FILECHARS}("."{FILECHARS})*
206FILEMASK {VFILEMASK}|{HFILEMASK}
207LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)?
208VERBATIM "verbatim"{BLANK}*
209SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
210SPCMD2 {CMD}[\\@<>&$#%~".+=|!?-]
211SPCMD3 {CMD}_form#[0-9]+
214INOUT "in"|"out"|("in"{BLANK}*","?{BLANK}*"out")|("out"{BLANK}*","?{BLANK}*"in")
215PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
217TEMPCHAR [a-z_A-Z0-9.,: \t\*\&\(\)\[\]]
218FUNCCHAR [a-z_A-Z0-9,:<> \t\n\^\*\&\[\]]|{VARARGS}|"\\ilinebr"
219FUNCPART {FUNCCHAR}*("("{FUNCCHAR}*")"{FUNCCHAR}*)?
221TEMPLPART "<"{TEMPCHAR}*("<"{TEMPCHAR}*("<"{TEMPCHAR}*">")?">")?">"
222ANONNS "anonymous_namespace{"[^}]*"}"
223SCOPEPRE (({ID}{TEMPLPART}?)|{ANONNS}){SCOPESEP}
224SCOPEKEYS ":"({ID}":")*
225SCOPECPP {SCOPEPRE}*(~)?{ID}{TEMPLPART}?
226SCOPECPPN {SCOPEPRE}*(~)?{ID}
227SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
228SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
229SCOPEMSKN {SCOPECPPN}|{SCOPEOBJC}
230FUNCARG "("{FUNCPART}")"({BLANK}*("volatile"|"const"){BLANK})?
231FUNCARG2 "("{FUNCPART}")"({BLANK}*("volatile"|"const"))?
232OPNEW {BLANK}+"new"({BLANK}*"[]")?
233OPDEL {BLANK}+"delete"({BLANK}*"[]")?
234OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"|"<=>"
235OPCAST {BLANK}+[^<(\r\n.,][^(\r\n.,]*
236OPMASK ({BLANK}*{OPNORM}{FUNCARG})
237OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
238OPMASKOP2 ({BLANK}*{OPNORM}{FUNCARG2}?)|({OPCAST}{FUNCARG2})
239LNKWORD1 ("::"|"#")?{SCOPEMASK}
240LNKWORDN ("::"|"#")?{SCOPEMSKN}
241CVSPEC {BLANK}*("const"|"volatile")
242LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
243LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
244CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
245ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
246CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
247WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""([^"\n]*(\\\"|\n)?)*[^"\n]*"\"")
248WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
249WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
250WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
251CAPTION [cC][aA][pP][tT][iI][oO][nN]
252HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
253HTMLKEYL "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"
254HTMLKEYU "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"
255HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
256HTMLTAG_STRICT "<"(("/")?){HTMLKEYW}({WS}+{ATTRIB})*{WS}*(("/")?)">"
257REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
258REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
259REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
260REFWORD3 ({ID}":")*{ID}":"?
261REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
262REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
263REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
264REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
265RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$"
266LINENR {BLANK}*([1-9][0-9]*|"0"|"-1")
268SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[0-9]{1,2})?)?
335<St_Para>^{LISTITEM} {
336 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
339 uint32_t dashPos =
static_cast<uint32_t
>(text.findRev(
'-'));
340 assert(dashPos!=
static_cast<uint32_t
>(-1));
341 yyextra->token.isEnumList = text.at(dashPos+1)==
'#';
342 yyextra->token.isCheckedList =
false;
343 yyextra->token.id = -1;
345 return Token::make_TK_LISTITEM();
#define lineCount(s, len)
347<St_Para>^{CLISTITEM} {
349 int dashPos = text.
findRev(
'-');
350 yyextra->token.isEnumList =
false;
351 yyextra->token.isCheckedList =
true;
356 return Token::make_TK_LISTITEM();
int findRev(char c, int index=-1, bool cs=TRUE) const
358<St_Para>^{MLISTITEM} {
359 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
366 std::string text(yytext);
367 static const reg::Ex re(R
"([*+][^*+]*$)");
370 size_t listPos =
match.position();
371 assert(listPos!=std::string::npos);
372 yyextra->token.isEnumList =
false;
373 yyextra->token.isCheckedList =
false;
374 yyextra->token.id = -1;
376 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.
379<St_Para>^{OLISTITEM} {
380 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
386 std::string text(yytext);
387 static const reg::Ex re(R
"(\d+)");
390 size_t markPos =
match.position();
391 assert(markPos!=std::string::npos);
392 yyextra->token.isEnumList =
true;
393 yyextra->token.isCheckedList =
false;
396 yyextra->token.id = ok ? id : -1;
399 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '%s' ",
match.str().c_str());
402 return Token::make_TK_LISTITEM();
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
405<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} {
406 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
409 uint32_t dashPos =
static_cast<uint32_t
>(text.
findRev(
'-'));
410 assert(dashPos!=
static_cast<uint32_t
>(-1));
411 yyextra->token.isEnumList = text.
at(dashPos+1)==
'#';
412 yyextra->token.isCheckedList =
false;
413 yyextra->token.id = -1;
415 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.
417<St_Para>{BLANK}*\n{CLISTITEM} {
420 int dashPos = text.
findRev(
'-');
421 yyextra->token.isEnumList =
false;
422 yyextra->token.isCheckedList =
true;
427 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
429<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} {
430 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
438 static const reg::Ex re(R
"([*+][^*+]*$)");
441 size_t markPos =
match.position();
442 assert(markPos!=std::string::npos);
443 yyextra->token.isEnumList =
FALSE;
444 yyextra->token.isCheckedList =
false;
445 yyextra->token.id = -1;
447 return Token::make_TK_LISTITEM();
const std::string & str() const
450<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} {
451 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
459 static const reg::Ex re(R
"(\d+)");
462 size_t markPos =
match.position();
463 assert(markPos!=std::string::npos);
464 yyextra->token.isEnumList =
true;
465 yyextra->token.isCheckedList =
false;
468 yyextra->token.id = ok ? id : -1;
471 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '%s' ",
match.str().c_str());
474 return Token::make_TK_LISTITEM();
478 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
482 return Token::make_TK_ENDLIST();
484<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} {
485 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
488 size_t dotPos =
static_cast<size_t>(text.
findRev(
'.'));
490 return Token::make_TK_ENDLIST();
492<St_Para>"{"{BLANK}*"@linkplain"/{WS}+ {
493 yyextra->token.name =
"javalinkplain";
494 return Token::make_TK_COMMAND_AT();
496<St_Para>"{"{BLANK}*"@link"/{WS}+ {
497 yyextra->token.name =
"javalink";
498 return Token::make_TK_COMMAND_AT();
500<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
501 yyextra->token.name =
"inheritdoc";
502 return Token::make_TK_COMMAND_AT();
508 yyextra->token.name =
"_form";
static Token char_to_command(char c)
517 yyextra->token.name = yytext+1;
518 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
522<St_Para>"\\ilinebr" {
528 yyextra->token.name = yytext+1;
529 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
534 yyextra->token.name =
"param";
536 bool isIn = s.find(
"in")!=-1;
537 bool isOut = s.find(
"out")!=-1;
559<St_Para>{URLPROTOCOL}{URLMASK}/[,\.] {
560 yyextra->token.name=yytext;
561 yyextra->token.isEMailAddr=
FALSE;
562 return Token::make_TK_URL();
564<St_Para>{URLPROTOCOL}{URLMASK} {
565 yyextra->token.name=yytext;
566 yyextra->token.isEMailAddr=
FALSE;
567 return Token::make_TK_URL();
569<St_Para>"<"{URLPROTOCOL}{URLMASK}">" {
570 yyextra->token.name=yytext;
571 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
572 yyextra->token.isEMailAddr=
FALSE;
573 return Token::make_TK_URL();
576 yyextra->token.name=yytext;
577 yyextra->token.name.stripPrefix(
"mailto:");
578 yyextra->token.isEMailAddr=
TRUE;
579 return Token::make_TK_URL();
581<St_Para>"<"{MAILADDR}">" {
582 yyextra->token.name=yytext;
583 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
584 yyextra->token.name.stripPrefix(
"mailto:");
585 yyextra->token.isEMailAddr=
TRUE;
586 return Token::make_TK_URL();
588<St_Para>"<"{MAILADDR2}">" {
589 yyextra->token.name=yytext;
590 return Token::make_TK_WORD();
594 int index=tagName.find(
':');
595 if (index<0) index=0;
596 yyextra->token.name = tagName.left(index);
597 int text_begin = index+2;
598 int text_end =
static_cast<int>(tagName.length())-1;
599 if (tagName[text_begin-1]==
':')
602 if (tagName[text_end-1]==
'#')
607 yyextra->token.text = tagName.mid(text_begin,text_end-text_begin);
608 return Token::make_TK_RCSTAG();
610<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" |
611<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" {
613 name = name.left(
static_cast<int>(name.length())-1);
615 for (
int i=
static_cast<int>(value.
length())-1;i>=0;i--) unput(value.
at(i));
QCString getenv(const QCString &variable)
620 return Token::make_TK_HTMLTAG();
622<St_Para,St_Text>"&"{ID}";" {
623 yyextra->token.name = yytext;
624 return Token::make_TK_SYMBOL();
629<St_Para>{ID}/"<"{HTMLKEYW}">"+ {
632 yyextra->token.name = yytext;
633 return Token::make_TK_LNKWORD();
635<St_Para>{LNKWORDN}/("<"{HTMLKEYW}">")+ {
636 yyextra->token.name = yytext;
637 return Token::make_TK_LNKWORD();
640<St_Para>{LNKWORD1}{FUNCARG} |
643 yyextra->token.name = yytext;
644 return Token::make_TK_LNKWORD();
646<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
647 yyextra->token.name = yytext;
648 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
649 unput(yytext[(
int)yyleng-1]);
650 return Token::make_TK_LNKWORD();
654<St_Para,St_Text>[\-+0-9] |
655<St_Para,St_Text>{WORD1} |
656<St_Para,St_Text>{WORD2} {
657 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
660 yyextra->token.name = &yytext[1];
662 yyextra->token.name = yytext;
663 return Token::make_TK_WORD();
665<St_Text>({ID}".")+{ID} {
666 yyextra->token.name = yytext;
667 return Token::make_TK_WORD();
669<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
671 yyextra->token.name = yytext;
672 return Token::make_TK_WORD();
677<St_Para,St_Text>{BLANK}+ |
678<St_Para,St_Text>{BLANK}*\n{BLANK}* {
680 yyextra->token.chars=yytext;
681 return Token::make_TK_WHITESPACE();
683<St_Text>[\\@<>&$#%~] {
684 yyextra->token.name = yytext;
687<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
688 if (yyextra->insidePre || yyextra->autoListLevel==0)
694<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
695 if (yyextra->insidePre || yyextra->autoListLevel==0)
700<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
701 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
707<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
708 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
714<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
715<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
717 if (yyextra->insidePre)
719 yyextra->token.chars=yytext;
720 return Token::make_TK_WHITESPACE();
728 for (i=0;i<yyextra->token.indent;i++)
734 YY_CURRENT_BUFFER->yy_at_bol=1;
736 return Token::make_TK_NEWPARA();
739<St_CodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
740 yyextra->token.name = yytext;
741 int i=yyextra->token.name.find(
'{');
742 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
745<St_iCodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
746 yyextra->token.name = yytext;
747 int i=yyextra->token.name.find(
'{');
748 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
751<St_CodeOpt>"\\ilinebr" |
757<St_iCodeOpt>"\\ilinebr" |
763<St_Code>{WS}*{CMD}"endcode" {
765 return Token::make_RetVal_OK();
767<St_iCode>{WS}*{CMD}"endicode" {
769 return Token::make_RetVal_OK();
771<St_XmlCode>{WS}*"</code>" {
773 return Token::make_RetVal_OK();
775<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
776<St_Code,St_iCode,St_XmlCode>\n |
777<St_Code,St_iCode,St_XmlCode>. {
779 yyextra->token.verb+=yytext;
781<St_HtmlOnlyOption>" [block]" {
782 yyextra->token.name=
"block";
785<St_HtmlOnlyOption>.|\n {
789<St_HtmlOnlyOption>"\\ilinebr" {
793<St_HtmlOnly>{CMD}"endhtmlonly" {
794 return Token::make_RetVal_OK();
796<St_HtmlOnly>[^\\@\n$]+ |
800 yyextra->token.verb+=yytext;
802<St_ManOnly>{CMD}"endmanonly" {
803 return Token::make_RetVal_OK();
805<St_ManOnly>[^\\@\n$]+ |
809 yyextra->token.verb+=yytext;
811<St_RtfOnly>{CMD}"endrtfonly" {
812 return Token::make_RetVal_OK();
814<St_RtfOnly>[^\\@\n$]+ |
818 yyextra->token.verb+=yytext;
820<St_LatexOnly>{CMD}"endlatexonly" {
821 return Token::make_RetVal_OK();
823<St_LatexOnly>[^\\@\n]+ |
827 yyextra->token.verb+=yytext;
829<St_XmlOnly>{CMD}"endxmlonly" {
830 return Token::make_RetVal_OK();
832<St_XmlOnly>[^\\@\n]+ |
836 yyextra->token.verb+=yytext;
838<St_DbOnly>{CMD}"enddocbookonly" {
839 return Token::make_RetVal_OK();
841<St_DbOnly>[^\\@\n]+ |
845 yyextra->token.verb+=yytext;
847<St_Verbatim>{CMD}"endverbatim" {
848 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
849 return Token::make_RetVal_OK();
851<St_ILiteral>{CMD}"endiliteral " {
853 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
854 return Token::make_RetVal_OK();
856<St_iVerbatim>{CMD}"endiverbatim" {
857 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
858 return Token::make_RetVal_OK();
860<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
861<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
862<St_Verbatim,St_iVerbatim,St_ILiteral>. {
864 yyextra->token.verb+=yytext;
866<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
868 return Token::make_RetVal_OK();
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
870<St_ILiteralOpt>"\\ilinebr" |
871<St_ILiteralOpt>"\n" |
873 yyextra->token.sectionId =
"";
875 return Token::make_RetVal_OK();
877<St_Dot>{CMD}"enddot" {
878 return Token::make_RetVal_OK();
884 yyextra->token.verb+=yytext;
886<St_Msc>{CMD}("endmsc") {
887 return Token::make_RetVal_OK();
893 yyextra->token.verb+=yytext;
895<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
897 return Token::make_RetVal_OK();
899<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
901 return Token::make_RetVal_OK();
903<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
905 return Token::make_RetVal_OK();
907<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
909 return Token::make_RetVal_OK();
911<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
913 return Token::make_RetVal_OK();
915<St_PlantUMLOpt>"\\ilinebr" |
916<St_PlantUMLOpt>"\n" |
918 yyextra->token.sectionId =
"";
920 return Token::make_RetVal_OK();
922<St_PlantUML>{CMD}"enduml" {
923 return Token::make_RetVal_OK();
925<St_PlantUML>[^\\@\n]+ |
929 yyextra->token.verb+=yytext;
935 yyextra->token.chars=yytext;
936 return Token::make_TK_WHITESPACE();
944 return Token::make_TK_NONE();
946<St_Title>"\\ilinebr" {
948 return Token::make_TK_NONE();
950<St_TitleN>"&"{ID}";" {
951 yyextra->token.name = yytext;
952 return Token::make_TK_SYMBOL();
954<St_TitleN>{HTMLTAG} {
955 yyextra->token.name = yytext;
957 return Token::make_TK_HTMLTAG();
961 return Token::make_TK_NONE();
963<St_TitleN>"\\ilinebr" {
965 return Token::make_TK_NONE();
969 yyextra->token.name = yytext+1;
975 yyextra->token.name = &yytext[1];
977 yyextra->token.name = yytext;
978 return Token::make_TK_WORD();
983 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
986 yyextra->token.name = &yytext[1];
988 yyextra->token.name = yytext;
989 return Token::make_TK_WORD();
992 yyextra->token.chars=yytext;
993 return Token::make_TK_WHITESPACE();
995<St_TitleQ>"&"{ID}";" {
996 yyextra->token.name = yytext;
997 return Token::make_TK_SYMBOL();
999<St_TitleQ>(\n|"\\ilinebr") {
1001 return Token::make_TK_NONE();
1003<St_TitleQ>{SPCMD1} |
1004<St_TitleQ>{SPCMD2} {
1005 yyextra->token.name = yytext+1;
1009<St_TitleQ>{WORD1NQ} |
1010<St_TitleQ>{WORD2NQ} {
1011 yyextra->token.name = yytext;
1012 return Token::make_TK_WORD();
1015 yyextra->token.chars=yytext;
1016 return Token::make_TK_WHITESPACE();
1020 return Token::make_TK_NONE();
1022<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1023 yyextra->token.name = yytext;
1024 int pos = yyextra->token.name.find(
'=');
1026 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1029<St_TitleV>[^ \t\r\n]+ {
1031 yyextra->token.chars = yytext;
1033 return Token::make_TK_WORD();
1035<St_TitleV,St_TitleA>. {
1037 return Token::make_TK_NONE();
1039<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1041 return Token::make_TK_NONE();
1044<St_Anchor>{LABELID}{WS}? {
1047 return Token::make_TK_WORD();
1051 return Token::make_TK_NONE();
1054 if (yytext[0] ==
'"')
1056 yyextra->token.name=yytext+1;
1057 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1061 yyextra->token.name=yytext;
1063 return Token::make_TK_WORD();
1067 return Token::make_TK_NONE();
1069<St_Cite>(\n|"\\ilinebr") {
1071 return Token::make_TK_NONE();
1075 return Token::make_TK_NONE();
1077<St_DoxyConfig>{DOXYCFG} {
1078 yyextra->token.name=yytext;
1079 return Token::make_TK_WORD();
1081<St_DoxyConfig>{BLANK} {
1083 return Token::make_TK_NONE();
1085<St_DoxyConfig>(\n|"\\ilinebr") {
1087 return Token::make_TK_NONE();
1091 return Token::make_TK_NONE();
1093<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1094 yyextra->token.name=yytext;
1095 return Token::make_TK_WORD();
1097<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1098 yyextra->token.name=yytext;
1099 return Token::make_TK_WORD();
1102 yyextra->token.name=yytext;
1103 return Token::make_TK_WORD();
1107 return Token::make_TK_NONE();
1109<St_Ref>{WS}+"\""{WS}* {
1113<St_Ref>(\n|"\\ilinebr") {
1115 return Token::make_TK_NONE();
1117<St_Ref>"\""[^"\n]+"\"" {
1118 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1119 return Token::make_TK_WORD();
1123 return Token::make_TK_NONE();
1125<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1126 yyextra->token.name = yytext;
1127 return Token::make_TK_WORD();
1129<St_IntRef>{BLANK}+"\"" {
1132<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1133 yyextra->token.name = yytext;
1134 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1135 return Token::make_TK_WORD();
1137<St_SetScope>{SCOPEMASK}"<" {
1138 yyextra->token.name = yytext;
1139 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1140 yyextra->sharpCount=1;
1141 BEGIN(St_SetScopeEnd);
1143<St_SetScope>{BLANK} {
1145<St_SetScopeEnd>"<" {
1146 yyextra->token.name += yytext;
1147 yyextra->sharpCount++;
1149<St_SetScopeEnd>">" {
1150 yyextra->token.name += yytext;
1151 yyextra->sharpCount--;
1152 if (yyextra->sharpCount<=0)
1154 return Token::make_TK_WORD();
1158 yyextra->token.name += yytext;
1160<St_Ref2>"&"{ID}";" {
1161 yyextra->token.name = yytext;
1162 return Token::make_TK_SYMBOL();
1164<St_Ref2>"\""|\n|"\\ilinebr" {
1166 return Token::make_TK_NONE();
1168<St_Ref2>{HTMLTAG_STRICT} {
1171 return Token::make_TK_HTMLTAG();
1175 yyextra->token.name = yytext+1;
1182 yyextra->token.name = yytext;
1183 return Token::make_TK_WORD();
1186 yyextra->token.chars=yytext;
1187 return Token::make_TK_WHITESPACE();
1189<St_XRefItem>{LABELID} {
1190 yyextra->token.name=yytext;
1193 BEGIN(St_XRefItem2);
1195<St_XRefItem2>[0-9]+"." {
1197 numStr=numStr.left((
int)yyleng-1);
1198 yyextra->token.id=numStr.toInt();
1199 return Token::make_RetVal_OK();
1201<St_Para,St_Title,St_Ref2>"<!--" {
1202 yyextra->commentState = YY_START;
1205<St_Param>"\""[^\n\"]+"\"" {
1206 yyextra->token.name = yytext+1;
1207 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1208 return Token::make_TK_WORD();
1210<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1213 int j = params.find(
'&');
1214 int i = params.find(
'$');
1216 if (j<i && j>=0) i=j;
1218 yyextra->token.name =
types+
"#"+params.mid(i);
1219 return Token::make_TK_WORD();
static const char types[][NUM_HTML_LIST_TYPES]
1221<St_Param>[^ \t\n,@\\]+ {
1222 yyextra->token.name = yytext;
1223 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1225 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1227 return Token::make_TK_WORD();
1229<St_Param>{WS}*","{WS}*
1232 yyextra->token.chars=yytext;
1233 return Token::make_TK_WHITESPACE();
1235<St_Prefix>"\""[^\n\"]*"\"" {
1236 yyextra->token.name = yytext+1;
1237 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1238 return Token::make_TK_WORD();
1242 return Token::make_TK_NONE();
1245 yyextra->token.name+=yytext;
1247<St_Options>{WS}*":"{WS}* {
1249 yyextra->token.name+=
":";
1251<St_Options>{WS}*","{WS}* |
1254 yyextra->token.name+=
",";
1257 return Token::make_TK_WORD();
1260 yyextra->token.name+=yytext;
1263 return Token::make_TK_WORD();
1265<St_Emoji>[:0-9_a-z+-]+ {
1266 yyextra->token.name=yytext;
1267 return Token::make_TK_WORD();
1271 return Token::make_TK_NONE();
1273<St_QuotedString>"\"" {
1274 yyextra->token.name=
"";
1275 BEGIN(St_QuotedContent);
1277<St_QuotedString>(\n|"\\ilinebr") {
1279 return Token::make_TK_NONE();
1283 return Token::make_TK_NONE();
1285<St_QuotedContent>"\"" {
1286 return Token::make_TK_WORD();
1288<St_QuotedContent>. {
1289 yyextra->token.name+=yytext;
1291<St_ShowDate>{WS}+{SHOWDATE} {
1293 yyextra->token.name=yytext;
1294 return Token::make_TK_WORD();
1296<St_ShowDate>(\n|"\\ilinebr") {
1298 return Token::make_TK_NONE();
1302 return Token::make_TK_NONE();
1304<St_ILine>{LINENR}/[\\@\n\.] |
1305<St_ILine>{LINENR}{BLANK} {
1310 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '%s' for iline command",yytext);
1314 yyextra->yyLineNr = nr;
1316 return Token::make_TK_WORD();
1319 return Token::make_TK_NONE();
1321<St_IFile>{BLANK}*{FILEMASK} {
1323 return Token::make_TK_WORD();
1325<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1328 yyextra->fileName = text.
mid(1,text.
length()-2);
1329 return Token::make_TK_WORD();
1331<St_File>{FILEMASK} {
1332 yyextra->token.name = yytext;
1333 return Token::make_TK_WORD();
1335<St_File>"\""[^\n\"]+"\"" {
1337 yyextra->token.name = text.
mid(1,text.
length()-2);
1338 return Token::make_TK_WORD();
1340<St_Pattern>[^\\\r\n]+ {
1341 yyextra->token.name += yytext;
1343<St_Pattern>"\\ilinebr" {
1344 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1345 return Token::make_TK_WORD();
1349 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1350 return Token::make_TK_WORD();
1353 yyextra->token.name += yytext;
1355<St_Link>{LINKMASK}|{REFWORD} {
1356 yyextra->token.name = yytext;
1357 return Token::make_TK_WORD();
1360 BEGIN(yyextra->commentState);
1368<St_SkipTitle>(\n|"\\ilinebr") {
1369 if (*yytext ==
'\n') unput(
'\n');
1370 return Token::make_TK_NONE();
1375<St_Sections>[^\n@\<]+
1376<St_Sections>{CMD}("<"|{CMD})
1377<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1380 int s=tag.find(
"id=");
1384 if (c==
'\'' || c==
'"')
1386 int e=tag.find(c,s+4);
1390 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1396<St_Sections>{CMD}"anchor"{BLANK}+ {
1398 BEGIN(St_SecLabel1);
static constexpr int Anchor
1400<St_Sections>{CMD}"ianchor"{BLANK}+ {
1402 BEGIN(St_SecLabel1);
1404<St_Sections>{CMD}"section"{BLANK}+ {
1406 BEGIN(St_SecLabel2);
static constexpr int Section
1408<St_Sections>{CMD}"subsection"{BLANK}+ {
1410 BEGIN(St_SecLabel2);
static constexpr int Subsection
1412<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1414 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1416<St_Sections>{CMD}"paragraph"{BLANK}+ {
1418 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1420<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1422 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1424<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1426 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1428<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1429 yyextra->endMarker=
"endverbatim";
1432<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1433 yyextra->endMarker=
"endiverbatim";
1436<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1437 yyextra->endMarker=
"endiliteral";
1440<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1441 yyextra->endMarker=
"enddot";
1444<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1445 yyextra->endMarker=
"endmsc";
1448<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1449 yyextra->endMarker=
"enduml";
1452<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1453 yyextra->endMarker=
"endhtmlonly";
1456<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1457 yyextra->endMarker=
"endlatexonly";
1460<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1461 yyextra->endMarker=
"endmanonly";
1464<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1465 yyextra->endMarker=
"endrtfonly";
1468<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1469 yyextra->endMarker=
"endxmlonly";
1472<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1473 yyextra->endMarker=
"enddocbookonly";
1476<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1477 yyextra->endMarker=
"endcode";
1480<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1481 yyextra->endMarker=
"endicode";
1484<St_Sections>"<!--" {
1485 yyextra->endMarker=
"-->";
1488<St_SecSkip>{CMD}{ID} {
1489 if (yyextra->endMarker==yytext+1)
1495 if (yyextra->endMarker==yytext)
1500<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1502<St_SecSkip>(\n|"\\ilinebr")
1504<St_Sections>(\n|"\\ilinebr")
1505<St_SecLabel1>{LABELID} {
1507 yyextra->secLabel = yytext;
1511<St_SecLabel2>{LABELID}{BLANK}+ |
1512<St_SecLabel2>{LABELID} {
1513 yyextra->secLabel = yytext;
1514 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1517<St_SecTitle>[^\n]+ |
1518<St_SecTitle>[^\n]*\n {
1520 yyextra->secTitle = yytext;
1521 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1522 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1524 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1529<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1530 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '%s' while looking for section label or title",yytext);
1533<St_Snippet>[^\\\n]+ {
1534 yyextra->token.name += yytext;
1537 yyextra->token.name += yytext;
1539<St_Snippet>(\n|"\\ilinebr") {
1541 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1542 return Token::make_TK_WORD();
1548 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1554 yyextra->token.name = yytext;
1558 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '%s'",yytext);
1566 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1568 const char *p = yyextra->inputString + yyextra->inputPos;
1569 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1570 yyextra->inputPos+=c;
1576 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1579 if (yyextra->definition)
1581 file = yyextra->definition->getOutputFileBase();
1585 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor %s without context",
qPrint(yyextra->secLabel));
1591 si->
setType(yyextra->secType);
1597 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1600 yyextra->token.text = tagText;
1601 yyextra->token.attribs.
clear();
1602 yyextra->token.endTag =
FALSE;
1603 yyextra->token.emptyTag =
FALSE;
1607 if (tagText.
at(1)==
'/')
1609 yyextra->token.endTag =
TRUE;
1614 int i = startNamePos;
1615 for (i=startNamePos; i < (int)yyleng; i++)
1618 char c = tagText.
at(i);
1619 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1621 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1625 int startAttribList = i;
1626 while (i<(
int)yyleng)
1628 char c=tagText.
at(i);
1630 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1632 if (c ==
'>')
break;
1636 yyextra->token.emptyTag =
TRUE;
1641 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1644 optName = tagText.
mid(startName,endName-startName).
lower();
1646 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1647 if (tagText.
at(i)==
'=')
1649 int startAttrib=0, endAttrib=0;
1652 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1653 if (tagText.
at(i)==
'\'')
1659 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1661 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1663 else if (tagText.
at(i)==
'"')
1668 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1670 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1676 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1678 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1680 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1681 if (optName ==
"align") optValue = optValue.
lower();
1682 else if (optName ==
"valign")
1684 optValue = optValue.
lower();
1685 if (optValue ==
"center") optValue=
"middle";
1693 yyextra->token.attribs.emplace_back(optName,optValue);
1695 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1708 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1710 yyextra->lexerStack.push(
1711 std::make_unique<DocLexerContext>(
1712 yyextra->token,YY_START,
1713 yyextra->autoListLevel,
1715 yyextra->inputString,
1716 YY_CURRENT_BUFFER));
1717 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1723 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1725 if (yyextra->lexerStack.empty())
return FALSE;
1726 const auto &ctx = yyextra->lexerStack.top();
1727 yyextra->autoListLevel = ctx->autoListLevel;
1728 yyextra->inputPos = ctx->inputPos;
1729 yyextra->inputString = ctx->inputString;
1730 yyextra->token = ctx->token;
1732 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1733 yy_switch_to_buffer(ctx->state, yyscanner);
1736 yyextra->lexerStack.pop();
1744 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1753 doctokenizerYYlex_destroy(
p->yyscanner);
1758 return doctokenizerYYlex(
p->yyscanner);
1764 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1772 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1776 yyextra->inputString = input.
data();
1778 yyextra->inputPos = 0;
1779 yyextra->definition = d;
1780 yyextra->fileName = fileName;
1782 yyextra->yyLineNr = 1;
1783 doctokenizerYYlex(yyscanner);
1789 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1790 yyextra->autoListLevel = 0;
1791 yyextra->inputString = input;
1792 yyextra->inputPos = 0;
1793 yyextra->fileName = fileName;
1794 yyextra->insidePre =
FALSE;
1795 yyextra->markdownSupport = markdownSupport;
1796 yyextra->insideHtmlLink = insideHtmlLink;
1803 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1804 return &yyextra->token;
1810 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1812 return &yyextra->token;
1818 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1819 yyextra->insideHtmlLink =
false;
1826 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1833 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1840 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1841 yyextra->token.verb=
"";
1842 yyextra->token.name=
"";
1849 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1850 yyextra->token.verb=
"";
1851 yyextra->token.name=
"";
1858 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1859 yyextra->token.verb=
"";
1860 yyextra->token.name=
"";
1867 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1868 yyextra->token.verb=
"";
1869 yyextra->token.name=
"";
1870 BEGIN(St_HtmlOnlyOption);
1876 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1877 yyextra->token.verb=
"";
1884 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1885 yyextra->token.verb=
"";
1892 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1893 yyextra->token.verb=
"";
1900 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1901 yyextra->token.verb=
"";
1908 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1909 yyextra->token.verb=
"";
1910 BEGIN(St_LatexOnly);
1916 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1917 yyextra->token.verb=
"";
1924 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1925 yyextra->token.verb=
"";
1926 BEGIN(St_ILiteralOpt);
1932 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1933 yyextra->token.verb=
"";
1940 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1941 yyextra->token.verb=
"";
1942 BEGIN(St_iVerbatim);
1948 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1949 yyextra->token.verb=
"";
1956 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1957 yyextra->token.verb=
"";
1964 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1965 yyextra->token.verb=
"";
1966 yyextra->token.sectionId=
"";
1967 BEGIN(St_PlantUMLOpt);
1973 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1974 yyextra->token.verb=
"";
1981 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1988 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1995 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2002 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2009 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2010 yyextra->token.name =
"";
2017 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2024 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2031 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2032 BEGIN(St_DoxyConfig);
2038 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2045 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2052 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2059 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2060 BEGIN(St_SkipTitle);
2066 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2073 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2080 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2081 yyextra->token.name=
"";
2088 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2095 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2096 yyextra->token.name=
"";
2103 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2104 yyextra->token.name=
"";
2111 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2112 yyextra->token.name=
"";
2119 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2126 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2127 BEGIN(St_QuotedString);
2133 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2140 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2141 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2147 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2148 yyextra->insidePre = b;
2154 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2156 int l =
static_cast<int>(tagName.
length());
2158 for (
int i=l-1;i>=0;i--)
2168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2169 yyextra->autoListLevel++;
2175 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2176 yyextra->autoListLevel--;
2182 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2183 yyextra->yyLineNr = lineno;
2189 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2190 return yyextra->yyLineNr;
2196 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2197 yyextra->stateStack.push(YYSTATE);
2203 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2204 assert(!yyextra->stateStack.empty());
2205 BEGIN(yyextra->stateStack.top());
2206 yyextra->stateStack.pop();
2209#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
Find an object given the key.
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