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 size_t nl1 = text.
find(
'\n');
112 size_t nl2 = text.
find(
"\\ilinebr");
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()
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString mid(size_t index, size_t len=npos) const
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
size_t find(char c, size_t pos=0) const
The common base class of all entity definitions found in the sources.
Data associated with a token used by the comment block parser.
#define Config_getInt(name)
static void processSection(yyscan_t yyscanner)
DString extractPartAfterNewLine(const DString &text)
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)
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 size_t dashPos = text.rfind(
'-');
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 size_t dashPos = text.
rfind(
'-');
357 yyextra->token.isEnumList =
false;
358 yyextra->token.isCheckedList =
true;
363 return Token::make_TK_LISTITEM();
size_t rfind(char c, size_t pos=npos) 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 size_t dashPos = text.
rfind(
'-');
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} {
426 text=text.
mid(text.
find(
'\n')+1);
427 size_t dashPos = text.
rfind(
'-');
428 yyextra->token.isEnumList =
false;
429 yyextra->token.isCheckedList =
true;
434 return Token::make_TK_LISTITEM();
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 = text.
rfind(
'.');
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";
DString right(size_t len) const
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";
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 size_t index=tagName.find(
':');
603 yyextra->token.name = tagName.left(index);
604 size_t text_begin = index+2;
605 size_t text_end = 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));
size_t length() const
Returns the length of the string, not counting the 0-terminator.
DString getenv(const DString &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();
655<St_Para>{LNKWORDN}"<"{HTMLKEYW}">"[^<]*"</"{HTMLKEYW}">" {
658 const std::string text(yytext);
659 const size_t closeTagPos = text.
rfind(
'<');
660 const size_t openTagPos = text.
rfind(
'<', closeTagPos - 1);
661 yyless(
static_cast<int>(openTagPos));
662 yyextra->token.name = yytext;
663 return Token::make_TK_LNKWORD();
666<St_Para>{LNKWORD1}{FUNCARG} |
670 yyextra->token.name = yytext;
671 return Token::make_TK_LNKWORD();
673<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
674 yyextra->token.name = yytext;
675 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
676 unput(yytext[(
int)yyleng-1]);
677 return Token::make_TK_LNKWORD();
681<St_Para,St_Text>[\-+0-9] |
682<St_Para,St_Text>{WORD1} |
683<St_Para,St_Text>{WORD2} {
687 yyextra->token.name = &yytext[1];
689 yyextra->token.name = yytext;
690 return Token::make_TK_WORD();
692<St_Text>({ID}".")+{ID} {
693 yyextra->token.name = yytext;
694 return Token::make_TK_WORD();
696<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
698 yyextra->token.name = yytext;
699 return Token::make_TK_WORD();
704<St_Para,St_Text>{BLANK}+ |
705<St_Para,St_Text>{BLANK}*\n{BLANK}* {
707 yyextra->token.chars=yytext;
708 return Token::make_TK_WHITESPACE();
710<St_Text>[\\@<>&$#%~] {
711 yyextra->token.name = yytext;
714<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
715 if (yyextra->insidePre || yyextra->autoListLevel==0)
721<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
722 if (yyextra->insidePre || yyextra->autoListLevel==0)
727<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
728 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
734<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
735 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
741<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
742<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
744 if (yyextra->insidePre)
746 yyextra->token.chars=yytext;
747 return Token::make_TK_WHITESPACE();
755 for (i=0;i<yyextra->token.indent;i++)
761 YY_CURRENT_BUFFER->yy_at_bol=1;
763 return Token::make_TK_NEWPARA();
766<St_CodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
767 yyextra->token.name = yytext;
768 size_t i=yyextra->token.name.find(
'{');
769 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
772<St_iCodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
773 yyextra->token.name = yytext;
774 size_t i=yyextra->token.name.find(
'{');
775 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
778<St_CodeOpt>"\\ilinebr" |
784<St_iCodeOpt>"\\ilinebr" |
790<St_Code>{WS}*{CMD}"endcode" {
792 return Token::make_RetVal_OK();
794<St_iCode>{WS}*{CMD}"endicode" {
796 return Token::make_RetVal_OK();
798<St_XmlCode>{WS}*"</code>" {
800 return Token::make_RetVal_OK();
802<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
803<St_Code,St_iCode,St_XmlCode>\n |
804<St_Code,St_iCode,St_XmlCode>. {
806 yyextra->token.verb+=yytext;
808<St_HtmlOnlyOption>" [block]" {
809 yyextra->token.name=
"block";
812<St_HtmlOnlyOption>.|\n {
816<St_HtmlOnlyOption>"\\ilinebr" {
820<St_HtmlOnly>{CMD}"endhtmlonly" {
821 return Token::make_RetVal_OK();
823<St_HtmlOnly>[^\\@\n$]+ |
827 yyextra->token.verb+=yytext;
829<St_ManOnly>{CMD}"endmanonly" {
830 return Token::make_RetVal_OK();
832<St_ManOnly>[^\\@\n$]+ |
836 yyextra->token.verb+=yytext;
838<St_RtfOnly>{CMD}"endrtfonly" {
839 return Token::make_RetVal_OK();
841<St_RtfOnly>[^\\@\n$]+ |
845 yyextra->token.verb+=yytext;
847<St_LatexOnly>{CMD}"endlatexonly" {
848 return Token::make_RetVal_OK();
850<St_LatexOnly>[^\\@\n]+ |
854 yyextra->token.verb+=yytext;
856<St_XmlOnly>{CMD}"endxmlonly" {
857 return Token::make_RetVal_OK();
859<St_XmlOnly>[^\\@\n]+ |
863 yyextra->token.verb+=yytext;
865<St_DbOnly>{CMD}"enddocbookonly" {
866 return Token::make_RetVal_OK();
868<St_DbOnly>[^\\@\n]+ |
872 yyextra->token.verb+=yytext;
874<St_Verbatim>{CMD}"endverbatim" {
875 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
876 return Token::make_RetVal_OK();
878<St_ILiteral>{CMD}"endiliteral " {
880 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
881 return Token::make_RetVal_OK();
883<St_iVerbatim>{CMD}"endiverbatim" {
884 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
885 return Token::make_RetVal_OK();
887<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
888<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
889<St_Verbatim,St_iVerbatim,St_ILiteral>. {
891 yyextra->token.verb+=yytext;
893<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
895 return Token::make_RetVal_OK();
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
897<St_ILiteralOpt>"\\ilinebr" |
898<St_ILiteralOpt>"\n" |
900 yyextra->token.sectionId =
"";
902 return Token::make_RetVal_OK();
904<St_Dot>{CMD}"enddot" {
905 return Token::make_RetVal_OK();
911 yyextra->token.verb+=yytext;
913<St_Msc>{CMD}("endmsc") {
914 return Token::make_RetVal_OK();
920 yyextra->token.verb+=yytext;
922<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
924 return Token::make_RetVal_OK();
926<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
928 return Token::make_RetVal_OK();
930<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
932 return Token::make_RetVal_OK();
934<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
936 return Token::make_RetVal_OK();
938<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
940 return Token::make_RetVal_OK();
942<St_PlantUMLOpt>"\\ilinebr" |
943<St_PlantUMLOpt>"\n" |
945 yyextra->token.sectionId =
"";
947 return Token::make_RetVal_OK();
949<St_PlantUML>{CMD}"enduml" {
950 return Token::make_RetVal_OK();
952<St_PlantUML>[^\\@\n]+ |
956 yyextra->token.verb+=yytext;
958<St_MermaidOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
960 return Token::make_RetVal_OK();
962<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
964 return Token::make_RetVal_OK();
966<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
968 return Token::make_RetVal_OK();
970<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
972 return Token::make_RetVal_OK();
974<St_MermaidOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
976 return Token::make_RetVal_OK();
978<St_MermaidOpt>"\\ilinebr" |
981 yyextra->token.sectionId =
"";
983 return Token::make_RetVal_OK();
985<St_Mermaid>{CMD}"endmermaid" {
986 return Token::make_RetVal_OK();
988<St_Mermaid>[^\\@\n]+ |
992 yyextra->token.verb+=yytext;
998 yyextra->token.chars=yytext;
999 return Token::make_TK_WHITESPACE();
1007 return Token::make_TK_NONE();
1009<St_Title>"\\ilinebr" {
1011 return Token::make_TK_NONE();
1013<St_TitleN>"&"{ID}";" {
1014 yyextra->token.name = yytext;
1015 return Token::make_TK_SYMBOL();
1017<St_TitleN>{HTMLTAG} {
1018 yyextra->token.name = yytext;
1020 return Token::make_TK_HTMLTAG();
1024 return Token::make_TK_NONE();
1026<St_TitleN>"\\ilinebr" {
1028 return Token::make_TK_NONE();
1030<St_TitleN>{SPCMD1} |
1031<St_TitleN>{SPCMD2} {
1032 yyextra->token.name = yytext+1;
1038 yyextra->token.name = &yytext[1];
1040 yyextra->token.name = yytext;
1041 return Token::make_TK_WORD();
1043<St_TitleN>[\-+0-9] |
1049 yyextra->token.name = &yytext[1];
1051 yyextra->token.name = yytext;
1052 return Token::make_TK_WORD();
1055 yyextra->token.chars=yytext;
1056 return Token::make_TK_WHITESPACE();
1058<St_TitleQ>"&"{ID}";" {
1059 yyextra->token.name = yytext;
1060 return Token::make_TK_SYMBOL();
1062<St_TitleQ>(\n|"\\ilinebr") {
1064 return Token::make_TK_NONE();
1066<St_TitleQ>{SPCMD1} |
1067<St_TitleQ>{SPCMD2} {
1068 yyextra->token.name = yytext+1;
1072<St_TitleQ>{WORD1NQ} |
1073<St_TitleQ>{WORD2NQ} {
1074 yyextra->token.name = yytext;
1075 return Token::make_TK_WORD();
1078 yyextra->token.chars=yytext;
1079 return Token::make_TK_WHITESPACE();
1083 return Token::make_TK_NONE();
1085<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1086 yyextra->token.name = yytext;
1087 size_t pos = yyextra->token.name.find(
'=');
1089 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1092<St_TitleV>[^ \t\r\n]+ {
1094 yyextra->token.chars = yytext;
1096 return Token::make_TK_WORD();
1098<St_TitleV,St_TitleA>. {
1100 return Token::make_TK_NONE();
1102<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1104 return Token::make_TK_NONE();
1107<St_Anchor>({REQID}|{LABELID}){WS}? {
1110 return Token::make_TK_WORD();
1114 return Token::make_TK_NONE();
1117 if (yytext[0] ==
'"')
1119 yyextra->token.name=yytext+1;
1120 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1124 yyextra->token.name=yytext;
1126 return Token::make_TK_WORD();
1130 return Token::make_TK_NONE();
1132<St_Cite>(\n|"\\ilinebr") {
1134 return Token::make_TK_NONE();
1138 return Token::make_TK_NONE();
1140<St_DoxyConfig>{DOXYCFG} {
1141 yyextra->token.name=yytext;
1142 return Token::make_TK_WORD();
1144<St_DoxyConfig>{BLANK} {
1146 return Token::make_TK_NONE();
1148<St_DoxyConfig>(\n|"\\ilinebr") {
1150 return Token::make_TK_NONE();
1154 return Token::make_TK_NONE();
1156<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1157 yyextra->token.name=yytext;
1158 return Token::make_TK_WORD();
1160<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1161 yyextra->token.name=yytext;
1162 return Token::make_TK_WORD();
1165 yyextra->token.name=yytext;
1166 return Token::make_TK_WORD();
1170 return Token::make_TK_NONE();
1172<St_Ref>{WS}+"\""{WS}* {
1173 yyextra->expectQuote=
true;
1177<St_Ref>(\n|"\\ilinebr") {
1179 return Token::make_TK_NONE();
1181<St_Ref>"\""[^"\n]+"\"" {
1182 yyextra->token.name=
DString(yytext).
mid(1,yyleng-2);
1183 return Token::make_TK_WORD();
1187 return Token::make_TK_NONE();
1189<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1190 yyextra->token.name = yytext;
1191 return Token::make_TK_WORD();
1193<St_IntRef>{BLANK}+"\"" {
1196<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1197 yyextra->token.name = yytext;
1198 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1199 return Token::make_TK_WORD();
1201<St_SetScope>{SCOPEMASK}"<" {
1202 yyextra->token.name = yytext;
1203 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1204 yyextra->sharpCount=1;
1205 BEGIN(St_SetScopeEnd);
1207<St_SetScope>{BLANK} {
1209<St_SetScopeEnd>"<" {
1210 yyextra->token.name += yytext;
1211 yyextra->sharpCount++;
1213<St_SetScopeEnd>">" {
1214 yyextra->token.name += yytext;
1215 yyextra->sharpCount--;
1216 if (yyextra->sharpCount<=0)
1218 return Token::make_TK_WORD();
1222 yyextra->token.name += yytext;
1224<St_Ref2>"&"{ID}";" {
1225 yyextra->token.name = yytext;
1226 return Token::make_TK_SYMBOL();
1228<St_Ref2>"\""|\n|"\\ilinebr" {
1230 if (!yyextra->expectQuote || yytext[0]==
'"')
1232 return Token::make_TK_NONE();
1236 yyextra->token.name += yytext;
1239<St_Ref2>{HTMLTAG_STRICT} {
1242 return Token::make_TK_HTMLTAG();
1246 yyextra->token.name = yytext+1;
1253 yyextra->token.name = yytext;
1254 return Token::make_TK_WORD();
1257 yyextra->token.chars=yytext;
1258 return Token::make_TK_WHITESPACE();
1260<St_XRefItem>{LABELID} {
1261 yyextra->token.name=yytext;
1264 BEGIN(St_XRefItem2);
1266<St_XRefItem2>[0-9]+"." {
1268 numStr=numStr.left((
int)yyleng-1);
1269 yyextra->token.id=numStr.toInt();
1270 return Token::make_RetVal_OK();
1272<St_Para,St_Title,St_Ref2>"<!--" {
1273 yyextra->commentState = YY_START;
1276<St_Param>"\""[^\n\"]+"\"" {
1277 yyextra->token.name = yytext+1;
1278 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1279 return Token::make_TK_WORD();
1281<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1284 size_t j = params.find(
'&');
1285 size_t i = params.find(
'$');
1289 yyextra->token.name = types+
"#"+params.
mid(i);
1290 return Token::make_TK_WORD();
DString left(size_t len) const
1292<St_Param>[^ \t\n,@\\]+ {
1293 yyextra->token.name = yytext;
1294 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1296 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1298 return Token::make_TK_WORD();
1300<St_Param>{WS}*","{WS}*
1303 yyextra->token.chars=yytext;
1304 return Token::make_TK_WHITESPACE();
1306<St_Prefix>"\""[^\n\"]*"\"" {
1307 yyextra->token.name = yytext+1;
1308 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1309 return Token::make_TK_WORD();
1313 return Token::make_TK_NONE();
1316 yyextra->token.name+=yytext;
1318<St_Options>{WS}*":"{WS}* {
1320 yyextra->token.name+=
":";
1322<St_Options>{WS}*","{WS}* |
1325 yyextra->token.name+=
",";
1328 return Token::make_TK_WORD();
1331 yyextra->token.name+=yytext;
1334 return Token::make_TK_WORD();
1336<St_Emoji>[:0-9_a-z+-]+ {
1337 yyextra->token.name=yytext;
1338 return Token::make_TK_WORD();
1342 return Token::make_TK_NONE();
1344<St_QuotedString>"\"" {
1345 yyextra->token.name=
"";
1346 BEGIN(St_QuotedContent);
1348<St_QuotedString>(\n|"\\ilinebr") {
1350 return Token::make_TK_NONE();
1354 return Token::make_TK_NONE();
1356<St_QuotedContent>"\"" {
1357 return Token::make_TK_WORD();
1359<St_QuotedContent>. {
1360 yyextra->token.name+=yytext;
1362<St_ShowDate>{WS}+{SHOWDATE} {
1364 yyextra->token.name=yytext;
1365 return Token::make_TK_WORD();
1367<St_ShowDate>(\n|"\\ilinebr") {
1369 return Token::make_TK_NONE();
1373 return Token::make_TK_NONE();
1375<St_ILine>{LINENR}/[\\@\n\.] |
1376<St_ILine>{LINENR}{BLANK} {
1381 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1385 yyextra->yyLineNr = nr;
1387 return Token::make_TK_WORD();
1390 return Token::make_TK_NONE();
1392<St_IFile>{BLANK}*{FILEMASK} {
1395 yyextra->fileName = text;
1396 yyextra->token.name = text;
1397 return Token::make_TK_WORD();
1399<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1402 yyextra->fileName = text.
mid(1,text.
length()-2);
1403 yyextra->token.name = text.
mid(1,text.
length()-2);
1404 return Token::make_TK_WORD();
1406<St_File>{FILEMASK} {
1407 yyextra->token.name = yytext;
1408 if (yyextra->token.name.endsWith(
"\\ilinebr") ||yyextra->token.name.endsWith(
"@ilinebr"))
1411 yyextra->token.name = yyextra->token.name.left(yyleng-8);
1413 return Token::make_TK_WORD();
1415<St_File>"\""[^\n\"]+"\"" {
1417 yyextra->token.name = text.
mid(1,text.
length()-2);
1418 return Token::make_TK_WORD();
1420<St_Pattern>[^\\\r\n]+ {
1421 yyextra->token.name += yytext;
1423<St_Pattern>"\\ilinebr" {
1424 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1425 return Token::make_TK_WORD();
1429 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1430 return Token::make_TK_WORD();
1433 yyextra->token.name += yytext;
1435<St_Link>{LINKMASK}|{REFWORD} {
1436 yyextra->token.name = yytext;
1437 return Token::make_TK_WORD();
1440 BEGIN(yyextra->commentState);
1448<St_SkipTitle>(\n|"\\ilinebr") {
1449 if (*yytext ==
'\n') unput(
'\n');
1450 return Token::make_TK_NONE();
1455<St_Sections>[^\n@\<]+
1456<St_Sections>{CMD}("<"|{CMD})
1457<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1460 size_t s=tag.find(
"id=");
1464 if (c==
'\'' || c==
'"')
1466 size_t e=tag.find(c,s+4);
1470 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1476<St_Sections>{CMD}"anchor"{BLANK}+ {
1478 BEGIN(St_SecLabel1);
static constexpr int Anchor
1480<St_Sections>{CMD}"ianchor"{BLANK}+ {
1482 BEGIN(St_SecLabel1);
1484<St_Sections>{CMD}"section"{BLANK}+ {
1486 BEGIN(St_SecLabel2);
static constexpr int Section
1488<St_Sections>{CMD}"subsection"{BLANK}+ {
1490 BEGIN(St_SecLabel2);
static constexpr int Subsection
1492<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1494 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1496<St_Sections>{CMD}"paragraph"{BLANK}+ {
1498 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1500<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1502 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1504<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1506 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1508<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1509 yyextra->endMarker=
"endverbatim";
1512<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1513 yyextra->endMarker=
"endiverbatim";
1516<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1517 yyextra->endMarker=
"endiliteral";
1520<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1521 yyextra->endMarker=
"enddot";
1524<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1525 yyextra->endMarker=
"endmsc";
1528<St_Sections>{CMD}"mermaid"/[^a-z_A-Z0-9] {
1529 yyextra->endMarker=
"endmermaid";
1532<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1533 yyextra->endMarker=
"enduml";
1536<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1537 yyextra->endMarker=
"endhtmlonly";
1540<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1541 yyextra->endMarker=
"endlatexonly";
1544<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1545 yyextra->endMarker=
"endmanonly";
1548<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1549 yyextra->endMarker=
"endrtfonly";
1552<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1553 yyextra->endMarker=
"endxmlonly";
1556<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1557 yyextra->endMarker=
"enddocbookonly";
1560<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1561 yyextra->endMarker=
"endcode";
1564<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1565 yyextra->endMarker=
"endicode";
1568<St_Sections>"<!--" {
1569 yyextra->endMarker=
"-->";
1572<St_SecSkip>{CMD}{ID} {
1573 if (yyextra->endMarker==yytext+1)
1579 if (yyextra->endMarker==yytext)
1584<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1586<St_SecSkip>(\n|"\\ilinebr")
1588<St_Sections>(\n|"\\ilinebr")
1589<St_SecLabel1>({REQID}|{LABELID}) {
1591 yyextra->secLabel = yytext;
1595<St_SecLabel2>({REQID}|{LABELID}){BLANK}+ |
1596<St_SecLabel2>({REQID}|{LABELID}) {
1597 yyextra->secLabel = yytext;
1598 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1601<St_SecTitle>[^\n]+ |
1602<St_SecTitle>[^\n]*\n {
1604 yyextra->secTitle = yytext;
1605 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1606 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1608 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1613<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1614 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1617<St_Snippet>[^\\\n]+ {
1618 yyextra->token.name += yytext;
1621 yyextra->token.name += yytext;
1623<St_Snippet>(\n|"\\ilinebr") {
1625 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1626 return Token::make_TK_WORD();
1632 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1638 yyextra->token.name = yytext;
1642 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1650 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1652 const char *p = yyextra->inputString + yyextra->inputPos;
1653 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1654 yyextra->inputPos+=c;
1660 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1663 if (yyextra->definition)
1665 file = yyextra->definition->getOutputFileBase();
1669 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1675 si->
setType(yyextra->secType);
1681 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1684 yyextra->token.text = tagText;
1685 yyextra->token.attribs.
clear();
1686 yyextra->token.endTag =
false;
1687 yyextra->token.emptyTag =
false;
1691 if (tagText.
at(1)==
'/')
1693 yyextra->token.endTag =
true;
1698 int i = startNamePos;
1699 for (i=startNamePos; i < (int)yyleng; i++)
1702 char c = tagText.
at(i);
1703 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1705 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1709 int startAttribList = i;
1710 while (i<(
int)yyleng)
1712 char c=tagText.
at(i);
1714 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1716 if (c ==
'>')
break;
1720 yyextra->token.emptyTag =
true;
1725 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1728 optName = tagText.
mid(startName,endName-startName).
lower();
1730 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1731 if (tagText.
at(i)==
'=')
1733 int startAttrib=0, endAttrib=0;
1736 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1737 if (tagText.
at(i)==
'\'')
1743 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1745 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1747 else if (tagText.
at(i)==
'"')
1752 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1754 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1760 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1762 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1764 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1765 if (optName ==
"align") optValue = optValue.
lower();
1766 else if (optName ==
"valign")
1768 optValue = optValue.
lower();
1769 if (optValue ==
"center") optValue=
"middle";
1777 yyextra->token.attribs.emplace_back(optName,optValue);
1779 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1792 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1794 yyextra->lexerStack.push(
1795 std::make_unique<DocLexerContext>(
1796 yyextra->token,YY_START,
1797 yyextra->autoListLevel,
1799 yyextra->inputString,
1800 YY_CURRENT_BUFFER));
1801 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1807 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1809 if (yyextra->lexerStack.empty())
return false;
1810 const auto &ctx = yyextra->lexerStack.top();
1811 yyextra->autoListLevel = ctx->autoListLevel;
1812 yyextra->inputPos = ctx->inputPos;
1813 yyextra->inputString = ctx->inputString;
1814 yyextra->token = ctx->token;
1816 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1817 yy_switch_to_buffer(ctx->state, yyscanner);
1820 yyextra->lexerStack.pop();
1828 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1837 doctokenizerYYlex_destroy(
p->yyscanner);
1842 return doctokenizerYYlex(
p->yyscanner);
1848 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1856 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1858 if (input.
empty())
return;
1860 yyextra->inputString = input.
data();
1862 yyextra->inputPos = 0;
1863 yyextra->definition = d;
1864 yyextra->fileName = fileName;
1866 yyextra->yyLineNr = 1;
1867 doctokenizerYYlex(yyscanner);
1873 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1874 yyextra->autoListLevel = 0;
1875 yyextra->inputString = input;
1876 yyextra->inputPos = 0;
1877 yyextra->fileName = fileName;
1878 yyextra->insidePre =
false;
1879 yyextra->markdownSupport = markdownSupport;
1880 yyextra->insideHtmlLink = insideHtmlLink;
1887 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1888 return &yyextra->token;
1894 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1896 return &yyextra->token;
1902 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1903 yyextra->insideHtmlLink =
false;
1910 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1917 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
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=
"";
1942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1943 yyextra->token.verb=
"";
1944 yyextra->token.name=
"";
1951 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1952 yyextra->token.verb=
"";
1953 yyextra->token.name=
"";
1954 BEGIN(St_HtmlOnlyOption);
1960 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1961 yyextra->token.verb=
"";
1968 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1969 yyextra->token.verb=
"";
1976 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1977 yyextra->token.verb=
"";
1984 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1985 yyextra->token.verb=
"";
1992 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1993 yyextra->token.verb=
"";
1994 BEGIN(St_LatexOnly);
2000 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2001 yyextra->token.verb=
"";
2008 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2009 yyextra->token.verb=
"";
2010 BEGIN(St_ILiteralOpt);
2016 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2017 yyextra->token.verb=
"";
2024 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2025 yyextra->token.verb=
"";
2026 BEGIN(St_iVerbatim);
2032 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2033 yyextra->token.verb=
"";
2040 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2041 yyextra->token.verb=
"";
2048 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2049 yyextra->token.verb=
"";
2050 yyextra->token.sectionId=
"";
2051 BEGIN(St_PlantUMLOpt);
2057 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2058 yyextra->token.verb=
"";
2065 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2066 yyextra->token.verb=
"";
2067 yyextra->token.sectionId=
"";
2068 BEGIN(St_MermaidOpt);
2074 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2075 yyextra->token.verb=
"";
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;
2103 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2110 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2111 yyextra->token.name =
"";
2118 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2125 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2132 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2133 BEGIN(St_DoxyConfig);
2139 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2140 yyextra->expectQuote=
false;
2147 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2154 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2161 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2162 BEGIN(St_SkipTitle);
2168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2175 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2182 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2183 yyextra->token.name=
"";
2190 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2197 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2198 yyextra->token.name=
"";
2205 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2206 yyextra->token.name=
"";
2213 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2214 yyextra->token.name=
"";
2221 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2228 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2229 BEGIN(St_QuotedString);
2235 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2242 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2243 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2249 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2250 yyextra->insidePre = b;
2256 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2258 int l =
static_cast<int>(tagName.
length());
2260 for (
int i=l-1;i>=0;i--)
2270 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2271 yyextra->autoListLevel++;
2277 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2278 yyextra->autoListLevel--;
2284 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2285 yyextra->fileName = fileName;
2291 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2292 return yyextra->fileName;
2298 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2299 yyextra->yyLineNr = lineno;
2305 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2306 return yyextra->yyLineNr;
2312 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2313 yyextra->stateStack.push(YYSTATE);
2319 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2320 ASSERT(!yyextra->stateStack.empty());
2321 BEGIN(yyextra->stateStack.top());
2322 yyextra->stateStack.pop();
2325#include "doctokenizer.l.h"
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static bool isFlagSet(const DebugMask mask)
DString getFileName() const
void setStateTitleAttrValue()
void setStateILiteralOpt()
void unputString(const DString &tag)
void setStateMermaidOpt()
void setLineNr(int lineno)
void setStatePlantUMLOpt()
void setInsidePre(bool b)
void findSections(const DString &input, const Definition *d, const DString &fileName)
void setStateInternalRef()
void pushBackHtmlTag(const DString &tag)
void init(const char *input, const DString &fileName, bool markdownSupport, bool insideHtmlLink)
void setFileName(const DString &fileName)
void setStateDoxyConfig()
void setStateQuotedString()
std::unique_ptr< Private > p
const T * find(const std::string &key) const
class that provide information about a section.
void setType(SectionType t)
void setFileName(const DString &fn)
static SectionManager & instance()
returns a reference to the singleton
const char * qPrint(const char *s)
doctokenizerYY_state extra