15%option never-interactive
16%option prefix="lexscannerYY"
18%option extra-type="struct lexscannerYY_state *"
24#define YY_TYPEDEF_YY_SCANNER_T
53#define YY_NO_UNISTD_H 1
55#define repeatChar(chr, cnt) std::string(cnt, chr).c_str()
101#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
C-like language parser using state-based lexical scanning.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
This is an alternative implementation of QCString.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static void handleCCode(yyscan_t yyscanner)
static const char * getLexerFILE()
int lastPreLineCtrlContext
ClangTUParser * clangParser
std::shared_ptr< Entry > current
std::shared_ptr< Entry > current_root
COutlineParser cOutlineParser
A bunch of utility functions.
119RulesSharp "<"[^>\n]*">"
120RulesCurly "{"[^{}\n]*"}"
125EscapeRulesCharOpen "\\["|"\<"|"\\{"|"\\("|"\\\""|"\\ "|"\\\\"
126EscapeRulesCharClose "\\]"|"\>"|"\\}"|"\\)"
127EscapeRulesChar {EscapeRulesCharOpen}|{EscapeRulesCharClose}
134ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
137RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
138RAWEND ")"[^ \t\(\)\\]{0,16}\"
139CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
150DCOMM ("/\*!"|"/\**"|"/\/!"|"/\/\/")
191<DefSection>{Option} {
194<Option>"prefix"{ws}*"="{ws}* {
197<OptPrefix>"\""[^\"]*"\"" {
198 yyextra->prefix = yytext;
199 yyextra->prefix = yyextra->prefix.mid(1,yyleng-2);
203 yyextra-> reentrant =
true;
205<Option>"bison-bridge" {
206 yyextra-> bison_bridge =
true;
208<Option>"bison-locations" {
209 yyextra-> bison_bridge =
true;
210 yyextra-> bison_locations =
true;
215 yyextra->cCodeBuffer += yytext;
218<DefSection>^{RulesStart} {
221 yyextra->cCodeBuffer +=
"int " + yyextra->prefix +
"lex (";
222 if (yyextra->bison_bridge )
224 if (fill) yyextra->cCodeBuffer +=
",";
225 yyextra->cCodeBuffer +=
"YYSTYPE * yylval_param";
228 if (yyextra->bison_locations)
230 if (fill) yyextra->cCodeBuffer +=
",";
231 yyextra->cCodeBuffer +=
"YYLTYPE * yylloc_param";
234 if (yyextra->reentrant)
236 if (fill) yyextra->cCodeBuffer +=
",";
237 yyextra->cCodeBuffer +=
"yyscan_t yyscanner";
240 if (!yyextra->bison_bridge && !yyextra->bison_locations && !yyextra->reentrant)
242 yyextra->cCodeBuffer +=
"void";
244 yyextra->cCodeBuffer +=
") {\n";
246 BEGIN (RulesSectionInit);
248<DefSection>^{TopStart} {
249 yyextra->cCodeBuffer +=
"\n";
250 yyextra->lastContext = YY_START;
253<DefSection>^{LiteralStart} {
254 yyextra->cCodeBuffer +=
"\n";
255 yyextra->lastContext = YY_START;
256 BEGIN (LiteralSection);
258<TopSection>^{TopEnd} {
259 yyextra->cCodeBuffer +=
"\n";
260 BEGIN( yyextra->lastContext ) ;
263 yyextra->cCodeBuffer += yytext;
265<LiteralSection>^{LiteralEnd} {
266 yyextra->cCodeBuffer +=
"\n";
267 BEGIN( yyextra->lastContext ) ;
269<LiteralSection>.*{nl} {
270 yyextra->cCodeBuffer += yytext;
273 BEGIN(DefSectionLine);
275<DefSection>{CPPC}.*{nl} {
276 yyextra->cCodeBuffer += yytext;
278<DefSection>^{ws}*{CCS} {
279 yyextra->cCodeBuffer += yytext;
280 yyextra->lastContext = YY_START;
283<COMMENT>{CCE}{ws}*{nl} {
284 yyextra->cCodeBuffer+=yytext;
285 BEGIN(yyextra->lastContext);
288 yyextra->cCodeBuffer+=yytext;
289 BEGIN(yyextra->lastContext);
292 yyextra->cCodeBuffer += yytext;
294<COMMENT>{CPPC}|{CCS} {
295 yyextra->cCodeBuffer += yytext;
298 yyextra->cCodeBuffer += yytext;
301 yyextra->cCodeBuffer += yytext;
304 yyextra->cCodeBuffer +=
"\n";
306<DefSection>^{ws}.*{nl} {
307 yyextra->cCodeBuffer += yytext;
309<DefSectionLine>.*{nl} {
310 yyextra->cCodeBuffer +=
"\n";
313<RulesSectionInit,RulesPattern>^{RulesEnd} {
314 yyextra->cCodeBuffer +=
"}\n";
317<RulesSectionInit>^{nws} {
321<RulesSectionInit>^{ws}.*{nl} {
322 yyextra->cCodeBuffer += yytext;
324<RulesSectionInit>^{nl} {
325 yyextra->cCodeBuffer += yytext;
327<RulesPattern>"<<EOF>>" {
328 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
#define repeatChar(chr, cnt)
330<RulesPattern>{EscapeRulesChar} {
331 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
333<RulesPattern>{RulesSharp} {
334 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
336<RulesPattern>{RulesCurly} {
337 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
339<RulesPattern>{StartDouble} {
340 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
341 yyextra->lastContext = YY_START;
344<RulesDouble,RulesRoundDouble>"\\\\" {
345 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
347<RulesDouble,RulesRoundDouble>"\\\"" {
348 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
351 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
352 BEGIN( yyextra->lastContext ) ;
354<RulesRoundDouble>"\"" {
355 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
358<RulesDouble,RulesRoundDouble>. {
359 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
361<RulesPattern>{StartSquare} {
362 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
363 yyextra->lastContext = YY_START;
366<RulesSquare,RulesRoundSquare>{CHARCE} {
367 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
369<RulesSquare,RulesRoundSquare>"\\[" |
370<RulesSquare,RulesRoundSquare>"\\]" {
371 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
374 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
377<RulesRoundSquare>"]" {
378 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
381<RulesSquare,RulesRoundSquare>"\\\\" {
382 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
384<RulesSquare,RulesRoundSquare>. {
385 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
387<RulesPattern>{StartRoundQuest} {
388 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
389 yyextra->lastContext = YY_START;
390 BEGIN(RulesRoundQuest);
392<RulesRoundQuest>{nl} {
393 yyextra->cCodeBuffer +=
"\n";
395<RulesRoundQuest>[^)] {
396 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
398<RulesRoundQuest>")" {
399 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
400 BEGIN(yyextra->lastContext);
402<RulesPattern>{StartRound} {
403 yyextra->roundCount++;
404 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
405 yyextra->lastContext = YY_START;
408<RulesRound>{RulesCurly} {
409 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
411<RulesRound>{StartSquare} {
412 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
413 BEGIN(RulesRoundSquare);
415<RulesRound>{StartDouble} {
416 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
417 BEGIN(RulesRoundDouble);
419<RulesRound>{EscapeRulesChar} {
420 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
423 yyextra->roundCount++;
424 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
427 yyextra->roundCount--;
428 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
429 if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
432 yyextra->cCodeBuffer +=
"\n";
435 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
438 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
440<RulesPattern>{ws}+"|" {
441 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
442 yyextra->curlyCount = 0;
445<RulesPattern>^{ws}*{nl} {
446 yyextra->cCodeBuffer +=
"\n";
448<RulesPattern>^{ws}+ {
451<RulesPattern>({ws}|{nl}) {
453 yyextra->curlyCount = 0;
456<RulesPattern>"\\\\" {
457 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
460 yyextra->cCodeBuffer += yytext;
461 yyextra->lastContext = YY_START;
465 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
467<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" {
468 yyextra->cCodeBuffer += yytext;
469 yyextra->lastPreLineCtrlContext = YY_START;
470 BEGIN( PreLineCtrl );
472<PreLineCtrl>"\""[^\n\"]*"\"" {
473 yyextra->cCodeBuffer += yytext;
476 yyextra->cCodeBuffer += yytext;
479 yyextra->cCodeBuffer += yytext;
480 BEGIN( yyextra->lastPreLineCtrlContext );
483 yyextra->cCodeBuffer += yytext;
484 ++yyextra->curlyCount ;
486<SkipCurly>"}"/{BN}*{DCOMM}"<!--" |
488 yyextra->cCodeBuffer += yytext;
489 if( yyextra->curlyCount )
491 --yyextra->curlyCount ;
494<SkipCurly>"}"{BN}*{DCOMM}"<" {
495 yyextra->cCodeBuffer += yytext;
496 if ( yyextra->curlyCount )
498 --yyextra->curlyCount ;
502 yyextra->docBlockContext = SkipCurlyEndDoc;
503 if (yytext[yyleng-3]==
'/')
514 yyextra->cCodeBuffer += yytext;
515 yyextra->lastStringContext=SkipCurly;
519 yyextra->cCodeBuffer += yytext;
520 yyextra->lastPreLineCtrlContext = YY_START;
521 BEGIN( PreLineCtrl );
523<SkipCurly>{B}*{RAWBEGIN} {
527 yyextra->lastRawStringContext = YY_START;
528 yyextra->cCodeBuffer += yytext;
QCString extractBeginRawStringDelimiter(const char *rawStart)
531<SkipCurly>[^\n#"'@\\/{}<]+ {
532 yyextra->cCodeBuffer += yytext;
535 yyextra->cCodeBuffer += yytext;
536 yyextra->lastCContext = YY_START;
540 yyextra->cCodeBuffer += yytext;
541 yyextra->lastCContext = YY_START;
542 BEGIN(SkipCxxComment);
544<SkipCurly>{CHARLIT} {
545 yyextra->cCodeBuffer += yytext;
548 yyextra->cCodeBuffer += yytext;
551 yyextra->cCodeBuffer += yytext;
553<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
554 yyextra->cCodeBuffer += yytext;
555 yyextra->docBlockContext = YY_START;
558<SkipCurly>{CCS}"*"[*]+{BL} {
560 yyextra->cCodeBuffer += yytext;
563 yyextra->docBlockContext = YY_START;
#define Config_getBool(name)
571<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
572 yyextra->cCodeBuffer += yytext;
573 yyextra->docBlockContext = YY_START;
576<SkipCurly>{CPPC}"!" {
577 yyextra->cCodeBuffer += yytext;
578 yyextra->docBlockContext = YY_START;
581<SkipCurly>{CPPC}"/"/[^/] {
582 yyextra->cCodeBuffer += yytext;
583 yyextra->docBlockContext = YY_START;
588 yyextra->cCodeBuffer += yytext;
589 if (yyextra->curlyCount<=0)
595 yyextra->cCodeBuffer += yytext;
598 yyextra->cCodeBuffer += yytext;
599 BEGIN( yyextra->lastStringContext );
601<SkipString>{CCS}|{CCE}|{CPPC} {
602 yyextra->cCodeBuffer += yytext;
605 yyextra->cCodeBuffer += yytext;
608 yyextra->cCodeBuffer += yytext;
610<SkipCxxComment>.*"\\\n" {
611 yyextra->cCodeBuffer += yytext;
613<SkipCxxComment>{ANYopt}/\n {
614 yyextra->cCodeBuffer += yytext;
615 BEGIN( yyextra->lastCContext ) ;
618 yyextra->cCodeBuffer += yytext ;
620<Comment>{CCS} { yyextra->cCodeBuffer += yytext ; }
621<Comment>{CPPC} { yyextra->cCodeBuffer += yytext ; }
622<Comment>{CMD}("code"|"verbatim"|"iliteral") {
623 yyextra->insideCode=
TRUE;
624 yyextra->cCodeBuffer += yytext ;
626<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
627 yyextra->insideCode=
FALSE;
628 yyextra->cCodeBuffer += yytext ;
630<Comment>[^ \.\t\r\n\/\*]+ { yyextra->cCodeBuffer += yytext ; }
631<Comment>{CCE} { yyextra->cCodeBuffer += yytext ;
632 if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
634<Comment>. { yyextra->cCodeBuffer += *yytext ; }
636<SkipComment>{CPPC}|{CCS} {
637 yyextra->cCodeBuffer += yytext;
639<SkipComment>[^\*\n]+ {
640 yyextra->cCodeBuffer += yytext;
643 yyextra->cCodeBuffer += yytext;
645<SkipComment>{B}*{CCE} {
646 yyextra->cCodeBuffer += yytext;
647 BEGIN( yyextra->lastCContext );
650 yyextra->cCodeBuffer += yytext;
653 yyextra->cCodeBuffer += yytext;
656 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
660 yyextra->cCodeBuffer += yytext;
663 yyextra->cCodeBuffer += yytext;
666 yyextra->cCodeBuffer += yytext;
671<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
672 yyextra->cCodeBuffer += yytext;
674<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
675 yyextra->cCodeBuffer += yytext;
676 BEGIN( yyextra->docBlockContext );
678<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
679 yyextra->cCodeBuffer += yytext;
680 BEGIN( yyextra->docBlockContext );
682<DocLine>{NONLopt}/"\n" {
683 yyextra->cCodeBuffer += yytext;
684 BEGIN( yyextra->docBlockContext );
690 yyextra->cCodeBuffer += yytext;
691 BEGIN(yyextra->docBlockContext);
693<DocBlock>^{B}*"*"+/[^/] {
694 yyextra->cCodeBuffer += yytext;
696<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
697 yyextra->cCodeBuffer += yytext;
699<DocBlock>^{B}*({CPPC}){B}* {
700 yyextra->cCodeBuffer += yytext;
703 yyextra->cCodeBuffer += yytext;
707 yyextra->cCodeBuffer += yytext;
709<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
710 yyextra->cCodeBuffer += yytext;
712<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
713 yyextra->cCodeBuffer += yytext;
714 yyextra->docBlockName=&yytext[1];
715 if (yyextra->docBlockName.at(1)==
'[')
717 yyextra->docBlockName.at(1)=
']';
719 if (yyextra->docBlockName.at(1)==
'{')
721 yyextra->docBlockName.at(1)=
'}';
723 if (yyextra->docBlockName.at(1)==
'(')
725 yyextra->docBlockName.at(1)=
')';
727 yyextra->fencedSize=0;
728 yyextra->nestedComment=
FALSE;
731<DocBlock>{B}*"<"{PRE}">" {
732 yyextra->cCodeBuffer += yytext;
733 yyextra->docBlockName=
"<pre>";
734 yyextra->fencedSize=0;
735 yyextra->nestedComment=
FALSE;
738<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
739 yyextra->cCodeBuffer += yytext;
740 yyextra->docBlockName=
"uml";
741 yyextra->fencedSize=0;
742 yyextra->nestedComment=
FALSE;
745<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
746 yyextra->cCodeBuffer += yytext;
747 yyextra->docBlockName=&yytext[1];
748 yyextra->fencedSize=0;
749 yyextra->nestedComment=
FALSE;
752<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
753 yyextra->cCodeBuffer += yytext;
755 yyextra->docBlockName=
"~~~";
757 yyextra->nestedComment=
FALSE;
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
760<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
761 yyextra->cCodeBuffer += yytext;
763 yyextra->docBlockName=
"```";
765 yyextra->nestedComment=
FALSE;
768<DocBlock>{B}*"<code>" {
771<DocBlock>[^@*~\/\\\n]+ {
772 yyextra->cCodeBuffer += yytext;
775 yyextra->cCodeBuffer += yytext;
778 yyextra->cCodeBuffer += yytext;
782<DocCopyBlock>"</"{PRE}">" {
783 yyextra->cCodeBuffer += yytext;
784 if (yyextra->docBlockName==
"<pre>")
789<DocCopyBlock>"</"{CODE}">" {
790 yyextra->cCodeBuffer += yytext;
791 if (yyextra->docBlockName==
"<code>")
796<DocCopyBlock>{CMD}("f$"|"f]"|"f}"|"f)") {
797 yyextra->cCodeBuffer += yytext;
798 if (yyextra->docBlockName==&yytext[1])
803<DocCopyBlock>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
804 yyextra->cCodeBuffer += yytext;
805 if (yyextra->docBlockName==&yytext[4])
810<DocCopyBlock>^{B}*"*"+/{BN}+ {
811 yyextra->cCodeBuffer += yytext;
812 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
818 yyextra->cCodeBuffer += yytext;
821<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
822 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
824 yyextra->cCodeBuffer += yytext;
831<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
832 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
834 yyextra->cCodeBuffer += yytext;
841<DocCopyBlock>^{B}*"*"+/{BN}* {
842 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
844 if (yyextra->nestedComment)
846 yyextra->cCodeBuffer += yytext;
850 yyextra->cCodeBuffer += yytext;
858<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
859 yyextra->cCodeBuffer += yytext;
866<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
867 yyextra->cCodeBuffer += yytext;
874<DocCopyBlock>[^<@/\*\]~\$\\\n]+ {
875 yyextra->cCodeBuffer += yytext;
877<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
880 yyextra->nestedComment=
TRUE;
882 else if (yytext[0]==
'*')
884 yyextra->nestedComment=
FALSE;
886 yyextra->cCodeBuffer += yytext;
889 yyextra->cCodeBuffer += yytext;
892 yyextra->cCodeBuffer += yytext;
894<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
895 yyextra->docBlockContext = SkipCurlyEndDoc;
896 yyextra->cCodeBuffer += yytext;
897 if (yytext[yyleng-3]==
'/')
906<SkipCurlyEndDoc>"}" {
907 yyextra->cCodeBuffer += yytext;
912 yyextra->cCodeBuffer += yytext;
static void handleCCode(yyscan_t yyscanner)
929 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
931 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
933 *buf = yyextra->inputString[yyextra->inputPosition++] ;
945 const std::shared_ptr<Entry> &rt,
948 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
950 yyextra->inputString = fileBuf;
951 yyextra->inputPosition = 0;
952 lexscannerYYrestart(0,yyscanner);
954 yyextra->current_root = rt;
955 yyextra->fileName = fileName;
956 yyextra->clangParser = clangParser;
958 rt->lang = yyextra->language;
959 msg(
"Parsing file {}...\n",yyextra->fileName);
961 yyextra->current_root = rt;
962 yyextra->current = std::make_shared<Entry>();
966 yyextra->current->name = yyextra->fileName;
967 yyextra->current->section =
EntryType(sec);
968 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
970 yyextra->current->reset();
973 lexscannerYYlex(yyscanner);
975 rt->program.str(std::string());
983 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
985 if (yyextra->cCodeBuffer.isEmpty())
return;
986 yyextra->cOutlineParser.parseInput(yyextra->fileName,
987 yyextra->cCodeBuffer.data(),
988 yyextra->current_root,
989 yyextra->clangParser);
990 yyextra->cCodeBuffer.clear();
1003 lexscannerYYlex_init_extra(&
p->state,&
p->yyscanner);
1011 lexscannerYYlex_destroy(
p->yyscanner);
1015 const char *fileBuf,
1016 const std::shared_ptr<Entry> &root,
1019 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
1021 yyextra->fileName = fileName;
1024 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
1030#include "lexscanner.l.h"
static bool isFlagSet(const DebugMask mask)
Wrapper class for the Entry type.
~LexOutlineParser() override
std::unique_ptr< Private > p
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
const char * qPrint(const char *s)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
EntryType guessSection(const QCString &name)