19%option never-interactive
20%option prefix="doctokenizerYY"
22%option extra-type="struct doctokenizerYY_state *"
26#define YY_TYPEDEF_YY_SCANNER_T
54#define YY_NO_UNISTD_H 1
92 std::stack< std::unique_ptr<DocLexerContext> >
lexerStack;
98#define lineCount(s,len) do { for(int i=0;i<(int)len;i++) if (s[i]=='\n') yyextra->yyLineNr++; } while(0)
111 int nl1 = text.
find(
'\n');
112 int nl2 = text.
find(
"\\ilinebr");
113 if (nl1!=-1 && nl1<nl2)
115 return text.
mid(nl1+1);
119 if (text.
at(nl2+8)==
' ') nl2++;
120 return text.
mid(nl2+8);
129 if (str==0 || length==std::string::npos)
return 0;
133 for (i=0;i<length;i++)
137 indent+=tabSize - (indent%tabSize);
139 else if (str[i]==
'\n')
147 if (str[i+1]==
' ') i++;
160#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
164#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
171#define YY_DECL static Token doctokenizerYYlex(yyscan_t yyscanner)
174#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.
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
183ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
184LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
185REQID [a-z_A-Z0-9\x80-\xFF\-]+
186CODEID [a-zA-Z][a-zA-Z0-9+]*
187PHPTYPE [?]?[\\:a-z_A-Z0-9\x80-\xFF\-]+
188CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
189CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
190CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
191DOXYCFG [A-Z][A-Z_0-9]*
192MAILADDR ("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\-]+
193MAILWS [\t a-z_A-Z0-9\x80-\xFF+-]
194MAILADDR2 {MAILWS}+{BLANK}+("at"|"AT"|"_at_"|"_AT_"){BLANK}+{MAILWS}+("dot"|"DOT"|"_dot_"|"_DOT_"|"point"|"POINT"|"_point_"|"_POINT_"){BLANK}+{MAILWS}+
195LISTITEM {BLANK}*[-]("#")?{WS}
196MLISTITEM {BLANK}*[+*]{WS}
197OLISTITEM {BLANK}*("0"|[1-9][0-9]*)"."{BLANK}
198CLISTITEM {BLANK}*[-]{BLANK}*"\["[ xX]"\]"
199ENDLIST {BLANK}*"."{BLANK}*(\n|"\\ilinebr")
200ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
201ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
202URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=\x80-\xFF]
203URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
204URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
205FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
206FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
207FILECHARS {FILEICHAR}*{FILEECHAR}+
208HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
209VFILEMASK {FILECHARS}("."{FILECHARS})*
210FILEMASK {VFILEMASK}|{HFILEMASK}
211LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)?
212VERBATIM "verbatim"{BLANK}*
213SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
214SPCMD2 {CMD}[\\@<>&$#%~".+=|!?-]
215SPCMD3 {CMD}_form#[0-9]+
218INOUT "in"|"out"|("in"{BLANK}*","?{BLANK}*"out")|("out"{BLANK}*","?{BLANK}*"in")
219PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
221TEMPCHAR [a-z_A-Z0-9.,: \t\*\&\(\)\[\]]
222FUNCCHAR [a-z_A-Z0-9,:<> \t\n\^\*\&\[\]]|{VARARGS}|"\\ilinebr"
223FUNCPART {FUNCCHAR}*("("{FUNCCHAR}*")"{FUNCCHAR}*)?
225TEMPLPART "<"{TEMPCHAR}*("<"{TEMPCHAR}*("<"{TEMPCHAR}*">")?">")?">"
226ANONNS "anonymous_namespace{"[^}]*"}"
227SCOPEPRE (({ID}{TEMPLPART}?)|{ANONNS}){SCOPESEP}
228SCOPEKEYS ":"({ID}":")*
229SCOPECPP {SCOPEPRE}*(~)?{ID}{TEMPLPART}?
230SCOPECPPN {SCOPEPRE}*(~)?{ID}
231SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
232SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
233SCOPEMSKN {SCOPECPPN}|{SCOPEOBJC}
234FUNCARG "("{FUNCPART}")"({BLANK}*("volatile"|"const"){BLANK})?
235FUNCARG2 "("{FUNCPART}")"({BLANK}*("volatile"|"const"))?
236OPNEW {BLANK}+"new"({BLANK}*"[]")?
237OPDEL {BLANK}+"delete"({BLANK}*"[]")?
238OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"|"<=>"
239OPCAST {BLANK}+[^<(\r\n.,][^(\r\n.,]*
240OPMASK ({BLANK}*{OPNORM}{FUNCARG})
241OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
242OPMASKOP2 ({BLANK}*{OPNORM}{FUNCARG2}?)|({OPCAST}{FUNCARG2})
243LNKWORD1 ("::"|"#")?{SCOPEMASK}
244LNKWORDN ("::"|"#")?{SCOPEMSKN}
245CVSPEC {BLANK}*("const"|"volatile")
246LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
247LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
249CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
250ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
251CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
252WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""([^"\n]*(\\\"|\n)?)*[^"\n]*"\"")
253WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
254WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
255WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
256CAPTION [cC][aA][pP][tT][iI][oO][nN]
257HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
258HTMLKEYL "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"
259HTMLKEYU "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"
260HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
261HTMLTAG_STRICT "<"(("/")?){HTMLKEYW}({WS}+{ATTRIB})*{WS}*(("/")?)">"
262REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
263REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
264REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
265REFWORD3 ({ID}":")*{ID}":"?
266REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
267REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
268REFWORD {FILEMASK}|{REQID}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
269REFWORD_NOCV {FILEMASK}|{REQID}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
270RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$"
271LINENR {BLANK}*([1-9][0-9]*|"0"|"-1")
273SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[0-9]{1,2})?)?
342<St_Para>^{LISTITEM} {
343 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
346 uint32_t dashPos =
static_cast<uint32_t
>(text.findRev(
'-'));
347 assert(dashPos!=
static_cast<uint32_t
>(-1));
348 yyextra->token.isEnumList = text.at(dashPos+1)==
'#';
349 yyextra->token.isCheckedList =
false;
350 yyextra->token.id = -1;
352 return Token::make_TK_LISTITEM();
#define lineCount(s, len)
354<St_Para>^{CLISTITEM} {
356 int dashPos = text.
findRev(
'-');
357 yyextra->token.isEnumList =
false;
358 yyextra->token.isCheckedList =
true;
363 return Token::make_TK_LISTITEM();
int findRev(char c, int index=-1, bool cs=TRUE) const
365<St_Para>^{MLISTITEM} {
366 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
373 std::string text(yytext);
374 static const reg::Ex re(R
"([*+][^*+]*$)");
377 size_t listPos =
match.position();
378 assert(listPos!=std::string::npos);
379 yyextra->token.isEnumList =
false;
380 yyextra->token.isCheckedList =
false;
381 yyextra->token.id = -1;
383 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.
386<St_Para>^{OLISTITEM} {
387 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
393 std::string text(yytext);
394 static const reg::Ex re(R
"(\d+)");
397 size_t markPos =
match.position();
398 assert(markPos!=std::string::npos);
399 yyextra->token.isEnumList =
true;
400 yyextra->token.isCheckedList =
false;
403 yyextra->token.id = ok ? id : -1;
406 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
409 return Token::make_TK_LISTITEM();
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
412<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} {
413 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
416 uint32_t dashPos =
static_cast<uint32_t
>(text.
findRev(
'-'));
417 assert(dashPos!=
static_cast<uint32_t
>(-1));
418 yyextra->token.isEnumList = text.
at(dashPos+1)==
'#';
419 yyextra->token.isCheckedList =
false;
420 yyextra->token.id = -1;
422 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.
424<St_Para>{BLANK}*\n{CLISTITEM} {
427 int dashPos = text.
findRev(
'-');
428 yyextra->token.isEnumList =
false;
429 yyextra->token.isCheckedList =
true;
434 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
436<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} {
437 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
445 static const reg::Ex re(R
"([*+][^*+]*$)");
448 size_t markPos =
match.position();
449 assert(markPos!=std::string::npos);
450 yyextra->token.isEnumList =
FALSE;
451 yyextra->token.isCheckedList =
false;
452 yyextra->token.id = -1;
454 return Token::make_TK_LISTITEM();
const std::string & str() const
457<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} {
458 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
466 static const reg::Ex re(R
"(\d+)");
469 size_t markPos =
match.position();
470 assert(markPos!=std::string::npos);
471 yyextra->token.isEnumList =
true;
472 yyextra->token.isCheckedList =
false;
475 yyextra->token.id = ok ? id : -1;
478 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
481 return Token::make_TK_LISTITEM();
485 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
489 return Token::make_TK_ENDLIST();
491<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} {
492 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
495 size_t dotPos =
static_cast<size_t>(text.
findRev(
'.'));
497 return Token::make_TK_ENDLIST();
499<St_Para>"{"{BLANK}*"@linkplain"/{WS}+ {
500 yyextra->token.name =
"javalinkplain";
501 return Token::make_TK_COMMAND_AT();
503<St_Para>"{"{BLANK}*"@link"/{WS}+ {
504 yyextra->token.name =
"javalink";
505 return Token::make_TK_COMMAND_AT();
507<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
508 yyextra->token.name =
"inheritdoc";
509 return Token::make_TK_COMMAND_AT();
515 yyextra->token.name =
"_form";
static Token char_to_command(char c)
524 yyextra->token.name = yytext+1;
525 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
529<St_Para>"\\ilinebr" {
535 yyextra->token.name = yytext+1;
536 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
541 yyextra->token.name =
"param";
543 bool isIn = s.find(
"in")!=-1;
544 bool isOut = s.find(
"out")!=-1;
566<St_Para>{URLPROTOCOL}{URLMASK}/[,\.] {
567 yyextra->token.name=yytext;
568 yyextra->token.isEMailAddr=
FALSE;
569 return Token::make_TK_URL();
571<St_Para>{URLPROTOCOL}{URLMASK} {
572 yyextra->token.name=yytext;
573 yyextra->token.isEMailAddr=
FALSE;
574 return Token::make_TK_URL();
576<St_Para>"<"{URLPROTOCOL}{URLMASK}">" {
577 yyextra->token.name=yytext;
578 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
579 yyextra->token.isEMailAddr=
FALSE;
580 return Token::make_TK_URL();
583 yyextra->token.name=yytext;
584 yyextra->token.name.stripPrefix(
"mailto:");
585 yyextra->token.isEMailAddr=
TRUE;
586 return Token::make_TK_URL();
588<St_Para>"<"{MAILADDR}">" {
589 yyextra->token.name=yytext;
590 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
591 yyextra->token.name.stripPrefix(
"mailto:");
592 yyextra->token.isEMailAddr=
TRUE;
593 return Token::make_TK_URL();
595<St_Para>"<"{MAILADDR2}">" {
596 yyextra->token.name=yytext;
597 return Token::make_TK_WORD();
601 int index=tagName.find(
':');
602 if (index<0) index=0;
603 yyextra->token.name = tagName.left(index);
604 int text_begin = index+2;
605 int text_end =
static_cast<int>(tagName.length())-1;
606 if (tagName[text_begin-1]==
':')
609 if (tagName[text_end-1]==
'#')
614 yyextra->token.text = tagName.mid(text_begin,text_end-text_begin);
615 return Token::make_TK_RCSTAG();
617<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" |
618<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" {
620 name = name.left(
static_cast<int>(name.length())-1);
622 for (
int i=
static_cast<int>(value.
length())-1;i>=0;i--) unput(value.
at(i));
QCString getenv(const QCString &variable)
624<St_Para>"<blockquote>‍" {
628 YY_CURRENT_BUFFER->yy_at_bol=1;
631 return Token::make_TK_HTMLTAG();
636 return Token::make_TK_HTMLTAG();
638<St_Para,St_Text>"&"{ID}";" {
639 yyextra->token.name = yytext;
640 return Token::make_TK_SYMBOL();
645<St_Para>{ID}/"<"{HTMLKEYW}">"+ {
648 yyextra->token.name = yytext;
649 return Token::make_TK_LNKWORD();
651<St_Para>{LNKWORDN}/("<"{HTMLKEYW}">")+ {
652 yyextra->token.name = yytext;
653 return Token::make_TK_LNKWORD();
656<St_Para>{LNKWORD1}{FUNCARG} |
660 yyextra->token.name = yytext;
661 return Token::make_TK_LNKWORD();
663<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
664 yyextra->token.name = yytext;
665 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
666 unput(yytext[(
int)yyleng-1]);
667 return Token::make_TK_LNKWORD();
671<St_Para,St_Text>[\-+0-9] |
672<St_Para,St_Text>{WORD1} |
673<St_Para,St_Text>{WORD2} {
674 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
677 yyextra->token.name = &yytext[1];
679 yyextra->token.name = yytext;
680 return Token::make_TK_WORD();
682<St_Text>({ID}".")+{ID} {
683 yyextra->token.name = yytext;
684 return Token::make_TK_WORD();
686<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
688 yyextra->token.name = yytext;
689 return Token::make_TK_WORD();
694<St_Para,St_Text>{BLANK}+ |
695<St_Para,St_Text>{BLANK}*\n{BLANK}* {
697 yyextra->token.chars=yytext;
698 return Token::make_TK_WHITESPACE();
700<St_Text>[\\@<>&$#%~] {
701 yyextra->token.name = yytext;
704<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
705 if (yyextra->insidePre || yyextra->autoListLevel==0)
711<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
712 if (yyextra->insidePre || yyextra->autoListLevel==0)
717<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
718 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
724<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
725 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
731<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
732<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
734 if (yyextra->insidePre)
736 yyextra->token.chars=yytext;
737 return Token::make_TK_WHITESPACE();
745 for (i=0;i<yyextra->token.indent;i++)
751 YY_CURRENT_BUFFER->yy_at_bol=1;
753 return Token::make_TK_NEWPARA();
756<St_CodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
757 yyextra->token.name = yytext;
758 int i=yyextra->token.name.find(
'{');
759 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
762<St_iCodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
763 yyextra->token.name = yytext;
764 int i=yyextra->token.name.find(
'{');
765 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
768<St_CodeOpt>"\\ilinebr" |
774<St_iCodeOpt>"\\ilinebr" |
780<St_Code>{WS}*{CMD}"endcode" {
782 return Token::make_RetVal_OK();
784<St_iCode>{WS}*{CMD}"endicode" {
786 return Token::make_RetVal_OK();
788<St_XmlCode>{WS}*"</code>" {
790 return Token::make_RetVal_OK();
792<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
793<St_Code,St_iCode,St_XmlCode>\n |
794<St_Code,St_iCode,St_XmlCode>. {
796 yyextra->token.verb+=yytext;
798<St_HtmlOnlyOption>" [block]" {
799 yyextra->token.name=
"block";
802<St_HtmlOnlyOption>.|\n {
806<St_HtmlOnlyOption>"\\ilinebr" {
810<St_HtmlOnly>{CMD}"endhtmlonly" {
811 return Token::make_RetVal_OK();
813<St_HtmlOnly>[^\\@\n$]+ |
817 yyextra->token.verb+=yytext;
819<St_ManOnly>{CMD}"endmanonly" {
820 return Token::make_RetVal_OK();
822<St_ManOnly>[^\\@\n$]+ |
826 yyextra->token.verb+=yytext;
828<St_RtfOnly>{CMD}"endrtfonly" {
829 return Token::make_RetVal_OK();
831<St_RtfOnly>[^\\@\n$]+ |
835 yyextra->token.verb+=yytext;
837<St_LatexOnly>{CMD}"endlatexonly" {
838 return Token::make_RetVal_OK();
840<St_LatexOnly>[^\\@\n]+ |
844 yyextra->token.verb+=yytext;
846<St_XmlOnly>{CMD}"endxmlonly" {
847 return Token::make_RetVal_OK();
849<St_XmlOnly>[^\\@\n]+ |
853 yyextra->token.verb+=yytext;
855<St_DbOnly>{CMD}"enddocbookonly" {
856 return Token::make_RetVal_OK();
858<St_DbOnly>[^\\@\n]+ |
862 yyextra->token.verb+=yytext;
864<St_Verbatim>{CMD}"endverbatim" {
865 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
866 return Token::make_RetVal_OK();
868<St_ILiteral>{CMD}"endiliteral " {
870 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
871 return Token::make_RetVal_OK();
873<St_iVerbatim>{CMD}"endiverbatim" {
874 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
875 return Token::make_RetVal_OK();
877<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
878<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
879<St_Verbatim,St_iVerbatim,St_ILiteral>. {
881 yyextra->token.verb+=yytext;
883<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
885 return Token::make_RetVal_OK();
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
887<St_ILiteralOpt>"\\ilinebr" |
888<St_ILiteralOpt>"\n" |
890 yyextra->token.sectionId =
"";
892 return Token::make_RetVal_OK();
894<St_Dot>{CMD}"enddot" {
895 return Token::make_RetVal_OK();
901 yyextra->token.verb+=yytext;
903<St_Msc>{CMD}("endmsc") {
904 return Token::make_RetVal_OK();
910 yyextra->token.verb+=yytext;
912<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
914 return Token::make_RetVal_OK();
916<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
918 return Token::make_RetVal_OK();
920<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
922 return Token::make_RetVal_OK();
924<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
926 return Token::make_RetVal_OK();
928<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
930 return Token::make_RetVal_OK();
932<St_PlantUMLOpt>"\\ilinebr" |
933<St_PlantUMLOpt>"\n" |
935 yyextra->token.sectionId =
"";
937 return Token::make_RetVal_OK();
939<St_PlantUML>{CMD}"enduml" {
940 return Token::make_RetVal_OK();
942<St_PlantUML>[^\\@\n]+ |
946 yyextra->token.verb+=yytext;
948<St_MermaidOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
950 return Token::make_RetVal_OK();
952<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
954 return Token::make_RetVal_OK();
956<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
958 return Token::make_RetVal_OK();
960<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
962 return Token::make_RetVal_OK();
964<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
966 return Token::make_RetVal_OK();
968<St_MermaidOpt>"\\ilinebr" |
971 yyextra->token.sectionId =
"";
973 return Token::make_RetVal_OK();
975<St_Mermaid>{CMD}"endmermaid" {
976 return Token::make_RetVal_OK();
978<St_Mermaid>[^\\@\n]+ |
982 yyextra->token.verb+=yytext;
988 yyextra->token.chars=yytext;
989 return Token::make_TK_WHITESPACE();
997 return Token::make_TK_NONE();
999<St_Title>"\\ilinebr" {
1001 return Token::make_TK_NONE();
1003<St_TitleN>"&"{ID}";" {
1004 yyextra->token.name = yytext;
1005 return Token::make_TK_SYMBOL();
1007<St_TitleN>{HTMLTAG} {
1008 yyextra->token.name = yytext;
1010 return Token::make_TK_HTMLTAG();
1014 return Token::make_TK_NONE();
1016<St_TitleN>"\\ilinebr" {
1018 return Token::make_TK_NONE();
1020<St_TitleN>{SPCMD1} |
1021<St_TitleN>{SPCMD2} {
1022 yyextra->token.name = yytext+1;
1028 yyextra->token.name = &yytext[1];
1030 yyextra->token.name = yytext;
1031 return Token::make_TK_WORD();
1033<St_TitleN>[\-+0-9] |
1036 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
1039 yyextra->token.name = &yytext[1];
1041 yyextra->token.name = yytext;
1042 return Token::make_TK_WORD();
1045 yyextra->token.chars=yytext;
1046 return Token::make_TK_WHITESPACE();
1048<St_TitleQ>"&"{ID}";" {
1049 yyextra->token.name = yytext;
1050 return Token::make_TK_SYMBOL();
1052<St_TitleQ>(\n|"\\ilinebr") {
1054 return Token::make_TK_NONE();
1056<St_TitleQ>{SPCMD1} |
1057<St_TitleQ>{SPCMD2} {
1058 yyextra->token.name = yytext+1;
1062<St_TitleQ>{WORD1NQ} |
1063<St_TitleQ>{WORD2NQ} {
1064 yyextra->token.name = yytext;
1065 return Token::make_TK_WORD();
1068 yyextra->token.chars=yytext;
1069 return Token::make_TK_WHITESPACE();
1073 return Token::make_TK_NONE();
1075<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1076 yyextra->token.name = yytext;
1077 int pos = yyextra->token.name.find(
'=');
1079 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1082<St_TitleV>[^ \t\r\n]+ {
1084 yyextra->token.chars = yytext;
1086 return Token::make_TK_WORD();
1088<St_TitleV,St_TitleA>. {
1090 return Token::make_TK_NONE();
1092<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1094 return Token::make_TK_NONE();
1097<St_Anchor>({REQID}|{LABELID}){WS}? {
1100 return Token::make_TK_WORD();
1104 return Token::make_TK_NONE();
1107 if (yytext[0] ==
'"')
1109 yyextra->token.name=yytext+1;
1110 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1114 yyextra->token.name=yytext;
1116 return Token::make_TK_WORD();
1120 return Token::make_TK_NONE();
1122<St_Cite>(\n|"\\ilinebr") {
1124 return Token::make_TK_NONE();
1128 return Token::make_TK_NONE();
1130<St_DoxyConfig>{DOXYCFG} {
1131 yyextra->token.name=yytext;
1132 return Token::make_TK_WORD();
1134<St_DoxyConfig>{BLANK} {
1136 return Token::make_TK_NONE();
1138<St_DoxyConfig>(\n|"\\ilinebr") {
1140 return Token::make_TK_NONE();
1144 return Token::make_TK_NONE();
1146<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1147 yyextra->token.name=yytext;
1148 return Token::make_TK_WORD();
1150<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1151 yyextra->token.name=yytext;
1152 return Token::make_TK_WORD();
1155 yyextra->token.name=yytext;
1156 return Token::make_TK_WORD();
1160 return Token::make_TK_NONE();
1162<St_Ref>{WS}+"\""{WS}* {
1163 yyextra->expectQuote=
true;
1167<St_Ref>(\n|"\\ilinebr") {
1169 return Token::make_TK_NONE();
1171<St_Ref>"\""[^"\n]+"\"" {
1172 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1173 return Token::make_TK_WORD();
1177 return Token::make_TK_NONE();
1179<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1180 yyextra->token.name = yytext;
1181 return Token::make_TK_WORD();
1183<St_IntRef>{BLANK}+"\"" {
1186<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1187 yyextra->token.name = yytext;
1188 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1189 return Token::make_TK_WORD();
1191<St_SetScope>{SCOPEMASK}"<" {
1192 yyextra->token.name = yytext;
1193 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1194 yyextra->sharpCount=1;
1195 BEGIN(St_SetScopeEnd);
1197<St_SetScope>{BLANK} {
1199<St_SetScopeEnd>"<" {
1200 yyextra->token.name += yytext;
1201 yyextra->sharpCount++;
1203<St_SetScopeEnd>">" {
1204 yyextra->token.name += yytext;
1205 yyextra->sharpCount--;
1206 if (yyextra->sharpCount<=0)
1208 return Token::make_TK_WORD();
1212 yyextra->token.name += yytext;
1214<St_Ref2>"&"{ID}";" {
1215 yyextra->token.name = yytext;
1216 return Token::make_TK_SYMBOL();
1218<St_Ref2>"\""|\n|"\\ilinebr" {
1220 if (!yyextra->expectQuote || yytext[0]==
'"')
1222 return Token::make_TK_NONE();
1226 yyextra->token.name += yytext;
1229<St_Ref2>{HTMLTAG_STRICT} {
1232 return Token::make_TK_HTMLTAG();
1236 yyextra->token.name = yytext+1;
1243 yyextra->token.name = yytext;
1244 return Token::make_TK_WORD();
1247 yyextra->token.chars=yytext;
1248 return Token::make_TK_WHITESPACE();
1250<St_XRefItem>{LABELID} {
1251 yyextra->token.name=yytext;
1254 BEGIN(St_XRefItem2);
1256<St_XRefItem2>[0-9]+"." {
1258 numStr=numStr.left((
int)yyleng-1);
1259 yyextra->token.id=numStr.toInt();
1260 return Token::make_RetVal_OK();
1262<St_Para,St_Title,St_Ref2>"<!--" {
1263 yyextra->commentState = YY_START;
1266<St_Param>"\""[^\n\"]+"\"" {
1267 yyextra->token.name = yytext+1;
1268 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1269 return Token::make_TK_WORD();
1271<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1274 int j = params.find(
'&');
1275 int i = params.find(
'$');
1277 if (j<i && j>=0) i=j;
1279 yyextra->token.name = types+
"#"+params.
mid(i);
1280 return Token::make_TK_WORD();
QCString left(size_t len) const
1282<St_Param>[^ \t\n,@\\]+ {
1283 yyextra->token.name = yytext;
1284 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1286 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1288 return Token::make_TK_WORD();
1290<St_Param>{WS}*","{WS}*
1293 yyextra->token.chars=yytext;
1294 return Token::make_TK_WHITESPACE();
1296<St_Prefix>"\""[^\n\"]*"\"" {
1297 yyextra->token.name = yytext+1;
1298 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1299 return Token::make_TK_WORD();
1303 return Token::make_TK_NONE();
1306 yyextra->token.name+=yytext;
1308<St_Options>{WS}*":"{WS}* {
1310 yyextra->token.name+=
":";
1312<St_Options>{WS}*","{WS}* |
1315 yyextra->token.name+=
",";
1318 return Token::make_TK_WORD();
1321 yyextra->token.name+=yytext;
1324 return Token::make_TK_WORD();
1326<St_Emoji>[:0-9_a-z+-]+ {
1327 yyextra->token.name=yytext;
1328 return Token::make_TK_WORD();
1332 return Token::make_TK_NONE();
1334<St_QuotedString>"\"" {
1335 yyextra->token.name=
"";
1336 BEGIN(St_QuotedContent);
1338<St_QuotedString>(\n|"\\ilinebr") {
1340 return Token::make_TK_NONE();
1344 return Token::make_TK_NONE();
1346<St_QuotedContent>"\"" {
1347 return Token::make_TK_WORD();
1349<St_QuotedContent>. {
1350 yyextra->token.name+=yytext;
1352<St_ShowDate>{WS}+{SHOWDATE} {
1354 yyextra->token.name=yytext;
1355 return Token::make_TK_WORD();
1357<St_ShowDate>(\n|"\\ilinebr") {
1359 return Token::make_TK_NONE();
1363 return Token::make_TK_NONE();
1365<St_ILine>{LINENR}/[\\@\n\.] |
1366<St_ILine>{LINENR}{BLANK} {
1371 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1375 yyextra->yyLineNr = nr;
1377 return Token::make_TK_WORD();
1380 return Token::make_TK_NONE();
1382<St_IFile>{BLANK}*{FILEMASK} {
1384 return Token::make_TK_WORD();
1386<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1389 yyextra->fileName = text.
mid(1,text.
length()-2);
1390 return Token::make_TK_WORD();
1392<St_File>{FILEMASK} {
1393 yyextra->token.name = yytext;
1394 if (yyextra->token.name.endsWith(
"\\ilinebr") ||yyextra->token.name.endsWith(
"@ilinebr"))
1397 yyextra->token.name = yyextra->token.name.left(yyleng-8);
1399 return Token::make_TK_WORD();
1401<St_File>"\""[^\n\"]+"\"" {
1403 yyextra->token.name = text.
mid(1,text.
length()-2);
1404 return Token::make_TK_WORD();
1406<St_Pattern>[^\\\r\n]+ {
1407 yyextra->token.name += yytext;
1409<St_Pattern>"\\ilinebr" {
1410 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1411 return Token::make_TK_WORD();
1415 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1416 return Token::make_TK_WORD();
1419 yyextra->token.name += yytext;
1421<St_Link>{LINKMASK}|{REFWORD} {
1422 yyextra->token.name = yytext;
1423 return Token::make_TK_WORD();
1426 BEGIN(yyextra->commentState);
1434<St_SkipTitle>(\n|"\\ilinebr") {
1435 if (*yytext ==
'\n') unput(
'\n');
1436 return Token::make_TK_NONE();
1441<St_Sections>[^\n@\<]+
1442<St_Sections>{CMD}("<"|{CMD})
1443<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1446 int s=tag.find(
"id=");
1450 if (c==
'\'' || c==
'"')
1452 int e=tag.find(c,s+4);
1456 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1462<St_Sections>{CMD}"anchor"{BLANK}+ {
1464 BEGIN(St_SecLabel1);
static constexpr int Anchor
1466<St_Sections>{CMD}"ianchor"{BLANK}+ {
1468 BEGIN(St_SecLabel1);
1470<St_Sections>{CMD}"section"{BLANK}+ {
1472 BEGIN(St_SecLabel2);
static constexpr int Section
1474<St_Sections>{CMD}"subsection"{BLANK}+ {
1476 BEGIN(St_SecLabel2);
static constexpr int Subsection
1478<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1480 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1482<St_Sections>{CMD}"paragraph"{BLANK}+ {
1484 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1486<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1488 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1490<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1492 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1494<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1495 yyextra->endMarker=
"endverbatim";
1498<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1499 yyextra->endMarker=
"endiverbatim";
1502<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1503 yyextra->endMarker=
"endiliteral";
1506<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1507 yyextra->endMarker=
"enddot";
1510<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1511 yyextra->endMarker=
"endmsc";
1514<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1515 yyextra->endMarker=
"enduml";
1518<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1519 yyextra->endMarker=
"endhtmlonly";
1522<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1523 yyextra->endMarker=
"endlatexonly";
1526<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1527 yyextra->endMarker=
"endmanonly";
1530<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1531 yyextra->endMarker=
"endrtfonly";
1534<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1535 yyextra->endMarker=
"endxmlonly";
1538<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1539 yyextra->endMarker=
"enddocbookonly";
1542<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1543 yyextra->endMarker=
"endcode";
1546<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1547 yyextra->endMarker=
"endicode";
1550<St_Sections>"<!--" {
1551 yyextra->endMarker=
"-->";
1554<St_SecSkip>{CMD}{ID} {
1555 if (yyextra->endMarker==yytext+1)
1561 if (yyextra->endMarker==yytext)
1566<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1568<St_SecSkip>(\n|"\\ilinebr")
1570<St_Sections>(\n|"\\ilinebr")
1571<St_SecLabel1>({REQID}|{LABELID}) {
1573 yyextra->secLabel = yytext;
1577<St_SecLabel2>({REQID}|{LABELID}){BLANK}+ |
1578<St_SecLabel2>({REQID}|{LABELID}) {
1579 yyextra->secLabel = yytext;
1580 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1583<St_SecTitle>[^\n]+ |
1584<St_SecTitle>[^\n]*\n {
1586 yyextra->secTitle = yytext;
1587 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1588 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1590 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1595<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1596 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1599<St_Snippet>[^\\\n]+ {
1600 yyextra->token.name += yytext;
1603 yyextra->token.name += yytext;
1605<St_Snippet>(\n|"\\ilinebr") {
1607 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1608 return Token::make_TK_WORD();
1614 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1620 yyextra->token.name = yytext;
1624 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1632 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1634 const char *p = yyextra->inputString + yyextra->inputPos;
1635 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1636 yyextra->inputPos+=c;
1642 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1645 if (yyextra->definition)
1647 file = yyextra->definition->getOutputFileBase();
1651 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1657 si->
setType(yyextra->secType);
1663 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1666 yyextra->token.text = tagText;
1667 yyextra->token.attribs.
clear();
1668 yyextra->token.endTag =
FALSE;
1669 yyextra->token.emptyTag =
FALSE;
1673 if (tagText.
at(1)==
'/')
1675 yyextra->token.endTag =
TRUE;
1680 int i = startNamePos;
1681 for (i=startNamePos; i < (int)yyleng; i++)
1684 char c = tagText.
at(i);
1685 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1687 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1691 int startAttribList = i;
1692 while (i<(
int)yyleng)
1694 char c=tagText.
at(i);
1696 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1698 if (c ==
'>')
break;
1702 yyextra->token.emptyTag =
TRUE;
1707 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1710 optName = tagText.
mid(startName,endName-startName).
lower();
1712 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1713 if (tagText.
at(i)==
'=')
1715 int startAttrib=0, endAttrib=0;
1718 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1719 if (tagText.
at(i)==
'\'')
1725 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1727 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1729 else if (tagText.
at(i)==
'"')
1734 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1736 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1742 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1744 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1746 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1747 if (optName ==
"align") optValue = optValue.
lower();
1748 else if (optName ==
"valign")
1750 optValue = optValue.
lower();
1751 if (optValue ==
"center") optValue=
"middle";
1759 yyextra->token.attribs.emplace_back(optName,optValue);
1761 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1774 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1776 yyextra->lexerStack.push(
1777 std::make_unique<DocLexerContext>(
1778 yyextra->token,YY_START,
1779 yyextra->autoListLevel,
1781 yyextra->inputString,
1782 YY_CURRENT_BUFFER));
1783 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1789 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1791 if (yyextra->lexerStack.empty())
return FALSE;
1792 const auto &ctx = yyextra->lexerStack.top();
1793 yyextra->autoListLevel = ctx->autoListLevel;
1794 yyextra->inputPos = ctx->inputPos;
1795 yyextra->inputString = ctx->inputString;
1796 yyextra->token = ctx->token;
1798 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1799 yy_switch_to_buffer(ctx->state, yyscanner);
1802 yyextra->lexerStack.pop();
1810 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1819 doctokenizerYYlex_destroy(
p->yyscanner);
1824 return doctokenizerYYlex(
p->yyscanner);
1830 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1838 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1842 yyextra->inputString = input.
data();
1844 yyextra->inputPos = 0;
1845 yyextra->definition = d;
1846 yyextra->fileName = fileName;
1848 yyextra->yyLineNr = 1;
1849 doctokenizerYYlex(yyscanner);
1855 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1856 yyextra->autoListLevel = 0;
1857 yyextra->inputString = input;
1858 yyextra->inputPos = 0;
1859 yyextra->fileName = fileName;
1860 yyextra->insidePre =
FALSE;
1861 yyextra->markdownSupport = markdownSupport;
1862 yyextra->insideHtmlLink = insideHtmlLink;
1869 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1870 return &yyextra->token;
1876 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1878 return &yyextra->token;
1884 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1885 yyextra->insideHtmlLink =
false;
1892 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1899 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1906 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1907 yyextra->token.verb=
"";
1908 yyextra->token.name=
"";
1915 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1916 yyextra->token.verb=
"";
1917 yyextra->token.name=
"";
1924 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1925 yyextra->token.verb=
"";
1926 yyextra->token.name=
"";
1933 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1934 yyextra->token.verb=
"";
1935 yyextra->token.name=
"";
1936 BEGIN(St_HtmlOnlyOption);
1942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1943 yyextra->token.verb=
"";
1950 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1951 yyextra->token.verb=
"";
1958 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1959 yyextra->token.verb=
"";
1966 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1967 yyextra->token.verb=
"";
1974 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1975 yyextra->token.verb=
"";
1976 BEGIN(St_LatexOnly);
1982 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1983 yyextra->token.verb=
"";
1990 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1991 yyextra->token.verb=
"";
1992 BEGIN(St_ILiteralOpt);
1998 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1999 yyextra->token.verb=
"";
2006 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2007 yyextra->token.verb=
"";
2008 BEGIN(St_iVerbatim);
2014 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2015 yyextra->token.verb=
"";
2022 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2023 yyextra->token.verb=
"";
2030 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2031 yyextra->token.verb=
"";
2032 yyextra->token.sectionId=
"";
2033 BEGIN(St_PlantUMLOpt);
2039 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2040 yyextra->token.verb=
"";
2047 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2048 yyextra->token.verb=
"";
2049 yyextra->token.sectionId=
"";
2050 BEGIN(St_MermaidOpt);
2056 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2057 yyextra->token.verb=
"";
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;
2085 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2092 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2093 yyextra->token.name =
"";
2100 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2107 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2114 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2115 BEGIN(St_DoxyConfig);
2121 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2122 yyextra->expectQuote=
false;
2129 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2136 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2143 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2144 BEGIN(St_SkipTitle);
2150 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2157 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2164 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2165 yyextra->token.name=
"";
2172 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2179 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2180 yyextra->token.name=
"";
2187 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2188 yyextra->token.name=
"";
2195 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2196 yyextra->token.name=
"";
2203 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2210 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2211 BEGIN(St_QuotedString);
2217 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2224 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2225 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2231 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2232 yyextra->insidePre = b;
2238 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2240 int l =
static_cast<int>(tagName.
length());
2242 for (
int i=l-1;i>=0;i--)
2252 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2253 yyextra->autoListLevel++;
2259 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2260 yyextra->autoListLevel--;
2266 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2267 yyextra->fileName = fileName;
2273 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2274 return yyextra->fileName;
2280 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2281 yyextra->yyLineNr = lineno;
2287 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2288 return yyextra->yyLineNr;
2294 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2295 yyextra->stateStack.push(YYSTATE);
2301 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2302 assert(!yyextra->stateStack.empty());
2303 BEGIN(yyextra->stateStack.top());
2304 yyextra->stateStack.pop();
2307#include "doctokenizer.l.h"
static bool isFlagSet(const DebugMask mask)
void setStateTitleAttrValue()
void setStateILiteralOpt()
void setStateMermaidOpt()
void init(const char *input, const QCString &fileName, bool markdownSupport, bool insideHtmlLink)
void setLineNr(int lineno)
QCString getFileName() const
void setFileName(const QCString &fileName)
void setStatePlantUMLOpt()
void findSections(const QCString &input, const Definition *d, const QCString &fileName)
void setInsidePre(bool b)
void unputString(const QCString &tag)
void setStateInternalRef()
void setStateDoxyConfig()
void setStateQuotedString()
std::unique_ptr< Private > p
void pushBackHtmlTag(const QCString &tag)
const T * find(const std::string &key) const
bool isEmpty() const
Returns TRUE iff the string is empty.
class that provide information about a section.
void setType(SectionType t)
void setFileName(const QCString &fn)
static SectionManager & instance()
returns a reference to the singleton
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
const char * qPrint(const char *s)
doctokenizerYY_state extra