199 {TopStart} {
202 yyextra->lastContext = YY_START;
203 yyextra->startCCodeLine=yyextra->yyLineNr;
204 BEGIN (TopSection);
205 }
static void handleCCode(yyscan_t yyscanner)
206<DefSection>^{LiteralStart} {
209 yyextra->lastContext = YY_START;
210 yyextra->startCCodeLine=yyextra->yyLineNr;
211 BEGIN (LiteralSection);
212 }
213<TopSection>^{TopEnd} {
216 BEGIN( yyextra->lastContext ) ;
217 }
218<TopSection>.*{nl} {
219 yyextra->CCodeBuffer += yytext;
220 yyextra->yyLineNr++;
221 }
222<LiteralSection>^{LiteralEnd} {
225 BEGIN( yyextra->lastContext ) ;
226 }
227<LiteralSection>.*{nl} {
228 yyextra->CCodeBuffer += yytext;
229 yyextra->yyLineNr++;
230 }
231<DefSection>{CPPC}.*{nl} {
232 yyextra->CCodeBuffer += yytext;
233 yyextra->yyLineNr++;
234 }
235<DefSection>^{ws}*{CCS} {
236 yyextra->CCodeBuffer += yytext;
237 yyextra->lastContext = YY_START;
238 BEGIN(COMMENT);
239 }
240<COMMENT>{CCE}{ws}*{nl} {
241 yyextra->CCodeBuffer+=yytext;
242 yyextra->yyLineNr++;
244 BEGIN(yyextra->lastContext);
245 }
246<COMMENT>{CCE} {
247 yyextra->CCodeBuffer+=yytext;
249 BEGIN(yyextra->lastContext);
250 }
251<COMMENT>[^*\n]+ {
252 yyextra->CCodeBuffer += yytext;
253 }
254<COMMENT>{CPPC}|{CCS} {
255 yyextra->CCodeBuffer += yytext;
256 }
257<COMMENT>{nl} {
258 yyextra->CCodeBuffer += yytext;
259 yyextra->yyLineNr++;
260 }
261<COMMENT>. {
262 yyextra->CCodeBuffer += yytext;
263 }
264<DefSection>^{nl} {
267 yyextra->startCCodeLine=yyextra->yyLineNr;
268 }
269<DefSection>^{ws}.*{nl} {
270 yyextra->CCodeBuffer += yytext;
271 yyextra->yyLineNr++;
272 }
273<DefSection>^{RulesStart} {
276 yyextra->startCCodeLine=yyextra->yyLineNr;
277 BEGIN (RulesSectionInit);
278 }
279<DefSection>^{nws} {
282 BEGIN(DefSectionLine);
283 }
284<DefSectionLine>.*{nl} {
286 yyextra->startCCodeLine=yyextra->yyLineNr;
287 BEGIN(DefSection);
288 }
289<RulesSectionInit,RulesPattern>^{RulesEnd} {
292 yyextra->startCCodeLine=yyextra->yyLineNr;
293 BEGIN (UserSection);
294 }
295<RulesSectionInit>^{nws} {
297 unput(*yytext);
298 BEGIN(RulesPattern);
299 }
300<RulesSectionInit>{nl} {
301 yyextra->CCodeBuffer += yytext;
302 yyextra->yyLineNr++;
303 }
304<RulesSectionInit>^{ws}.*{nl} {
305 yyextra->CCodeBuffer += yytext;
306 yyextra->yyLineNr++;
307 }
308<RulesPattern>"<<EOF>>" {
309 yyextra->rulesPatternBuffer += yytext;
310 }
311<RulesPattern>{EscapeRulesChar} {
312 yyextra->rulesPatternBuffer += yytext;
313 }
314<RulesPattern>{RulesSharp} {
315 yyextra->rulesPatternBuffer += yytext;
316 }
317<RulesPattern>{RulesCurly} {
318 yyextra->rulesPatternBuffer += yytext;
319 }
320<RulesPattern>{StartDouble} {
321 yyextra->rulesPatternBuffer += yytext;
322 yyextra->lastContext = YY_START;
323 BEGIN(RulesDouble);
324 }
325<RulesDouble,RulesRoundDouble>"\\\\" {
326 yyextra->rulesPatternBuffer += yytext;
327 }
328<RulesDouble,RulesRoundDouble>"\\\"" {
329 yyextra->rulesPatternBuffer += yytext;
330 }
331<RulesDouble>"\"" {
332 yyextra->rulesPatternBuffer += yytext;
333 BEGIN( yyextra->lastContext ) ;
334 }
335<RulesRoundDouble>"\"" {
336 yyextra->rulesPatternBuffer += yytext;
337 BEGIN(RulesRound) ;
338 }
339<RulesDouble,RulesRoundDouble>. {
340 yyextra->rulesPatternBuffer += yytext;
341 }
342<RulesPattern>{StartSquare} {
343 yyextra->rulesPatternBuffer += yytext;
344 yyextra->lastContext = YY_START;
345 BEGIN(RulesSquare);
346 }
347<RulesSquare,RulesRoundSquare>{CHARCE} {
348 yyextra->rulesPatternBuffer += yytext;
349 }
350<RulesSquare,RulesRoundSquare>"\\[" |
351<RulesSquare,RulesRoundSquare>"\\]" {
352 yyextra->rulesPatternBuffer += yytext;
353 }
354<RulesSquare>"]" {
355 yyextra->rulesPatternBuffer += yytext;
356 BEGIN(RulesPattern) ;
357 }
358<RulesRoundSquare>"]" {
359 yyextra->rulesPatternBuffer += yytext;
360 BEGIN(RulesRound) ;
361 }
362<RulesSquare,RulesRoundSquare>"\\\\" {
363 yyextra->rulesPatternBuffer += yytext;
364 }
365<RulesSquare,RulesRoundSquare>. {
366 yyextra->rulesPatternBuffer += yytext;
367 }
368<RulesPattern>{StartRoundQuest} {
369 yyextra->rulesPatternBuffer += yytext;
370 yyextra->lastContext = YY_START;
371 BEGIN(RulesRoundQuest);
372 }
373<RulesRoundQuest>{nl} {
374 yyextra->rulesPatternBuffer += yytext;
375 if (!yyextra->rulesPatternBuffer.isEmpty())
376 {
378 codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
379 yyextra->rulesPatternBuffer.clear();
381 }
382 }
static void startFontClass(yyscan_t yyscanner, const char *s)
383<RulesRoundQuest>[^)] {
384 yyextra->rulesPatternBuffer += yytext;
385 }
386<RulesRoundQuest>")" {
387 yyextra->rulesPatternBuffer += yytext;
388 BEGIN(yyextra->lastContext);
389 }
390<RulesPattern>{StartRound} {
391 yyextra->roundCount++;
392 yyextra->rulesPatternBuffer += yytext;
393 yyextra->lastContext = YY_START;
394 BEGIN(RulesRound);
395 }
396<RulesRound>{RulesCurly} {
397 yyextra->rulesPatternBuffer += yytext;
398 }
399<RulesRound>{StartSquare} {
400 yyextra->rulesPatternBuffer += yytext;
401 BEGIN(RulesRoundSquare);
402 }
403<RulesRound>{StartDouble} {
404 yyextra->rulesPatternBuffer += yytext;
405 BEGIN(RulesRoundDouble);
406 }
407<RulesRound>{EscapeRulesChar} {
408 yyextra->rulesPatternBuffer += yytext;
409 }
410<RulesRound>"(" {
411 yyextra->roundCount++;
412 yyextra->rulesPatternBuffer += yytext;
413 }
414<RulesRound>")" {
415 yyextra->roundCount--;
416 yyextra->rulesPatternBuffer += yytext;
417 if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
418 }
419<RulesRound>{nl} {
420 yyextra->rulesPatternBuffer += yytext;
421 yyextra->yyLineNr++;
422 }
423<RulesRound>{ws} {
424 yyextra->rulesPatternBuffer += yytext;
425 }
426<RulesRound>. {
427 yyextra->rulesPatternBuffer += yytext;
428 }
429<RulesPattern>{ws}+"|" {
430 if (!yyextra->rulesPatternBuffer.isEmpty())
431 {
433 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
434 yyextra->rulesPatternBuffer.clear();
436 }
438 yyextra->startCCodeLine=yyextra->yyLineNr;
439 yyextra->curlyCount = 0;
440 BEGIN(SkipCurly);
441 }
442<RulesPattern>^{ws}*{nl} {
444 }
445<RulesPattern>^{ws}+ {
447 }
448<RulesPattern>({ws}|{nl}) {
449 unput(*yytext);
450 if (!yyextra->rulesPatternBuffer.isEmpty())
451 {
453 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
454 yyextra->rulesPatternBuffer.clear();
456 }
457 yyextra->startCCodeLine=yyextra->yyLineNr;
458 yyextra->curlyCount = 0;
459 BEGIN(SkipCurly);
460 }
461<RulesPattern>"\\\\" {
462 yyextra->rulesPatternBuffer += yytext;
463 }
464<RulesPattern>{CCS} {
465 if (!yyextra->rulesPatternBuffer.isEmpty())
466 {
468 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
469 yyextra->rulesPatternBuffer.clear();
471 }
472 yyextra->CCodeBuffer += yytext;
473 yyextra->lastContext = YY_START;
474 BEGIN(COMMENT);
475 }
476<RulesPattern>. {
477 yyextra->rulesPatternBuffer += yytext;
478 }
479<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
480 yyextra->CCodeBuffer += yytext;
481 yyextra->lastPreLineCtrlContext = YY_START;
482 BEGIN( PreLineCtrl );
483 }
484<PreLineCtrl>"\""[^\n\"]*"\"" {
485 yyextra->CCodeBuffer += yytext;
486 }
487<PreLineCtrl>. {
488 yyextra->CCodeBuffer += yytext;
489 }
490<PreLineCtrl>\n {
491 yyextra->CCodeBuffer += yytext;
492 yyextra->yyLineNr++;
493 BEGIN( yyextra->lastPreLineCtrlContext );
494 }
495<SkipCurly>"{" {
496 yyextra->CCodeBuffer += yytext;
497 ++yyextra->curlyCount ;
498 }
499<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | /* see bug710917 */
500<SkipCurly>"}" {
501 yyextra->CCodeBuffer += yytext;
503 if( yyextra->curlyCount )
504 {
505 --yyextra->curlyCount ;
506 }
507 }
#define lineCount(s, len)
508<SkipCurly>"}"{BN}*{DCOMM}"<" {
509 yyextra->CCodeBuffer += yytext;
511 if ( yyextra->curlyCount )
512 {
513 --yyextra->curlyCount ;
514 }
515 else
516 {
517 yyextra->docBlockContext = SkipCurlyEndDoc;
518 if (yytext[yyleng-3]=='/')
519 {
520 BEGIN( DocLine );
521 }
522 else
523 {
524 BEGIN( DocBlock );
525 }
526 }
527 }
528<SkipCurly>\" {
529 yyextra->CCodeBuffer += yytext;
530 yyextra->lastStringContext=SkipCurly;
531 BEGIN( SkipString );
532 }
533<SkipCurly>^{B}*"#" {
534 yyextra->CCodeBuffer += yytext;
535 yyextra->lastPreLineCtrlContext = YY_START;
536 BEGIN( PreLineCtrl );
537 }
538<SkipCurly>{B}*{RAWBEGIN} {
539 char *p = yytext;
542 yyextra->lastRawStringContext = YY_START;
543 yyextra->CCodeBuffer += yytext;
544 BEGIN(RawString);
545 }
QCString extractBeginRawStringDelimiter(const char *rawStart)
546<SkipCurly>[^\n#"'@\\/{}<]+ {
547 yyextra->CCodeBuffer += yytext;
548 }
549<SkipCurly>{CCS} {
550 yyextra->CCodeBuffer += yytext;
551 yyextra->lastCContext = YY_START;
552 BEGIN(SkipComment);
553 }
554<SkipCurly>{CPPC} {
555 yyextra->CCodeBuffer += yytext;
556 yyextra->lastCContext = YY_START;
557 BEGIN(SkipCxxComment);
558 }
559<SkipCurly>{CHARLIT} {
560 yyextra->CCodeBuffer += yytext;
561 }
562<SkipCurly>\' {
563 yyextra->CCodeBuffer += yytext;
564 }
565<SkipCurly>. {
566 yyextra->CCodeBuffer += yytext;
567 }
568<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
569 yyextra->CCodeBuffer += yytext;
570 yyextra->docBlockContext = YY_START;
571 BEGIN( DocBlock );
572 }
573<SkipCurly>{CCS}"*"[*]+{BL} {
575 yyextra->CCodeBuffer += yytext;
576 yyextra->yyLineNr++;
577 if( javadocBanner )
578 {
579 yyextra->docBlockContext = YY_START;
580 BEGIN( DocBlock );
581 }
582 else
583 {
584 BEGIN( Comment ) ;
585 }
586 }
#define Config_getBool(name)
587<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
588 yyextra->CCodeBuffer += yytext;
589 yyextra->docBlockContext = YY_START;
590 BEGIN( DocBlock );
591 }
592<SkipCurly>{CPPC}"!" {
593 yyextra->CCodeBuffer += yytext;
594 yyextra->docBlockContext = YY_START;
595 BEGIN( DocLine );
596 }
597<SkipCurly>{CPPC}"/"/[^/] {
598 yyextra->CCodeBuffer += yytext;
599 yyextra->docBlockContext = YY_START;
600 BEGIN( DocLine );
601 }
602
603<SkipCurly>\n {
604 yyextra->CCodeBuffer += yytext;
605 yyextra->yyLineNr++;
606 if (yyextra->curlyCount<=0)
607 {
609 BEGIN(RulesPattern);
610 }
611 }
612<SkipString>\\. {
613 yyextra->CCodeBuffer += yytext;
614 }
615<SkipString>\" {
616 yyextra->CCodeBuffer += yytext;
617 BEGIN( yyextra->lastStringContext );
618 }
619<SkipString>{CCS}|{CCE}|{CPPC} {
620 yyextra->CCodeBuffer += yytext;
621 }
622<SkipString>\n {
623 yyextra->CCodeBuffer += yytext;
624 yyextra->yyLineNr++;
625 }
626<SkipString>. {
627 yyextra->CCodeBuffer += yytext;
628 }
629<SkipCxxComment>.*"\\\n" { // line continuation
630 yyextra->CCodeBuffer += yytext;
631 yyextra->yyLineNr++;
632 }
633<SkipCxxComment>{ANYopt}/\n {
634 yyextra->CCodeBuffer += yytext;
635 BEGIN( yyextra->lastCContext ) ;
636 }
637<Comment>{BN}+ {
638 yyextra->CCodeBuffer += yytext ;
640 }
641<Comment>{CCS} { yyextra->CCodeBuffer += yytext ; }
642<Comment>{CPPC} { yyextra->CCodeBuffer += yytext ; }
643<Comment>{CMD}("code"|"verbatim"|"iliteral") {
644 yyextra->insideCode=
TRUE;
645 yyextra->CCodeBuffer += yytext ;
646 }
647<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
648 yyextra->insideCode=
FALSE;
649 yyextra->CCodeBuffer += yytext ;
650 }
651<Comment>[^ \.\t\r\n\/\*]+ { yyextra->CCodeBuffer += yytext ; }
652<Comment>{CCE} {
653 yyextra->CCodeBuffer += yytext ;
654 if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
655 }
656<Comment>. { yyextra->CCodeBuffer += *yytext ; }
657
658<SkipComment>{CPPC}|{CCS} {
659 yyextra->CCodeBuffer += yytext;
660 }
661<SkipComment>[^\*\n]+ {
662 yyextra->CCodeBuffer += yytext;
663 }
664<SkipComment>\n {
665 yyextra->CCodeBuffer += yytext;
666 yyextra->yyLineNr++;
667 }
668<SkipComment>{B}*{CCE} {
669 yyextra->CCodeBuffer += yytext;
670 BEGIN( yyextra->lastCContext );
671 }
672<SkipComment>"*" {
673 yyextra->CCodeBuffer += yytext;
674 }
675<RawString>{RAWEND} {
676 yyextra->CCodeBuffer += yytext;
678 {
679 BEGIN(yyextra->lastRawStringContext);
680 }
681 }
QCString extractEndRawStringDelimiter(const char *rawEnd)
682<RawString>[^)\n]+ {
683 yyextra->CCodeBuffer += yytext;
684 }
685<RawString>. {
686 yyextra->CCodeBuffer += yytext;
687 }
688<RawString>\n {
689 yyextra->CCodeBuffer += yytext;
690 yyextra->yyLineNr++;
691 }
692
693
694
695<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
696 yyextra->CCodeBuffer += yytext;
698 }
699<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
700 yyextra->CCodeBuffer += yytext;
701 BEGIN( yyextra->docBlockContext );
702 }
703<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
704 yyextra->CCodeBuffer += yytext;
705 BEGIN( yyextra->docBlockContext );
706 }
707<DocLine>{NONLopt}/"\n" { // whole line
708 yyextra->CCodeBuffer += yytext;
709 BEGIN( yyextra->docBlockContext );
710 }
711
712
713
714<DocBlock>"*"*{CCE} { // end of comment block
715 yyextra->CCodeBuffer += yytext;
716 BEGIN(yyextra->docBlockContext);
717 }
718<DocBlock>^{B}*"*"+/[^/] {
719 yyextra->CCodeBuffer += yytext;
720 }
721<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
722 yyextra->CCodeBuffer += yytext;
723 }
724<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
725 yyextra->CCodeBuffer += yytext;
726 }
727<DocBlock>{CPPC} { // slashes in the middle of a comment block
728 yyextra->CCodeBuffer += yytext;
729 }
730<DocBlock>{CCS} { // start of a new comment in the
731
732 yyextra->CCodeBuffer += yytext;
733 }
734<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
735 yyextra->CCodeBuffer += yytext;
736 }
737<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
738 yyextra->CCodeBuffer += yytext;
739 yyextra->docBlockName=&yytext[1];
740 if (yyextra->docBlockName.at(1)=='[')
741 {
742 yyextra->docBlockName.at(1)=']';
743 }
744 if (yyextra->docBlockName.at(1)=='{')
745 {
746 yyextra->docBlockName.at(1)='}';
747 }
748 if (yyextra->docBlockName.at(1)=='(')
749 {
750 yyextra->docBlockName.at(1)=')';
751 }
752 yyextra->fencedSize=0;
753 yyextra->nestedComment=
FALSE;
754 BEGIN(DocCopyBlock);
755 }
756<DocBlock>{B}*"<"{PRE}">" {
757 yyextra->CCodeBuffer += yytext;
758 yyextra->docBlockName="<pre>";
759 yyextra->fencedSize=0;
760 yyextra->nestedComment=
FALSE;
761 BEGIN(DocCopyBlock);
762 }
763<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
764 yyextra->CCodeBuffer += yytext;
765 yyextra->docBlockName="uml";
766 yyextra->fencedSize=0;
767 yyextra->nestedComment=
FALSE;
768 BEGIN(DocCopyBlock);
769 }
770<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
771 yyextra->CCodeBuffer += yytext;
772 yyextra->docBlockName=&yytext[1];
773 yyextra->fencedSize=0;
774 yyextra->nestedComment=
FALSE;
775 BEGIN(DocCopyBlock);
776 }
777<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
778 yyextra->CCodeBuffer += yytext;
780 yyextra->docBlockName="~~~";
782 yyextra->nestedComment=
FALSE;
783 BEGIN(DocCopyBlock);
784 }
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
785<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
786 yyextra->CCodeBuffer += yytext;
788 yyextra->docBlockName="```";
790 yyextra->nestedComment=
FALSE;
791 BEGIN(DocCopyBlock);
792 }
793<DocBlock>{B}*"<code>" {
794 REJECT;
795 }
796<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
797 yyextra->CCodeBuffer += yytext;
798 }
799<DocBlock>\n { // newline
800 yyextra->CCodeBuffer += yytext;
802 }
803<DocBlock>. { // command block
804 yyextra->CCodeBuffer += yytext;
805 }
806
807
808<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
809 yyextra->CCodeBuffer += yytext;
810 if (yyextra->docBlockName=="<pre>")
811 {
812 BEGIN(DocBlock);
813 }
814 }
815<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
816 yyextra->CCodeBuffer += yytext;
817 if (yyextra->docBlockName=="<code>")
818 {
819 BEGIN(DocBlock);
820 }
821 }
822<DocCopyBlock>{CMD}("f$"|"f]"|"f}"|"f)") {
823 yyextra->CCodeBuffer += yytext;
824 if (yyextra->docBlockName==&yytext[1])
825 {
826 BEGIN(DocBlock);
827 }
828 }
829<DocCopyBlock>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
830 yyextra->CCodeBuffer += yytext;
831 if (&yytext[4]==yyextra->docBlockName)
832 {
833 BEGIN(DocBlock);
834 }
835 }
836<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
837 yyextra->CCodeBuffer += yytext;
838 if ((yyextra->docBlockName=="verbatim") || (yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
839 {
840 REJECT;
841 }
842 else
843 {
844 yyextra->CCodeBuffer += yytext;
845 }
846 }
847<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
848 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
849 {
850 yyextra->CCodeBuffer += yytext;
851 }
852 else
853 {
854 REJECT;
855 }
856 }
857<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
858 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
859 {
860 yyextra->CCodeBuffer += yytext;
861 }
862 else
863 {
864 REJECT;
865 }
866 }
867<DocCopyBlock>^{B}*"*"+/{BN}* { // start of a comment line with one *
868 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
869 {
870 if (yyextra->nestedComment)
871 {
872 yyextra->CCodeBuffer += yytext;
873 }
874 else
875 {
876 yyextra->CCodeBuffer += yytext;
877 }
878 }
879 else
880 {
881 REJECT;
882 }
883 }
884<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
885 yyextra->CCodeBuffer += yytext;
888 {
889 BEGIN(DocBlock);
890 }
891 }
892<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
893 yyextra->CCodeBuffer += yytext;
896 {
897 BEGIN(DocBlock);
898 }
899 }
900<DocCopyBlock>[^<@/\*\]~\$\\\n]+ { // any character that is not special
901 yyextra->CCodeBuffer += yytext;
902 }
903<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
904 if (yytext[1]=='*')
905 {
906 yyextra->nestedComment=
TRUE;
907 }
908 else if (yytext[0]=='*')
909 {
910 yyextra->nestedComment=
FALSE;
911 }
912 yyextra->CCodeBuffer += yytext;
913 }
914<DocCopyBlock>\n { // newline
915 yyextra->CCodeBuffer += yytext;
917 }
918<DocCopyBlock>. { // any other character
919 yyextra->CCodeBuffer += yytext;
920 }
921<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" { // desc is followed by another one
922 yyextra->docBlockContext = SkipCurlyEndDoc;
923 yyextra->CCodeBuffer += yytext;
924 if (yytext[yyleng-3]=='/')
925 {
926 BEGIN( DocLine );
927 }
928 else
929 {
930 BEGIN( DocBlock );
931 }
932 }
933<SkipCurlyEndDoc>"}" {
934 yyextra->CCodeBuffer += yytext;
935 BEGIN(SkipCurly);
936 }
937
938<UserSection>.*{nl} {
939 yyextra->CCodeBuffer += yytext;
940 yyextra->yyLineNr++;
941 }
942
943<*>. { fprintf(stderr,"Lex code scanner Def rule for %s: #%s#\n",stateToString(YY_START),yytext);}
944<*>{nl} { fprintf(stderr,"Lex code scanner Def rule for newline %s: #%s#\n",stateToString(YY_START),yytext); yyextra->yyLineNr++;}
945 */
946<*><<EOF>> {
949 }
950%%