17%option never-interactive
18%option prefix="doctokenizerYY"
20%option extra-type="struct doctokenizerYY_state *"
24#define YY_TYPEDEF_YY_SCANNER_T
52#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)
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')
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);
165static inline const char *
getLexerFILE() {
return __FILE__;}
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.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static const char * getLexerFILE()
#define Config_getInt(name)
QCString extractPartAfterNewLine(const QCString &text)
static void processSection(yyscan_t yyscanner)
static void handleHtmlTag(yyscan_t yyscanner, const char *text)
Portable versions of functions that are platform dependent.
Some helper functions for std::string.
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
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();
int findRev(char c, int index=-1, bool cs=TRUE) const
#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();
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}* {
1120 yyextra->expectQuote=
true;
1124<St_Ref>(\n|"\\ilinebr") {
1126 return Token::make_TK_NONE();
1128<St_Ref>"\""[^"\n]+"\"" {
1129 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1130 return Token::make_TK_WORD();
1134 return Token::make_TK_NONE();
1136<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1137 yyextra->token.name = yytext;
1138 return Token::make_TK_WORD();
1140<St_IntRef>{BLANK}+"\"" {
1143<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1144 yyextra->token.name = yytext;
1145 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1146 return Token::make_TK_WORD();
1148<St_SetScope>{SCOPEMASK}"<" {
1149 yyextra->token.name = yytext;
1150 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1151 yyextra->sharpCount=1;
1152 BEGIN(St_SetScopeEnd);
1154<St_SetScope>{BLANK} {
1156<St_SetScopeEnd>"<" {
1157 yyextra->token.name += yytext;
1158 yyextra->sharpCount++;
1160<St_SetScopeEnd>">" {
1161 yyextra->token.name += yytext;
1162 yyextra->sharpCount--;
1163 if (yyextra->sharpCount<=0)
1165 return Token::make_TK_WORD();
1169 yyextra->token.name += yytext;
1171<St_Ref2>"&"{ID}";" {
1172 yyextra->token.name = yytext;
1173 return Token::make_TK_SYMBOL();
1175<St_Ref2>"\""|\n|"\\ilinebr" {
1177 if (!yyextra->expectQuote || yytext[0]==
'"')
1179 return Token::make_TK_NONE();
1183 yyextra->token.name += yytext;
1186<St_Ref2>{HTMLTAG_STRICT} {
1189 return Token::make_TK_HTMLTAG();
1193 yyextra->token.name = yytext+1;
1200 yyextra->token.name = yytext;
1201 return Token::make_TK_WORD();
1204 yyextra->token.chars=yytext;
1205 return Token::make_TK_WHITESPACE();
1207<St_XRefItem>{LABELID} {
1208 yyextra->token.name=yytext;
1211 BEGIN(St_XRefItem2);
1213<St_XRefItem2>[0-9]+"." {
1215 numStr=numStr.left((
int)yyleng-1);
1216 yyextra->token.id=numStr.toInt();
1217 return Token::make_RetVal_OK();
1219<St_Para,St_Title,St_Ref2>"<!--" {
1220 yyextra->commentState = YY_START;
1223<St_Param>"\""[^\n\"]+"\"" {
1224 yyextra->token.name = yytext+1;
1225 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1226 return Token::make_TK_WORD();
1228<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1231 int j = params.find(
'&');
1232 int i = params.find(
'$');
1234 if (j<i && j>=0) i=j;
1236 yyextra->token.name = types+
"#"+params.
mid(i);
1237 return Token::make_TK_WORD();
QCString left(size_t len) const
1239<St_Param>[^ \t\n,@\\]+ {
1240 yyextra->token.name = yytext;
1241 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1243 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1245 return Token::make_TK_WORD();
1247<St_Param>{WS}*","{WS}*
1250 yyextra->token.chars=yytext;
1251 return Token::make_TK_WHITESPACE();
1253<St_Prefix>"\""[^\n\"]*"\"" {
1254 yyextra->token.name = yytext+1;
1255 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1256 return Token::make_TK_WORD();
1260 return Token::make_TK_NONE();
1263 yyextra->token.name+=yytext;
1265<St_Options>{WS}*":"{WS}* {
1267 yyextra->token.name+=
":";
1269<St_Options>{WS}*","{WS}* |
1272 yyextra->token.name+=
",";
1275 return Token::make_TK_WORD();
1278 yyextra->token.name+=yytext;
1281 return Token::make_TK_WORD();
1283<St_Emoji>[:0-9_a-z+-]+ {
1284 yyextra->token.name=yytext;
1285 return Token::make_TK_WORD();
1289 return Token::make_TK_NONE();
1291<St_QuotedString>"\"" {
1292 yyextra->token.name=
"";
1293 BEGIN(St_QuotedContent);
1295<St_QuotedString>(\n|"\\ilinebr") {
1297 return Token::make_TK_NONE();
1301 return Token::make_TK_NONE();
1303<St_QuotedContent>"\"" {
1304 return Token::make_TK_WORD();
1306<St_QuotedContent>. {
1307 yyextra->token.name+=yytext;
1309<St_ShowDate>{WS}+{SHOWDATE} {
1311 yyextra->token.name=yytext;
1312 return Token::make_TK_WORD();
1314<St_ShowDate>(\n|"\\ilinebr") {
1316 return Token::make_TK_NONE();
1320 return Token::make_TK_NONE();
1322<St_ILine>{LINENR}/[\\@\n\.] |
1323<St_ILine>{LINENR}{BLANK} {
1328 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1332 yyextra->yyLineNr = nr;
1334 return Token::make_TK_WORD();
1337 return Token::make_TK_NONE();
1339<St_IFile>{BLANK}*{FILEMASK} {
1341 return Token::make_TK_WORD();
1343<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1346 yyextra->fileName = text.
mid(1,text.
length()-2);
1347 return Token::make_TK_WORD();
1349<St_File>{FILEMASK} {
1350 yyextra->token.name = yytext;
1351 if (yyextra->token.name.endsWith(
"\\ilinebr") ||yyextra->token.name.endsWith(
"@ilinebr"))
1354 yyextra->token.name = yyextra->token.name.left(yyleng-8);
1356 return Token::make_TK_WORD();
1358<St_File>"\""[^\n\"]+"\"" {
1360 yyextra->token.name = text.
mid(1,text.
length()-2);
1361 return Token::make_TK_WORD();
1363<St_Pattern>[^\\\r\n]+ {
1364 yyextra->token.name += yytext;
1366<St_Pattern>"\\ilinebr" {
1367 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1368 return Token::make_TK_WORD();
1372 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1373 return Token::make_TK_WORD();
1376 yyextra->token.name += yytext;
1378<St_Link>{LINKMASK}|{REFWORD} {
1379 yyextra->token.name = yytext;
1380 return Token::make_TK_WORD();
1383 BEGIN(yyextra->commentState);
1391<St_SkipTitle>(\n|"\\ilinebr") {
1392 if (*yytext ==
'\n') unput(
'\n');
1393 return Token::make_TK_NONE();
1398<St_Sections>[^\n@\<]+
1399<St_Sections>{CMD}("<"|{CMD})
1400<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1403 int s=tag.find(
"id=");
1407 if (c==
'\'' || c==
'"')
1409 int e=tag.find(c,s+4);
1413 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1419<St_Sections>{CMD}"anchor"{BLANK}+ {
1421 BEGIN(St_SecLabel1);
static constexpr int Anchor
1423<St_Sections>{CMD}"ianchor"{BLANK}+ {
1425 BEGIN(St_SecLabel1);
1427<St_Sections>{CMD}"section"{BLANK}+ {
1429 BEGIN(St_SecLabel2);
static constexpr int Section
1431<St_Sections>{CMD}"subsection"{BLANK}+ {
1433 BEGIN(St_SecLabel2);
static constexpr int Subsection
1435<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1437 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1439<St_Sections>{CMD}"paragraph"{BLANK}+ {
1441 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1443<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1445 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1447<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1449 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1451<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1452 yyextra->endMarker=
"endverbatim";
1455<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1456 yyextra->endMarker=
"endiverbatim";
1459<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1460 yyextra->endMarker=
"endiliteral";
1463<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1464 yyextra->endMarker=
"enddot";
1467<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1468 yyextra->endMarker=
"endmsc";
1471<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1472 yyextra->endMarker=
"enduml";
1475<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1476 yyextra->endMarker=
"endhtmlonly";
1479<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1480 yyextra->endMarker=
"endlatexonly";
1483<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1484 yyextra->endMarker=
"endmanonly";
1487<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1488 yyextra->endMarker=
"endrtfonly";
1491<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1492 yyextra->endMarker=
"endxmlonly";
1495<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1496 yyextra->endMarker=
"enddocbookonly";
1499<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1500 yyextra->endMarker=
"endcode";
1503<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1504 yyextra->endMarker=
"endicode";
1507<St_Sections>"<!--" {
1508 yyextra->endMarker=
"-->";
1511<St_SecSkip>{CMD}{ID} {
1512 if (yyextra->endMarker==yytext+1)
1518 if (yyextra->endMarker==yytext)
1523<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1525<St_SecSkip>(\n|"\\ilinebr")
1527<St_Sections>(\n|"\\ilinebr")
1528<St_SecLabel1>{LABELID} {
1530 yyextra->secLabel = yytext;
1534<St_SecLabel2>{LABELID}{BLANK}+ |
1535<St_SecLabel2>{LABELID} {
1536 yyextra->secLabel = yytext;
1537 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1540<St_SecTitle>[^\n]+ |
1541<St_SecTitle>[^\n]*\n {
1543 yyextra->secTitle = yytext;
1544 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1545 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1547 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1552<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1553 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1556<St_Snippet>[^\\\n]+ {
1557 yyextra->token.name += yytext;
1560 yyextra->token.name += yytext;
1562<St_Snippet>(\n|"\\ilinebr") {
1564 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1565 return Token::make_TK_WORD();
1571 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1577 yyextra->token.name = yytext;
1581 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1589 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1591 const char *p = yyextra->inputString + yyextra->inputPos;
1592 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1593 yyextra->inputPos+=c;
1599 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1602 if (yyextra->definition)
1604 file = yyextra->definition->getOutputFileBase();
1608 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1614 si->
setType(yyextra->secType);
1620 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1623 yyextra->token.text = tagText;
1624 yyextra->token.attribs.clear();
1625 yyextra->token.endTag =
FALSE;
1626 yyextra->token.emptyTag =
FALSE;
1630 if (tagText.at(1)==
'/')
1632 yyextra->token.endTag =
TRUE;
1637 int i = startNamePos;
1638 for (i=startNamePos; i < (int)yyleng; i++)
1641 char c = tagText.at(i);
1642 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1644 yyextra->token.name = tagText.mid(startNamePos,i-startNamePos);
1648 int startAttribList = i;
1649 while (i<(
int)yyleng)
1651 char c=tagText.at(i);
1653 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.at(++i); }
1655 if (c ==
'>')
break;
1659 yyextra->token.emptyTag =
TRUE;
1664 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.at(++i); }
1667 optName = tagText.
mid(startName,endName-startName).
lower();
1669 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.at(++i); }
1670 if (tagText.at(i)==
'=')
1672 int startAttrib=0, endAttrib=0;
1675 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.at(++i); }
1676 if (tagText.at(i)==
'\'')
1682 while (i<(
int)yyleng && c!=
'\'') { c=tagText.at(++i); }
1684 if (i<(
int)yyleng) { c=tagText.at(++i);}
1686 else if (tagText.at(i)==
'"')
1691 while (i<(
int)yyleng && c!=
'"') { c=tagText.at(++i); }
1693 if (i<(
int)yyleng) { c=tagText.at(++i);}
1699 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.at(++i); }
1701 if (i<(
int)yyleng) { c=tagText.at(++i);}
1703 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1704 if (optName ==
"align") optValue = optValue.
lower();
1705 else if (optName ==
"valign")
1707 optValue = optValue.
lower();
1708 if (optValue ==
"center") optValue=
"middle";
1716 yyextra->token.attribs.emplace_back(optName,optValue);
1718 yyextra->token.attribsStr = tagText.mid(startAttribList,i-startAttribList);
1731 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1733 yyextra->lexerStack.push(
1734 std::make_unique<DocLexerContext>(
1735 yyextra->token,YY_START,
1736 yyextra->autoListLevel,
1738 yyextra->inputString,
1739 YY_CURRENT_BUFFER));
1740 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1746 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1748 if (yyextra->lexerStack.empty())
return FALSE;
1749 const auto &ctx = yyextra->lexerStack.top();
1750 yyextra->autoListLevel = ctx->autoListLevel;
1751 yyextra->inputPos = ctx->inputPos;
1752 yyextra->inputString = ctx->inputString;
1753 yyextra->token = ctx->token;
1755 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1756 yy_switch_to_buffer(ctx->state, yyscanner);
1759 yyextra->lexerStack.pop();
1767 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1776 doctokenizerYYlex_destroy(
p->yyscanner);
1781 return doctokenizerYYlex(
p->yyscanner);
1787 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1795 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1799 yyextra->inputString = input.
data();
1801 yyextra->inputPos = 0;
1802 yyextra->definition = d;
1803 yyextra->fileName = fileName;
1805 yyextra->yyLineNr = 1;
1806 doctokenizerYYlex(yyscanner);
1812 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1813 yyextra->autoListLevel = 0;
1814 yyextra->inputString = input;
1815 yyextra->inputPos = 0;
1816 yyextra->fileName = fileName;
1817 yyextra->insidePre =
FALSE;
1818 yyextra->markdownSupport = markdownSupport;
1819 yyextra->insideHtmlLink = insideHtmlLink;
1826 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1827 return &yyextra->token;
1833 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1835 return &yyextra->token;
1841 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1842 yyextra->insideHtmlLink =
false;
1849 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1856 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1863 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1864 yyextra->token.verb=
"";
1865 yyextra->token.name=
"";
1872 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1873 yyextra->token.verb=
"";
1874 yyextra->token.name=
"";
1881 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1882 yyextra->token.verb=
"";
1883 yyextra->token.name=
"";
1890 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1891 yyextra->token.verb=
"";
1892 yyextra->token.name=
"";
1893 BEGIN(St_HtmlOnlyOption);
1899 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1900 yyextra->token.verb=
"";
1907 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1908 yyextra->token.verb=
"";
1915 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1916 yyextra->token.verb=
"";
1923 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1924 yyextra->token.verb=
"";
1931 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1932 yyextra->token.verb=
"";
1933 BEGIN(St_LatexOnly);
1939 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1940 yyextra->token.verb=
"";
1947 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1948 yyextra->token.verb=
"";
1949 BEGIN(St_ILiteralOpt);
1955 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1956 yyextra->token.verb=
"";
1963 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1964 yyextra->token.verb=
"";
1965 BEGIN(St_iVerbatim);
1971 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1972 yyextra->token.verb=
"";
1979 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1980 yyextra->token.verb=
"";
1987 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1988 yyextra->token.verb=
"";
1989 yyextra->token.sectionId=
"";
1990 BEGIN(St_PlantUMLOpt);
1996 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1997 yyextra->token.verb=
"";
2004 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2011 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2018 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2025 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2032 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2033 yyextra->token.name =
"";
2040 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2047 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2054 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2055 BEGIN(St_DoxyConfig);
2061 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2062 yyextra->expectQuote=
false;
2069 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2076 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2083 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2084 BEGIN(St_SkipTitle);
2090 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2097 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2104 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2105 yyextra->token.name=
"";
2112 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2119 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2120 yyextra->token.name=
"";
2127 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2128 yyextra->token.name=
"";
2135 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2136 yyextra->token.name=
"";
2143 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2150 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2151 BEGIN(St_QuotedString);
2157 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2164 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2165 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2171 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2172 yyextra->insidePre = b;
2178 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2180 int l =
static_cast<int>(tagName.
length());
2182 for (
int i=l-1;i>=0;i--)
2192 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2193 yyextra->autoListLevel++;
2199 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2200 yyextra->autoListLevel--;
2206 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2207 yyextra->yyLineNr = lineno;
2213 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2214 return yyextra->yyLineNr;
2220 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2221 yyextra->stateStack.push(YYSTATE);
2227 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2228 assert(!yyextra->stateStack.empty());
2229 BEGIN(yyextra->stateStack.top());
2230 yyextra->stateStack.pop();
2233#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
const char * qPrint(const char *s)
doctokenizerYY_state extra