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} {
1385 yyextra->fileName = text;
1386 yyextra->token.name = text;
1387 return Token::make_TK_WORD();
1389<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1392 yyextra->fileName = text.
mid(1,text.
length()-2);
1393 yyextra->token.name = text.
mid(1,text.
length()-2);
1394 return Token::make_TK_WORD();
1396<St_File>{FILEMASK} {
1397 yyextra->token.name = yytext;
1398 if (yyextra->token.name.endsWith(
"\\ilinebr") ||yyextra->token.name.endsWith(
"@ilinebr"))
1401 yyextra->token.name = yyextra->token.name.left(yyleng-8);
1403 return Token::make_TK_WORD();
1405<St_File>"\""[^\n\"]+"\"" {
1407 yyextra->token.name = text.
mid(1,text.
length()-2);
1408 return Token::make_TK_WORD();
1410<St_Pattern>[^\\\r\n]+ {
1411 yyextra->token.name += yytext;
1413<St_Pattern>"\\ilinebr" {
1414 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1415 return Token::make_TK_WORD();
1419 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1420 return Token::make_TK_WORD();
1423 yyextra->token.name += yytext;
1425<St_Link>{LINKMASK}|{REFWORD} {
1426 yyextra->token.name = yytext;
1427 return Token::make_TK_WORD();
1430 BEGIN(yyextra->commentState);
1438<St_SkipTitle>(\n|"\\ilinebr") {
1439 if (*yytext ==
'\n') unput(
'\n');
1440 return Token::make_TK_NONE();
1445<St_Sections>[^\n@\<]+
1446<St_Sections>{CMD}("<"|{CMD})
1447<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1450 int s=tag.find(
"id=");
1454 if (c==
'\'' || c==
'"')
1456 int e=tag.find(c,s+4);
1460 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1466<St_Sections>{CMD}"anchor"{BLANK}+ {
1468 BEGIN(St_SecLabel1);
static constexpr int Anchor
1470<St_Sections>{CMD}"ianchor"{BLANK}+ {
1472 BEGIN(St_SecLabel1);
1474<St_Sections>{CMD}"section"{BLANK}+ {
1476 BEGIN(St_SecLabel2);
static constexpr int Section
1478<St_Sections>{CMD}"subsection"{BLANK}+ {
1480 BEGIN(St_SecLabel2);
static constexpr int Subsection
1482<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1484 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1486<St_Sections>{CMD}"paragraph"{BLANK}+ {
1488 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1490<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1492 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1494<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1496 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1498<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1499 yyextra->endMarker=
"endverbatim";
1502<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1503 yyextra->endMarker=
"endiverbatim";
1506<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1507 yyextra->endMarker=
"endiliteral";
1510<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1511 yyextra->endMarker=
"enddot";
1514<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1515 yyextra->endMarker=
"endmsc";
1518<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1519 yyextra->endMarker=
"enduml";
1522<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1523 yyextra->endMarker=
"endhtmlonly";
1526<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1527 yyextra->endMarker=
"endlatexonly";
1530<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1531 yyextra->endMarker=
"endmanonly";
1534<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1535 yyextra->endMarker=
"endrtfonly";
1538<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1539 yyextra->endMarker=
"endxmlonly";
1542<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1543 yyextra->endMarker=
"enddocbookonly";
1546<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1547 yyextra->endMarker=
"endcode";
1550<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1551 yyextra->endMarker=
"endicode";
1554<St_Sections>"<!--" {
1555 yyextra->endMarker=
"-->";
1558<St_SecSkip>{CMD}{ID} {
1559 if (yyextra->endMarker==yytext+1)
1565 if (yyextra->endMarker==yytext)
1570<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1572<St_SecSkip>(\n|"\\ilinebr")
1574<St_Sections>(\n|"\\ilinebr")
1575<St_SecLabel1>({REQID}|{LABELID}) {
1577 yyextra->secLabel = yytext;
1581<St_SecLabel2>({REQID}|{LABELID}){BLANK}+ |
1582<St_SecLabel2>({REQID}|{LABELID}) {
1583 yyextra->secLabel = yytext;
1584 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1587<St_SecTitle>[^\n]+ |
1588<St_SecTitle>[^\n]*\n {
1590 yyextra->secTitle = yytext;
1591 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1592 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1594 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1599<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1600 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1603<St_Snippet>[^\\\n]+ {
1604 yyextra->token.name += yytext;
1607 yyextra->token.name += yytext;
1609<St_Snippet>(\n|"\\ilinebr") {
1611 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1612 return Token::make_TK_WORD();
1618 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1624 yyextra->token.name = yytext;
1628 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1636 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1638 const char *p = yyextra->inputString + yyextra->inputPos;
1639 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1640 yyextra->inputPos+=c;
1646 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1649 if (yyextra->definition)
1651 file = yyextra->definition->getOutputFileBase();
1655 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1661 si->
setType(yyextra->secType);
1667 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1670 yyextra->token.text = tagText;
1671 yyextra->token.attribs.
clear();
1672 yyextra->token.endTag =
FALSE;
1673 yyextra->token.emptyTag =
FALSE;
1677 if (tagText.
at(1)==
'/')
1679 yyextra->token.endTag =
TRUE;
1684 int i = startNamePos;
1685 for (i=startNamePos; i < (int)yyleng; i++)
1688 char c = tagText.
at(i);
1689 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1691 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1695 int startAttribList = i;
1696 while (i<(
int)yyleng)
1698 char c=tagText.
at(i);
1700 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1702 if (c ==
'>')
break;
1706 yyextra->token.emptyTag =
TRUE;
1711 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1714 optName = tagText.
mid(startName,endName-startName).
lower();
1716 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1717 if (tagText.
at(i)==
'=')
1719 int startAttrib=0, endAttrib=0;
1722 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1723 if (tagText.
at(i)==
'\'')
1729 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1731 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1733 else if (tagText.
at(i)==
'"')
1738 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1740 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1746 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1748 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1750 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1751 if (optName ==
"align") optValue = optValue.
lower();
1752 else if (optName ==
"valign")
1754 optValue = optValue.
lower();
1755 if (optValue ==
"center") optValue=
"middle";
1763 yyextra->token.attribs.emplace_back(optName,optValue);
1765 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1778 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1780 yyextra->lexerStack.push(
1781 std::make_unique<DocLexerContext>(
1782 yyextra->token,YY_START,
1783 yyextra->autoListLevel,
1785 yyextra->inputString,
1786 YY_CURRENT_BUFFER));
1787 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1793 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1795 if (yyextra->lexerStack.empty())
return FALSE;
1796 const auto &ctx = yyextra->lexerStack.top();
1797 yyextra->autoListLevel = ctx->autoListLevel;
1798 yyextra->inputPos = ctx->inputPos;
1799 yyextra->inputString = ctx->inputString;
1800 yyextra->token = ctx->token;
1802 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1803 yy_switch_to_buffer(ctx->state, yyscanner);
1806 yyextra->lexerStack.pop();
1814 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1823 doctokenizerYYlex_destroy(
p->yyscanner);
1828 return doctokenizerYYlex(
p->yyscanner);
1834 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1842 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1846 yyextra->inputString = input.
data();
1848 yyextra->inputPos = 0;
1849 yyextra->definition = d;
1850 yyextra->fileName = fileName;
1852 yyextra->yyLineNr = 1;
1853 doctokenizerYYlex(yyscanner);
1859 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1860 yyextra->autoListLevel = 0;
1861 yyextra->inputString = input;
1862 yyextra->inputPos = 0;
1863 yyextra->fileName = fileName;
1864 yyextra->insidePre =
FALSE;
1865 yyextra->markdownSupport = markdownSupport;
1866 yyextra->insideHtmlLink = insideHtmlLink;
1873 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1874 return &yyextra->token;
1880 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1882 return &yyextra->token;
1888 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1889 yyextra->insideHtmlLink =
false;
1896 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1903 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1910 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1911 yyextra->token.verb=
"";
1912 yyextra->token.name=
"";
1919 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1920 yyextra->token.verb=
"";
1921 yyextra->token.name=
"";
1928 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1929 yyextra->token.verb=
"";
1930 yyextra->token.name=
"";
1937 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1938 yyextra->token.verb=
"";
1939 yyextra->token.name=
"";
1940 BEGIN(St_HtmlOnlyOption);
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=
"";
1970 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1971 yyextra->token.verb=
"";
1978 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1979 yyextra->token.verb=
"";
1980 BEGIN(St_LatexOnly);
1986 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1987 yyextra->token.verb=
"";
1994 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1995 yyextra->token.verb=
"";
1996 BEGIN(St_ILiteralOpt);
2002 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2003 yyextra->token.verb=
"";
2010 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2011 yyextra->token.verb=
"";
2012 BEGIN(St_iVerbatim);
2018 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2019 yyextra->token.verb=
"";
2026 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2027 yyextra->token.verb=
"";
2034 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2035 yyextra->token.verb=
"";
2036 yyextra->token.sectionId=
"";
2037 BEGIN(St_PlantUMLOpt);
2043 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2044 yyextra->token.verb=
"";
2051 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2052 yyextra->token.verb=
"";
2053 yyextra->token.sectionId=
"";
2054 BEGIN(St_MermaidOpt);
2060 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2061 yyextra->token.verb=
"";
2068 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2075 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2082 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2089 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2096 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2097 yyextra->token.name =
"";
2104 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2111 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2118 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2119 BEGIN(St_DoxyConfig);
2125 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2126 yyextra->expectQuote=
false;
2133 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2140 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2147 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2148 BEGIN(St_SkipTitle);
2154 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2161 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2169 yyextra->token.name=
"";
2176 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2183 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2184 yyextra->token.name=
"";
2191 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2192 yyextra->token.name=
"";
2199 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2200 yyextra->token.name=
"";
2207 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2214 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2215 BEGIN(St_QuotedString);
2221 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2228 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2229 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2235 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2236 yyextra->insidePre = b;
2242 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2244 int l =
static_cast<int>(tagName.
length());
2246 for (
int i=l-1;i>=0;i--)
2256 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2257 yyextra->autoListLevel++;
2263 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2264 yyextra->autoListLevel--;
2270 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2271 yyextra->fileName = fileName;
2277 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2278 return yyextra->fileName;
2284 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2285 yyextra->yyLineNr = lineno;
2291 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2292 return yyextra->yyLineNr;
2298 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2299 yyextra->stateStack.push(YYSTATE);
2305 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2306 assert(!yyextra->stateStack.empty());
2307 BEGIN(yyextra->stateStack.top());
2308 yyextra->stateStack.pop();
2311#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