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
59 DocLexerContext(
const TokenInfo &tk,
int r,
int lvl,yy_size_t pos,
const char *s,YY_BUFFER_STATE bs)
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()
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)
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}?
226SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
227SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
228FUNCARG "("{FUNCPART}")"({BLANK}*("volatile"|"const"){BLANK})?
229FUNCARG2 "("{FUNCPART}")"({BLANK}*("volatile"|"const"))?
230OPNEW {BLANK}+"new"({BLANK}*"[]")?
231OPDEL {BLANK}+"delete"({BLANK}*"[]")?
232OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"|"<=>"
233OPCAST {BLANK}+[^<(\r\n.,][^(\r\n.,]*
234OPMASK ({BLANK}*{OPNORM}{FUNCARG})
235OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
236OPMASKOP2 ({BLANK}*{OPNORM}{FUNCARG2}?)|({OPCAST}{FUNCARG2})
237LNKWORD1 ("::"|"#")?{SCOPEMASK}
238CVSPEC {BLANK}*("const"|"volatile")
239LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
240LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
241CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
242ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
243CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
244WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""([^"\n]*(\\\"|\n)?)*[^"\n]*"\"")
245WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
246WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
247WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
248CAPTION [cC][aA][pP][tT][iI][oO][nN]
249HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
250HTMLKEYL "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"
251HTMLKEYU "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"
252HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
253HTMLTAG_STRICT "<"(("/")?){HTMLKEYW}({WS}+{ATTRIB})*{WS}*(("/")?)">"
254REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
255REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
256REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
257REFWORD3 ({ID}":")*{ID}":"?
258REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
259REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
260REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
261REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
262RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$"
263LINENR {BLANK}*([1-9][0-9]*|"0"|"-1")
265SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[0-9]{1,2})?)?
332<St_Para>^{LISTITEM} {
333 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
336 uint32_t dashPos =
static_cast<uint32_t
>(text.findRev(
'-'));
337 assert(dashPos!=
static_cast<uint32_t
>(-1));
338 yyextra->token.isEnumList = text.at(dashPos+1)==
'#';
339 yyextra->token.isCheckedList =
false;
340 yyextra->token.id = -1;
342 return Token::make_TK_LISTITEM();
#define lineCount(s, len)
344<St_Para>^{CLISTITEM} {
346 int dashPos = text.
findRev(
'-');
347 yyextra->token.isEnumList =
false;
348 yyextra->token.isCheckedList =
true;
353 return Token::make_TK_LISTITEM();
int findRev(char c, int index=-1, bool cs=TRUE) const
355<St_Para>^{MLISTITEM} {
356 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
363 std::string text(yytext);
364 static const reg::Ex re(R
"([*+][^*+]*$)");
367 size_t listPos =
match.position();
368 assert(listPos!=std::string::npos);
369 yyextra->token.isEnumList =
false;
370 yyextra->token.isCheckedList =
false;
371 yyextra->token.id = -1;
373 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.
376<St_Para>^{OLISTITEM} {
377 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
383 std::string text(yytext);
384 static const reg::Ex re(R
"(\d+)");
387 size_t markPos =
match.position();
388 assert(markPos!=std::string::npos);
389 yyextra->token.isEnumList =
true;
390 yyextra->token.isCheckedList =
false;
393 yyextra->token.id = ok ? id : -1;
396 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '%s' ",
match.str().c_str());
399 return Token::make_TK_LISTITEM();
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
402<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} {
403 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
406 uint32_t dashPos =
static_cast<uint32_t
>(text.
findRev(
'-'));
407 assert(dashPos!=
static_cast<uint32_t
>(-1));
408 yyextra->token.isEnumList = text.
at(dashPos+1)==
'#';
409 yyextra->token.isCheckedList =
false;
410 yyextra->token.id = -1;
412 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.
414<St_Para>{BLANK}*\n{CLISTITEM} {
417 int dashPos = text.
findRev(
'-');
418 yyextra->token.isEnumList =
false;
419 yyextra->token.isCheckedList =
true;
424 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
426<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} {
427 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
435 static const reg::Ex re(R
"([*+][^*+]*$)");
438 size_t markPos =
match.position();
439 assert(markPos!=std::string::npos);
440 yyextra->token.isEnumList =
FALSE;
441 yyextra->token.isCheckedList =
false;
442 yyextra->token.id = -1;
444 return Token::make_TK_LISTITEM();
const std::string & str() const
447<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} {
448 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
456 static const reg::Ex re(R
"(\d+)");
459 size_t markPos =
match.position();
460 assert(markPos!=std::string::npos);
461 yyextra->token.isEnumList =
true;
462 yyextra->token.isCheckedList =
false;
465 yyextra->token.id = ok ? id : -1;
468 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '%s' ",
match.str().c_str());
471 return Token::make_TK_LISTITEM();
475 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
479 return Token::make_TK_ENDLIST();
481<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} {
482 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
485 size_t dotPos =
static_cast<size_t>(text.
findRev(
'.'));
487 return Token::make_TK_ENDLIST();
489<St_Para>"{"{BLANK}*"@linkplain"/{WS}+ {
490 yyextra->token.name =
"javalinkplain";
491 return Token::make_TK_COMMAND_AT();
493<St_Para>"{"{BLANK}*"@link"/{WS}+ {
494 yyextra->token.name =
"javalink";
495 return Token::make_TK_COMMAND_AT();
497<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
498 yyextra->token.name =
"inheritdoc";
499 return Token::make_TK_COMMAND_AT();
505 yyextra->token.name =
"_form";
static Token char_to_command(char c)
514 yyextra->token.name = yytext+1;
515 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
519<St_Para>"\\ilinebr" {
525 yyextra->token.name = yytext+1;
526 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
531 yyextra->token.name =
"param";
533 bool isIn = s.find(
"in")!=-1;
534 bool isOut = s.find(
"out")!=-1;
556<St_Para>{URLPROTOCOL}{URLMASK}/[,\.] {
557 yyextra->token.name=yytext;
558 yyextra->token.isEMailAddr=
FALSE;
559 return Token::make_TK_URL();
561<St_Para>{URLPROTOCOL}{URLMASK} {
562 yyextra->token.name=yytext;
563 yyextra->token.isEMailAddr=
FALSE;
564 return Token::make_TK_URL();
566<St_Para>"<"{URLPROTOCOL}{URLMASK}">" {
567 yyextra->token.name=yytext;
568 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
569 yyextra->token.isEMailAddr=
FALSE;
570 return Token::make_TK_URL();
573 yyextra->token.name=yytext;
574 yyextra->token.name.stripPrefix(
"mailto:");
575 yyextra->token.isEMailAddr=
TRUE;
576 return Token::make_TK_URL();
578<St_Para>"<"{MAILADDR}">" {
579 yyextra->token.name=yytext;
580 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
581 yyextra->token.name.stripPrefix(
"mailto:");
582 yyextra->token.isEMailAddr=
TRUE;
583 return Token::make_TK_URL();
585<St_Para>"<"{MAILADDR2}">" {
586 yyextra->token.name=yytext;
587 return Token::make_TK_WORD();
591 int index=tagName.find(
':');
592 if (index<0) index=0;
593 yyextra->token.name = tagName.left(index);
594 int text_begin = index+2;
595 int text_end =
static_cast<int>(tagName.length())-1;
596 if (tagName[text_begin-1]==
':')
599 if (tagName[text_end-1]==
'#')
604 yyextra->token.text = tagName.mid(text_begin,text_end-text_begin);
605 return Token::make_TK_RCSTAG();
607<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" |
608<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" {
610 name = name.left(
static_cast<int>(name.length())-1);
612 for (
int i=
static_cast<int>(value.
length())-1;i>=0;i--) unput(value.
at(i));
QCString getenv(const QCString &variable)
617 return Token::make_TK_HTMLTAG();
619<St_Para,St_Text>"&"{ID}";" {
620 yyextra->token.name = yytext;
621 return Token::make_TK_SYMBOL();
626<St_Para>{ID}/"<"{HTMLKEYW}">" {
629 yyextra->token.name = yytext;
630 return Token::make_TK_LNKWORD();
632<St_Para>{LNKWORD1}/"<tt>" {
633 yyextra->token.name = yytext;
634 return Token::make_TK_LNKWORD();
636<St_Para>{LNKWORD1}/"<br>" |
638<St_Para>{LNKWORD1}{FUNCARG} |
641 yyextra->token.name = yytext;
642 return Token::make_TK_LNKWORD();
644<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
645 yyextra->token.name = yytext;
646 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
647 unput(yytext[(
int)yyleng-1]);
648 return Token::make_TK_LNKWORD();
652<St_Para,St_Text>[\-+0-9] |
653<St_Para,St_Text>{WORD1} |
654<St_Para,St_Text>{WORD2} {
655 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
658 yyextra->token.name = &yytext[1];
660 yyextra->token.name = yytext;
661 return Token::make_TK_WORD();
663<St_Text>({ID}".")+{ID} {
664 yyextra->token.name = yytext;
665 return Token::make_TK_WORD();
667<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
669 yyextra->token.name = yytext;
670 return Token::make_TK_WORD();
675<St_Para,St_Text>{BLANK}+ |
676<St_Para,St_Text>{BLANK}*\n{BLANK}* {
678 yyextra->token.chars=yytext;
679 return Token::make_TK_WHITESPACE();
681<St_Text>[\\@<>&$#%~] {
682 yyextra->token.name = yytext;
685<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
686 if (yyextra->insidePre || yyextra->autoListLevel==0)
692<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
693 if (yyextra->insidePre || yyextra->autoListLevel==0)
698<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
699 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
705<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
706 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
712<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
713<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
715 if (yyextra->insidePre)
717 yyextra->token.chars=yytext;
718 return Token::make_TK_WHITESPACE();
726 for (i=0;i<yyextra->token.indent;i++)
732 YY_CURRENT_BUFFER->yy_at_bol=1;
734 return Token::make_TK_NEWPARA();
737<St_CodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
738 yyextra->token.name = yytext;
739 int i=yyextra->token.name.find(
'{');
740 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
743<St_iCodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
744 yyextra->token.name = yytext;
745 int i=yyextra->token.name.find(
'{');
746 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
749<St_CodeOpt>"\\ilinebr" |
755<St_iCodeOpt>"\\ilinebr" |
761<St_Code>{WS}*{CMD}"endcode" {
763 return Token::make_RetVal_OK();
765<St_iCode>{WS}*{CMD}"endicode" {
767 return Token::make_RetVal_OK();
769<St_XmlCode>{WS}*"</code>" {
771 return Token::make_RetVal_OK();
773<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
774<St_Code,St_iCode,St_XmlCode>\n |
775<St_Code,St_iCode,St_XmlCode>. {
777 yyextra->token.verb+=yytext;
779<St_HtmlOnlyOption>" [block]" {
780 yyextra->token.name=
"block";
783<St_HtmlOnlyOption>.|\n {
787<St_HtmlOnlyOption>"\\ilinebr" {
791<St_HtmlOnly>{CMD}"endhtmlonly" {
792 return Token::make_RetVal_OK();
794<St_HtmlOnly>[^\\@\n$]+ |
798 yyextra->token.verb+=yytext;
800<St_ManOnly>{CMD}"endmanonly" {
801 return Token::make_RetVal_OK();
803<St_ManOnly>[^\\@\n$]+ |
807 yyextra->token.verb+=yytext;
809<St_RtfOnly>{CMD}"endrtfonly" {
810 return Token::make_RetVal_OK();
812<St_RtfOnly>[^\\@\n$]+ |
816 yyextra->token.verb+=yytext;
818<St_LatexOnly>{CMD}"endlatexonly" {
819 return Token::make_RetVal_OK();
821<St_LatexOnly>[^\\@\n]+ |
825 yyextra->token.verb+=yytext;
827<St_XmlOnly>{CMD}"endxmlonly" {
828 return Token::make_RetVal_OK();
830<St_XmlOnly>[^\\@\n]+ |
834 yyextra->token.verb+=yytext;
836<St_DbOnly>{CMD}"enddocbookonly" {
837 return Token::make_RetVal_OK();
839<St_DbOnly>[^\\@\n]+ |
843 yyextra->token.verb+=yytext;
845<St_Verbatim>{CMD}"endverbatim" {
846 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
847 return Token::make_RetVal_OK();
849<St_ILiteral>{CMD}"endiliteral " {
851 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
852 return Token::make_RetVal_OK();
854<St_iVerbatim>{CMD}"endiverbatim" {
855 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
856 return Token::make_RetVal_OK();
858<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
859<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
860<St_Verbatim,St_iVerbatim,St_ILiteral>. {
862 yyextra->token.verb+=yytext;
864<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
866 return Token::make_RetVal_OK();
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
868<St_ILiteralOpt>"\\ilinebr" |
869<St_ILiteralOpt>"\n" |
871 yyextra->token.sectionId =
"";
873 return Token::make_RetVal_OK();
875<St_Dot>{CMD}"enddot" {
876 return Token::make_RetVal_OK();
882 yyextra->token.verb+=yytext;
884<St_Msc>{CMD}("endmsc") {
885 return Token::make_RetVal_OK();
891 yyextra->token.verb+=yytext;
893<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
895 return Token::make_RetVal_OK();
897<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
899 return Token::make_RetVal_OK();
901<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
903 return Token::make_RetVal_OK();
905<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
907 return Token::make_RetVal_OK();
909<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
911 return Token::make_RetVal_OK();
913<St_PlantUMLOpt>"\\ilinebr" |
914<St_PlantUMLOpt>"\n" |
916 yyextra->token.sectionId =
"";
918 return Token::make_RetVal_OK();
920<St_PlantUML>{CMD}"enduml" {
921 return Token::make_RetVal_OK();
923<St_PlantUML>[^\\@\n]+ |
927 yyextra->token.verb+=yytext;
933 yyextra->token.chars=yytext;
934 return Token::make_TK_WHITESPACE();
942 return Token::make_TK_NONE();
944<St_Title>"\\ilinebr" {
946 return Token::make_TK_NONE();
948<St_TitleN>"&"{ID}";" {
949 yyextra->token.name = yytext;
950 return Token::make_TK_SYMBOL();
952<St_TitleN>{HTMLTAG} {
953 yyextra->token.name = yytext;
955 return Token::make_TK_HTMLTAG();
959 return Token::make_TK_NONE();
961<St_TitleN>"\\ilinebr" {
963 return Token::make_TK_NONE();
967 yyextra->token.name = yytext+1;
973 yyextra->token.name = &yytext[1];
975 yyextra->token.name = yytext;
976 return Token::make_TK_WORD();
981 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
984 yyextra->token.name = &yytext[1];
986 yyextra->token.name = yytext;
987 return Token::make_TK_WORD();
990 yyextra->token.chars=yytext;
991 return Token::make_TK_WHITESPACE();
993<St_TitleQ>"&"{ID}";" {
994 yyextra->token.name = yytext;
995 return Token::make_TK_SYMBOL();
997<St_TitleQ>(\n|"\\ilinebr") {
999 return Token::make_TK_NONE();
1001<St_TitleQ>{SPCMD1} |
1002<St_TitleQ>{SPCMD2} {
1003 yyextra->token.name = yytext+1;
1007<St_TitleQ>{WORD1NQ} |
1008<St_TitleQ>{WORD2NQ} {
1009 yyextra->token.name = yytext;
1010 return Token::make_TK_WORD();
1013 yyextra->token.chars=yytext;
1014 return Token::make_TK_WHITESPACE();
1018 return Token::make_TK_NONE();
1020<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1021 yyextra->token.name = yytext;
1022 int pos = yyextra->token.name.find(
'=');
1024 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1027<St_TitleV>[^ \t\r\n]+ {
1029 yyextra->token.chars = yytext;
1031 return Token::make_TK_WORD();
1033<St_TitleV,St_TitleA>. {
1035 return Token::make_TK_NONE();
1037<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1039 return Token::make_TK_NONE();
1042<St_Anchor>{LABELID}{WS}? {
1045 return Token::make_TK_WORD();
1049 return Token::make_TK_NONE();
1052 if (yytext[0] ==
'"')
1054 yyextra->token.name=yytext+1;
1055 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1059 yyextra->token.name=yytext;
1061 return Token::make_TK_WORD();
1065 return Token::make_TK_NONE();
1067<St_Cite>(\n|"\\ilinebr") {
1069 return Token::make_TK_NONE();
1073 return Token::make_TK_NONE();
1075<St_DoxyConfig>{DOXYCFG} {
1076 yyextra->token.name=yytext;
1077 return Token::make_TK_WORD();
1079<St_DoxyConfig>{BLANK} {
1081 return Token::make_TK_NONE();
1083<St_DoxyConfig>(\n|"\\ilinebr") {
1085 return Token::make_TK_NONE();
1089 return Token::make_TK_NONE();
1091<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1092 yyextra->token.name=yytext;
1093 return Token::make_TK_WORD();
1095<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1096 yyextra->token.name=yytext;
1097 return Token::make_TK_WORD();
1100 yyextra->token.name=yytext;
1101 return Token::make_TK_WORD();
1105 return Token::make_TK_NONE();
1107<St_Ref>{WS}+"\""{WS}* {
1111<St_Ref>(\n|"\\ilinebr") {
1113 return Token::make_TK_NONE();
1115<St_Ref>"\""[^"\n]+"\"" {
1116 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1117 return Token::make_TK_WORD();
1121 return Token::make_TK_NONE();
1123<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1124 yyextra->token.name = yytext;
1125 return Token::make_TK_WORD();
1127<St_IntRef>{BLANK}+"\"" {
1130<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1131 yyextra->token.name = yytext;
1132 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1133 return Token::make_TK_WORD();
1135<St_SetScope>{SCOPEMASK}"<" {
1136 yyextra->token.name = yytext;
1137 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1138 yyextra->sharpCount=1;
1139 BEGIN(St_SetScopeEnd);
1141<St_SetScope>{BLANK} {
1143<St_SetScopeEnd>"<" {
1144 yyextra->token.name += yytext;
1145 yyextra->sharpCount++;
1147<St_SetScopeEnd>">" {
1148 yyextra->token.name += yytext;
1149 yyextra->sharpCount--;
1150 if (yyextra->sharpCount<=0)
1152 return Token::make_TK_WORD();
1156 yyextra->token.name += yytext;
1158<St_Ref2>"&"{ID}";" {
1159 yyextra->token.name = yytext;
1160 return Token::make_TK_SYMBOL();
1162<St_Ref2>"\""|\n|"\\ilinebr" {
1164 return Token::make_TK_NONE();
1166<St_Ref2>{HTMLTAG_STRICT} {
1169 return Token::make_TK_HTMLTAG();
1173 yyextra->token.name = yytext+1;
1180 yyextra->token.name = yytext;
1181 return Token::make_TK_WORD();
1184 yyextra->token.chars=yytext;
1185 return Token::make_TK_WHITESPACE();
1187<St_XRefItem>{LABELID} {
1188 yyextra->token.name=yytext;
1191 BEGIN(St_XRefItem2);
1193<St_XRefItem2>[0-9]+"." {
1195 numStr=numStr.left((
int)yyleng-1);
1196 yyextra->token.id=numStr.toInt();
1197 return Token::make_RetVal_OK();
1199<St_Para,St_Title,St_Ref2>"<!--" {
1200 yyextra->commentState = YY_START;
1203<St_Param>"\""[^\n\"]+"\"" {
1204 yyextra->token.name = yytext+1;
1205 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1206 return Token::make_TK_WORD();
1208<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1211 int j = params.find(
'&');
1212 int i = params.find(
'$');
1214 if (j<i && j>=0) i=j;
1216 yyextra->token.name =
types+
"#"+params.mid(i);
1217 return Token::make_TK_WORD();
static const char types[][NUM_HTML_LIST_TYPES]
1219<St_Param>[^ \t\n,@\\]+ {
1220 yyextra->token.name = yytext;
1221 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1223 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1225 return Token::make_TK_WORD();
1227<St_Param>{WS}*","{WS}*
1230 yyextra->token.chars=yytext;
1231 return Token::make_TK_WHITESPACE();
1233<St_Prefix>"\""[^\n\"]*"\"" {
1234 yyextra->token.name = yytext+1;
1235 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1236 return Token::make_TK_WORD();
1240 return Token::make_TK_NONE();
1243 yyextra->token.name+=yytext;
1245<St_Options>{WS}*":"{WS}* {
1247 yyextra->token.name+=
":";
1249<St_Options>{WS}*","{WS}* |
1252 yyextra->token.name+=
",";
1255 return Token::make_TK_WORD();
1258 yyextra->token.name+=yytext;
1261 return Token::make_TK_WORD();
1263<St_Emoji>[:0-9_a-z+-]+ {
1264 yyextra->token.name=yytext;
1265 return Token::make_TK_WORD();
1269 return Token::make_TK_NONE();
1271<St_QuotedString>"\"" {
1272 yyextra->token.name=
"";
1273 BEGIN(St_QuotedContent);
1275<St_QuotedString>(\n|"\\ilinebr") {
1277 return Token::make_TK_NONE();
1281 return Token::make_TK_NONE();
1283<St_QuotedContent>"\"" {
1284 return Token::make_TK_WORD();
1286<St_QuotedContent>. {
1287 yyextra->token.name+=yytext;
1289<St_ShowDate>{WS}+{SHOWDATE} {
1291 yyextra->token.name=yytext;
1292 return Token::make_TK_WORD();
1294<St_ShowDate>(\n|"\\ilinebr") {
1296 return Token::make_TK_NONE();
1300 return Token::make_TK_NONE();
1302<St_ILine>{LINENR}/[\\@\n\.] |
1303<St_ILine>{LINENR}{BLANK} {
1308 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '%s' for iline command",yytext);
1312 yyextra->yyLineNr = nr;
1314 return Token::make_TK_WORD();
1317 return Token::make_TK_NONE();
1319<St_IFile>{BLANK}*{FILEMASK} {
1321 return Token::make_TK_WORD();
1323<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1326 yyextra->fileName = text.
mid(1,text.
length()-2);
1327 return Token::make_TK_WORD();
1329<St_File>{FILEMASK} {
1330 yyextra->token.name = yytext;
1331 return Token::make_TK_WORD();
1333<St_File>"\""[^\n\"]+"\"" {
1335 yyextra->token.name = text.
mid(1,text.
length()-2);
1336 return Token::make_TK_WORD();
1338<St_Pattern>[^\\\r\n]+ {
1339 yyextra->token.name += yytext;
1341<St_Pattern>"\\ilinebr" {
1342 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1343 return Token::make_TK_WORD();
1347 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1348 return Token::make_TK_WORD();
1351 yyextra->token.name += yytext;
1353<St_Link>{LINKMASK}|{REFWORD} {
1354 yyextra->token.name = yytext;
1355 return Token::make_TK_WORD();
1358 BEGIN(yyextra->commentState);
1366<St_SkipTitle>(\n|"\\ilinebr") {
1367 if (*yytext ==
'\n') unput(
'\n');
1368 return Token::make_TK_NONE();
1373<St_Sections>[^\n@\<]+
1374<St_Sections>{CMD}("<"|{CMD})
1375<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1378 int s=tag.find(
"id=");
1382 if (c==
'\'' || c==
'"')
1384 int e=tag.find(c,s+4);
1388 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1394<St_Sections>{CMD}"anchor"{BLANK}+ {
1396 BEGIN(St_SecLabel1);
static constexpr int Anchor
1398<St_Sections>{CMD}"ianchor"{BLANK}+ {
1400 BEGIN(St_SecLabel1);
1402<St_Sections>{CMD}"section"{BLANK}+ {
1404 BEGIN(St_SecLabel2);
static constexpr int Section
1406<St_Sections>{CMD}"subsection"{BLANK}+ {
1408 BEGIN(St_SecLabel2);
static constexpr int Subsection
1410<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1412 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1414<St_Sections>{CMD}"paragraph"{BLANK}+ {
1416 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1418<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1420 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1422<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1424 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1426<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1427 yyextra->endMarker=
"endverbatim";
1430<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1431 yyextra->endMarker=
"endiverbatim";
1434<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1435 yyextra->endMarker=
"endiliteral";
1438<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1439 yyextra->endMarker=
"enddot";
1442<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1443 yyextra->endMarker=
"endmsc";
1446<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1447 yyextra->endMarker=
"enduml";
1450<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1451 yyextra->endMarker=
"endhtmlonly";
1454<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1455 yyextra->endMarker=
"endlatexonly";
1458<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1459 yyextra->endMarker=
"endmanonly";
1462<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1463 yyextra->endMarker=
"endrtfonly";
1466<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1467 yyextra->endMarker=
"endxmlonly";
1470<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1471 yyextra->endMarker=
"enddocbookonly";
1474<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1475 yyextra->endMarker=
"endcode";
1478<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1479 yyextra->endMarker=
"endicode";
1482<St_Sections>"<!--" {
1483 yyextra->endMarker=
"-->";
1486<St_SecSkip>{CMD}{ID} {
1487 if (yyextra->endMarker==yytext+1)
1493 if (yyextra->endMarker==yytext)
1498<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1500<St_SecSkip>(\n|"\\ilinebr")
1502<St_Sections>(\n|"\\ilinebr")
1503<St_SecLabel1>{LABELID} {
1505 yyextra->secLabel = yytext;
1509<St_SecLabel2>{LABELID}{BLANK}+ |
1510<St_SecLabel2>{LABELID} {
1511 yyextra->secLabel = yytext;
1512 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1515<St_SecTitle>[^\n]+ |
1516<St_SecTitle>[^\n]*\n {
1518 yyextra->secTitle = yytext;
1519 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1520 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1522 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1527<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1528 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '%s' while looking for section label or title",yytext);
1531<St_Snippet>[^\\\n]+ {
1532 yyextra->token.name += yytext;
1535 yyextra->token.name += yytext;
1537<St_Snippet>(\n|"\\ilinebr") {
1539 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1540 return Token::make_TK_WORD();
1546 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1552 yyextra->token.name = yytext;
1556 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '%s'",yytext);
1564 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1566 const char *p = yyextra->inputString + yyextra->inputPos;
1567 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1568 yyextra->inputPos+=c;
1574 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1577 if (yyextra->definition)
1579 file = yyextra->definition->getOutputFileBase();
1583 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor %s without context",
qPrint(yyextra->secLabel));
1589 si->
setType(yyextra->secType);
1595 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1598 yyextra->token.text = tagText;
1599 yyextra->token.attribs.
clear();
1600 yyextra->token.endTag =
FALSE;
1601 yyextra->token.emptyTag =
FALSE;
1605 if (tagText.
at(1)==
'/')
1607 yyextra->token.endTag =
TRUE;
1612 int i = startNamePos;
1613 for (i=startNamePos; i < (int)yyleng; i++)
1616 char c = tagText.
at(i);
1617 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1619 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1623 int startAttribList = i;
1624 while (i<(
int)yyleng)
1626 char c=tagText.
at(i);
1628 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1630 if (c ==
'>')
break;
1634 yyextra->token.emptyTag =
TRUE;
1639 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1642 opt.
name = tagText.
mid(startName,endName-startName).
lower();
1644 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1645 if (tagText.
at(i)==
'=')
1647 int startAttrib=0, endAttrib=0;
1650 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1651 if (tagText.
at(i)==
'\'')
1657 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1659 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1661 else if (tagText.
at(i)==
'"')
1666 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1668 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1674 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1676 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1678 opt.
value = tagText.
mid(startAttrib,endAttrib-startAttrib);
1680 else if (opt.
name ==
"valign")
1683 if (opt.
value ==
"center") opt.
value=
"middle";
1691 yyextra->token.attribs.push_back(opt);
1693 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1706 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1708 yyextra->lexerStack.push(
1709 std::make_unique<DocLexerContext>(
1710 yyextra->token,YY_START,
1711 yyextra->autoListLevel,
1713 yyextra->inputString,
1714 YY_CURRENT_BUFFER));
1715 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1721 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1723 if (yyextra->lexerStack.empty())
return FALSE;
1724 const auto &ctx = yyextra->lexerStack.top();
1725 yyextra->autoListLevel = ctx->autoListLevel;
1726 yyextra->inputPos = ctx->inputPos;
1727 yyextra->inputString = ctx->inputString;
1728 yyextra->token = ctx->token;
1730 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1731 yy_switch_to_buffer(ctx->state, yyscanner);
1734 yyextra->lexerStack.pop();
1742 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1751 doctokenizerYYlex_destroy(
p->yyscanner);
1756 return doctokenizerYYlex(
p->yyscanner);
1762 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1770 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1774 yyextra->inputString = input.
data();
1776 yyextra->inputPos = 0;
1777 yyextra->definition = d;
1778 yyextra->fileName = fileName;
1780 yyextra->yyLineNr = 1;
1781 doctokenizerYYlex(yyscanner);
1787 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1788 yyextra->autoListLevel = 0;
1789 yyextra->inputString = input;
1790 yyextra->inputPos = 0;
1791 yyextra->fileName = fileName;
1792 yyextra->insidePre =
FALSE;
1793 yyextra->markdownSupport = markdownSupport;
1794 yyextra->insideHtmlLink = insideHtmlLink;
1801 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1802 return &yyextra->token;
1808 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1809 yyextra->token = TokenInfo();
1810 return &yyextra->token;
1816 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1817 yyextra->insideHtmlLink =
false;
1824 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1831 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1838 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1839 yyextra->token.verb=
"";
1840 yyextra->token.name=
"";
1847 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1848 yyextra->token.verb=
"";
1849 yyextra->token.name=
"";
1856 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1857 yyextra->token.verb=
"";
1858 yyextra->token.name=
"";
1865 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1866 yyextra->token.verb=
"";
1867 yyextra->token.name=
"";
1868 BEGIN(St_HtmlOnlyOption);
1874 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1875 yyextra->token.verb=
"";
1882 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1883 yyextra->token.verb=
"";
1890 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1891 yyextra->token.verb=
"";
1898 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1899 yyextra->token.verb=
"";
1906 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1907 yyextra->token.verb=
"";
1908 BEGIN(St_LatexOnly);
1914 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1915 yyextra->token.verb=
"";
1922 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1923 yyextra->token.verb=
"";
1924 BEGIN(St_ILiteralOpt);
1930 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1931 yyextra->token.verb=
"";
1938 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1939 yyextra->token.verb=
"";
1940 BEGIN(St_iVerbatim);
1946 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1947 yyextra->token.verb=
"";
1954 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1955 yyextra->token.verb=
"";
1962 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1963 yyextra->token.verb=
"";
1964 yyextra->token.sectionId=
"";
1965 BEGIN(St_PlantUMLOpt);
1971 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1972 yyextra->token.verb=
"";
1979 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1986 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1993 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2000 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2007 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2008 yyextra->token.name =
"";
2015 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2022 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2029 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2030 BEGIN(St_DoxyConfig);
2036 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2043 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2050 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2057 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2058 BEGIN(St_SkipTitle);
2064 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2071 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2078 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2079 yyextra->token.name=
"";
2086 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2093 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2094 yyextra->token.name=
"";
2101 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2102 yyextra->token.name=
"";
2109 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2110 yyextra->token.name=
"";
2117 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2124 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2125 BEGIN(St_QuotedString);
2131 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2138 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2139 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2145 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2146 yyextra->insidePre = b;
2152 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2153 QCString tagName = tag;
2154 int l =
static_cast<int>(tagName.
length());
2156 for (
int i=l-1;i>=0;i--)
2166 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2167 yyextra->autoListLevel++;
2173 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2174 yyextra->autoListLevel--;
2180 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2181 yyextra->yyLineNr = lineno;
2187 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2188 return yyextra->yyLineNr;
2194 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2195 yyextra->stateStack.push(YYSTATE);
2201 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2202 assert(!yyextra->stateStack.empty());
2203 BEGIN(yyextra->stateStack.top());
2204 yyextra->stateStack.pop();
2207#include "doctokenizer.l.h"
static bool isFlagSet(const DebugMask mask)
The common base class of all entity definitions found in the sources.
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
Class representing a HTML attribute.
Data associated with a token used by the comment block parser.