summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--addon/doxmlparser/src/basehandler.h10
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp2
-rw-r--r--addon/doxmlparser/src/compoundhandler.h40
-rw-r--r--addon/doxmlparser/src/linkedtexthandler.cpp2
-rw-r--r--addon/doxyapp/doxyapp.cpp6
-rw-r--r--addon/doxyparse/doxyparse.cpp6
-rw-r--r--addon/doxywizard/wizard.h114
-rw-r--r--doc/commands.doc10
-rw-r--r--doc/docblocks.doc4
-rw-r--r--doc/doxygen_manual.tex5
-rw-r--r--doc/extsearch.doc9
-rw-r--r--doc/markdown.doc7
-rw-r--r--src/CMakeLists.txt19
-rw-r--r--src/cite.cpp6
-rw-r--r--src/classdef.cpp73
-rw-r--r--src/classlist.cpp4
-rw-r--r--src/code.h35
-rw-r--r--src/code.l5175
-rw-r--r--src/commentcnv.l1030
-rw-r--r--src/commentscan.h4
-rw-r--r--src/commentscan.l16
-rw-r--r--src/condparser.cpp2
-rw-r--r--src/config.xml4
-rw-r--r--src/configimpl.l164
-rw-r--r--src/context.cpp50
-rw-r--r--src/declinfo.l13
-rw-r--r--src/defargs.h4
-rw-r--r--src/defargs.l23
-rw-r--r--src/defgen.cpp5
-rw-r--r--src/definition.cpp50
-rw-r--r--src/dia.cpp18
-rw-r--r--src/diagram.cpp11
-rw-r--r--src/docbookgen.cpp3
-rw-r--r--src/docbookvisitor.cpp48
-rw-r--r--src/docgroup.h4
-rw-r--r--src/docparser.cpp76
-rw-r--r--src/docparser.h122
-rw-r--r--src/docsets.cpp12
-rw-r--r--src/doctokenizer.h15
-rw-r--r--src/doctokenizer.l27
-rw-r--r--src/dot.cpp22
-rw-r--r--src/dotcallgraph.cpp9
-rw-r--r--src/dotcallgraph.h1
-rw-r--r--src/dotclassgraph.cpp7
-rw-r--r--src/dotclassgraph.h1
-rw-r--r--src/dotdirdeps.h4
-rw-r--r--src/dotgfxhierarchytable.cpp2
-rw-r--r--src/dotgraph.cpp2
-rw-r--r--src/dotgraph.h18
-rw-r--r--src/dotgroupcollaboration.cpp10
-rw-r--r--src/dotincldepgraph.cpp8
-rw-r--r--src/dotincldepgraph.h1
-rw-r--r--src/dotrunner.cpp14
-rw-r--r--src/doxygen.cpp405
-rw-r--r--src/eclipsehelp.cpp3
-rw-r--r--src/entry.cpp26
-rw-r--r--src/entry.h12
-rw-r--r--src/filedef.cpp24
-rw-r--r--src/fileparser.cpp2
-rw-r--r--src/fileparser.h12
-rw-r--r--src/formula.cpp41
-rw-r--r--src/fortrancode.h46
-rw-r--r--src/fortrancode.l36
-rw-r--r--src/fortranscanner.h32
-rw-r--r--src/fortranscanner.l138
-rw-r--r--src/growbuf.h1
-rw-r--r--src/htags.cpp6
-rw-r--r--src/htmldocvisitor.cpp26
-rw-r--r--src/htmlgen.cpp12
-rw-r--r--src/htmlhelp.cpp9
-rw-r--r--src/latexdocvisitor.cpp29
-rw-r--r--src/latexgen.cpp14
-rw-r--r--src/mandocvisitor.cpp24
-rw-r--r--src/mangen.cpp6
-rw-r--r--src/markdown.cpp84
-rw-r--r--src/markdown.h24
-rw-r--r--src/memberdef.cpp164
-rw-r--r--src/membergroup.cpp4
-rw-r--r--src/membergroup.h16
-rw-r--r--src/message.cpp16
-rw-r--r--src/message.h1
-rw-r--r--src/msc.cpp8
-rw-r--r--src/namespacedef.cpp28
-rw-r--r--src/outputgen.cpp3
-rw-r--r--src/parserintf.h117
-rw-r--r--src/perlmodgen.cpp3
-rw-r--r--src/plantuml.cpp16
-rw-r--r--src/portable.cpp290
-rw-r--r--src/portable.h56
-rw-r--r--src/pre.l115
-rw-r--r--src/pycode.h29
-rw-r--r--src/pycode.l32
-rw-r--r--src/pyscanner.h21
-rw-r--r--src/pyscanner.l75
-rw-r--r--src/qhp.cpp3
-rw-r--r--src/rtfdocvisitor.cpp24
-rw-r--r--src/rtfgen.cpp3
-rw-r--r--src/scanner.h27
-rw-r--r--src/scanner.l6858
-rw-r--r--src/searchindex.cpp2
-rw-r--r--src/sqlcode.h31
-rw-r--r--src/sqlcode.l36
-rw-r--r--src/sqlscanner.h65
-rw-r--r--src/stlsupport.cpp270
-rw-r--r--src/stlsupport.h29
-rw-r--r--src/tagreader.cpp53
-rw-r--r--src/tagreader.h2
-rw-r--r--src/tclscanner.h12
-rw-r--r--src/tclscanner.l79
-rw-r--r--src/template.cpp120
-rw-r--r--src/util.cpp53
-rw-r--r--src/vhdlcode.h31
-rw-r--r--src/vhdlcode.l30
-rw-r--r--src/vhdldocgen.cpp63
-rw-r--r--src/vhdldocgen.h8
-rw-r--r--src/vhdljjparser.cpp61
-rw-r--r--src/vhdljjparser.h38
-rw-r--r--src/xmlcode.h31
-rw-r--r--src/xmlcode.l32
-rw-r--r--src/xmldocvisitor.cpp24
-rw-r--r--src/xmlgen.cpp22
-rw-r--r--src/xmlscanner.h65
-rw-r--r--templates/html/doxygen.css5
-rw-r--r--templates/html/resize.js1
-rw-r--r--templates/latex/doxygen.sty10
-rw-r--r--templates/xml/compound.xsd1
-rwxr-xr-xtesting/runtests.py88
-rw-r--r--vhdlparser/CMakeLists.txt2
-rw-r--r--vhdlparser/CharStream.cc22
-rw-r--r--vhdlparser/CharStream.h104
-rw-r--r--vhdlparser/ErrorHandler.h22
-rw-r--r--vhdlparser/ParseException.cc50
-rw-r--r--vhdlparser/ParseException.h22
-rw-r--r--vhdlparser/Token.cc37
-rw-r--r--vhdlparser/Token.h18
-rw-r--r--vhdlparser/TokenManager.h15
-rw-r--r--vhdlparser/TokenMgrError.cc28
-rw-r--r--vhdlparser/TokenMgrError.h20
-rw-r--r--vhdlparser/VhdlParser.cc5060
-rw-r--r--vhdlparser/VhdlParser.h4345
-rw-r--r--vhdlparser/VhdlParserConstants.h384
-rw-r--r--vhdlparser/VhdlParserTokenManager.cc681
-rw-r--r--vhdlparser/VhdlParserTokenManager.h79
-rw-r--r--vhdlparser/vhdlparser.jj20
145 files changed, 15653 insertions, 12771 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f93519..cd0fcaa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # needed for language.cpp on 64bit
add_definitions(-DLIBICONV_STATIC -D_CRT_SECURE_NO_WARNINGS)
endif()
+ if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+ endif()
endif()
if(POLICY CMP0063)
@@ -82,9 +85,11 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
if (CMAKE_GENERATOR MATCHES "Ninja")
set(LEX_FLAGS )
set(YACC_FLAGS )
+ set(JAVACC_FLAGS )
else ()
set(LEX_FLAGS $(LEX_FLAGS))
set(YACC_FLAGS $(YACC_FLAGS))
+ set(JAVACC_FLAGS $(JAVACC_FLAGS))
endif ()
find_program(DOT NAMES dot)
diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h
index a82114d..1772d8a 100644
--- a/addon/doxmlparser/src/basehandler.h
+++ b/addon/doxmlparser/src/basehandler.h
@@ -57,7 +57,7 @@ template<class T> class ElementMapper
void operator()(const QXmlAttributes &attrib)
{ if (m_parent) (m_parent->*m_handler)(attrib); }
private:
- T *m_parent;
+ T *m_parent = 0;
Handler m_handler;
};
@@ -71,7 +71,7 @@ template<class T> class ElementMapper
void operator()()
{ if (m_parent) (m_parent->*m_handler)(); }
private:
- T *m_parent;
+ T *m_parent = 0;
Handler m_handler;
};
@@ -277,9 +277,9 @@ template<class T> class BaseHandler : public QXmlDefaultHandler,
protected:
QString m_curString;
QString m_skipUntil;
- int m_skipCount;
- QXmlDefaultHandler *m_delegateHandler;
- IFallBackHandler *m_fallBackHandler;
+ int m_skipCount = 0;
+ QXmlDefaultHandler *m_delegateHandler = 0;
+ IFallBackHandler *m_fallBackHandler = 0;
};
//-----------------------------------------------------------------------------
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
index 077c8fb..69fb70c 100644
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ b/addon/doxmlparser/src/compoundhandler.cpp
@@ -86,7 +86,7 @@ class CompoundIdIterator : public ICompoundIterator,
{ delete this; }
private:
- const MainHandler *m_mainHandler;
+ const MainHandler *m_mainHandler = 0;
};
//----------------------------------------------------------------------------
diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h
index b05ba3d..6f191dc 100644
--- a/addon/doxmlparser/src/compoundhandler.h
+++ b/addon/doxmlparser/src/compoundhandler.h
@@ -54,10 +54,10 @@ class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler>
{ return m_isLocal; }
private:
- IBaseHandler *m_parent;
+ IBaseHandler *m_parent = 0;
StringImpl m_name; // element's content
StringImpl m_refId; // refid
- bool m_isLocal; // local
+ bool m_isLocal = false; // local
};
class IncludeIterator : public BaseIterator<IIncludeIterator,IInclude,IncludeHandler>
@@ -86,10 +86,10 @@ class RelatedCompound : public IRelatedCompound
virtual const IString *name() const { return &m_name; }
private:
- CompoundHandler *m_parent;
+ CompoundHandler *m_parent = 0;
QString m_id; // refid
- Protection m_protection; // prot
- Kind m_kind; // virt
+ Protection m_protection = Public; // prot
+ Kind m_kind = Normal; // virt
StringImpl m_name; // element's content
};
@@ -193,42 +193,42 @@ class CompoundHandler : public IClass,
// XML elements:
// -------------
StringImpl m_name; // compoundname
- TitleHandler* m_titleHandler; // title
+ TitleHandler* m_titleHandler = 0; // title
QList<RelatedCompound> m_subClasses; // basecompoundref
QList<RelatedCompound> m_superClasses; // derivedcompoundref
QList<IncludeHandler> m_includes; // includes
QList<IncludeHandler> m_includedBy; // includedBy
- GraphHandler* m_includeDependencyGraph; // incdepgraph
- GraphHandler* m_includedByDependencyGraph; // invincdepgraph
+ GraphHandler* m_includeDependencyGraph = 0;// incdepgraph
+ GraphHandler* m_includedByDependencyGraph = 0; // invincdepgraph
QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup
TemplateParamListHandler* m_templateParamList; // templateparamlist
QList<SectionHandler> m_sections; // sectiondef
- DocHandler* m_brief; // briefdescription
- DocHandler* m_detailed; // detaileddescription
- GraphHandler* m_inheritanceGraph; // inheritancegraph
- GraphHandler* m_collaborationGraph; // collaborationgraph
- ProgramListingHandler* m_programListing; // programlisting
+ DocHandler* m_brief = 0; // briefdescription
+ DocHandler* m_detailed = 0; // detaileddescription
+ GraphHandler* m_inheritanceGraph = 0; // inheritancegraph
+ GraphHandler* m_collaborationGraph = 0; // collaborationgraph
+ ProgramListingHandler* m_programListing = 0; // programlisting
// location
StringImpl m_defFile; // - file
- int m_defLine; // - line
+ int m_defLine = 0; // - line
StringImpl m_defBodyFile; // - bodyfile
- int m_defBodyStart; // - bodystart
- int m_defBodyEnd; // - bodyend
- ListOfAllMembersHandler* m_members; // listofallmember
+ int m_defBodyStart = 0; // - bodystart
+ int m_defBodyEnd = 0; // - bodyend
+ ListOfAllMembersHandler* m_members = 0; // listofallmember
// XML attributes:
// ---------------
StringImpl m_id; // id
- CompoundKind m_kind; // kind
+ CompoundKind m_kind = Invalid; // kind
StringImpl m_kindString; // kind as a string
StringImpl m_protection; // prot
// local variables
QString m_xmlDir; // directory where the info is found
- int m_refCount; // object reference counter
+ int m_refCount = 0; // object reference counter
QDict<MemberHandler> m_memberDict; // id->member lookup
QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup
- MainHandler* m_mainHandler; // parent object
+ MainHandler* m_mainHandler = 0; // parent object
};
void compoundhandler_init();
diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp
index b774f0f..140a48b 100644
--- a/addon/doxmlparser/src/linkedtexthandler.cpp
+++ b/addon/doxmlparser/src/linkedtexthandler.cpp
@@ -51,7 +51,7 @@ class LT_Ref : public LinkedTextImpl, public ILT_Ref
StringImpl m_refId;
StringImpl m_extId;
StringImpl m_text;
- TargetKind m_targetKind;
+ TargetKind m_targetKind = TargetKind::Member;
};
LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent,
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp
index c18f907..edd39e3 100644
--- a/addon/doxyapp/doxyapp.cpp
+++ b/addon/doxyapp/doxyapp.cpp
@@ -109,19 +109,19 @@ class XRefDummyCodeGenerator : public CodeOutputInterface
static void findXRefSymbols(FileDef *fd)
{
// get the interface to a parser that matches the file extension
- ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
+ CodeParserInterface &intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
// get the programming language from the file name
SrcLangExt lang = getLanguageFromFileName(fd->name());
// reset the parsers state
- pIntf->resetCodeParserState();
+ intf.resetCodeParserState();
// create a new backend object
XRefDummyCodeGenerator *xrefGen = new XRefDummyCodeGenerator(fd);
// parse the source code
- pIntf->parseCode(*xrefGen,
+ intf.parseCode(*xrefGen,
0,
fileToString(fd->absFilePath()),
lang,
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 415354d..59b560f 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -89,19 +89,19 @@ static bool is_c_code = true;
static void findXRefSymbols(FileDef *fd)
{
// get the interface to a parser that matches the file extension
- ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
+ CodeParserInterface &intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
// get the programming language from the file name
SrcLangExt lang = getLanguageFromFileName(fd->name());
// reset the parsers state
- pIntf->resetCodeParserState();
+ intf.resetCodeParserState();
// create a new backend object
Doxyparse *parse = new Doxyparse(fd);
// parse the source code
- pIntf->parseCode(*parse, 0, fileToString(fd->absFilePath()), lang, FALSE, 0, fd);
+ intf.parseCode(*parse, 0, fileToString(fd->absFilePath()), lang, FALSE, 0, fd);
// dismiss the object.
delete parse;
diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h
index 02f3f6d..810ab95 100644
--- a/addon/doxywizard/wizard.h
+++ b/addon/doxywizard/wizard.h
@@ -50,11 +50,11 @@ class TuneColorDialog : public QDialog
void updateImage(int hue,int sat,int val);
private:
- QImage *m_image;
- QLabel *m_imageLab;
- int m_hue;
- int m_sat;
- int m_gam;
+ QImage *m_image = 0;
+ QLabel *m_imageLab = 0;
+ int m_hue = 0;
+ int m_sat = 0;
+ int m_gam = 0;
};
class ColorPicker : public QWidget
@@ -89,11 +89,11 @@ private:
void setSat(int v);
void setGam(int v);
- QPixmap *m_pix;
- Mode m_mode;
- int m_gam;
- int m_hue;
- int m_sat;
+ QPixmap *m_pix = 0;
+ Mode m_mode = Hue;
+ int m_gam = 0;
+ int m_hue = 0;
+ int m_sat = 0;
};
@@ -118,16 +118,16 @@ class Step1 : public QWidget
void setRecursiveScan(int);
private:
- QLineEdit *m_projName;
- QLineEdit *m_projBrief;
- QLineEdit *m_projNumber;
- QLineEdit *m_sourceDir;
- QLineEdit *m_destDir;
- QLabel *m_projIconLab;
- QCheckBox *m_recursive;
- QPushButton *m_srcSelectDir;
- QPushButton *m_dstSelectDir;
- Wizard *m_wizard;
+ QLineEdit *m_projName = 0;
+ QLineEdit *m_projBrief = 0;
+ QLineEdit *m_projNumber = 0;
+ QLineEdit *m_sourceDir = 0;
+ QLineEdit *m_destDir = 0;
+ QLabel *m_projIconLab = 0;
+ QCheckBox *m_recursive = 0;
+ QPushButton *m_srcSelectDir = 0;
+ QPushButton *m_dstSelectDir = 0;
+ Wizard *m_wizard = 0;
const QHash<QString,Input *> &m_modelData;
};
@@ -144,12 +144,12 @@ class Step2 : public QWidget
void changeCrossRefState(int choice);
private:
- QGroupBox *m_extractMode;
- QGroupBox *m_optimizeLang;
- QButtonGroup *m_extractModeGroup;
- QButtonGroup *m_optimizeLangGroup;
- QCheckBox *m_crossRef;
- Wizard *m_wizard;
+ QGroupBox *m_extractMode = 0;
+ QGroupBox *m_optimizeLang = 0;
+ QButtonGroup *m_extractModeGroup = 0;
+ QButtonGroup *m_optimizeLangGroup = 0;
+ QCheckBox *m_crossRef = 0;
+ Wizard *m_wizard = 0;
const QHash<QString,Input *> &m_modelData;
};
@@ -173,18 +173,18 @@ class Step3 : public QWidget
void tuneColorDialog();
private:
- QGroupBox *m_texOptions;
- QButtonGroup *m_texOptionsGroup;
- QGroupBox *m_htmlOptions;
- QButtonGroup *m_htmlOptionsGroup;
- QCheckBox *m_htmlEnabled;
- QCheckBox *m_latexEnabled;
- QCheckBox *m_manEnabled;
- QCheckBox *m_rtfEnabled;
- QCheckBox *m_xmlEnabled;
- QCheckBox *m_searchEnabled;
- QPushButton *m_tuneColor;
- Wizard *m_wizard;
+ QGroupBox *m_texOptions = 0;
+ QButtonGroup *m_texOptionsGroup = 0;
+ QGroupBox *m_htmlOptions = 0;
+ QButtonGroup *m_htmlOptionsGroup = 0;
+ QCheckBox *m_htmlEnabled = 0;
+ QCheckBox *m_latexEnabled = 0;
+ QCheckBox *m_manEnabled = 0;
+ QCheckBox *m_rtfEnabled = 0;
+ QCheckBox *m_xmlEnabled = 0;
+ QCheckBox *m_searchEnabled = 0;
+ QPushButton *m_tuneColor = 0;
+ Wizard *m_wizard = 0;
const QHash<QString,Input *> &m_modelData;
};
@@ -207,17 +207,17 @@ class Step4 : public QWidget
void setCallerGraphEnabled(int state);
private:
- QGroupBox *m_diagramMode;
- QButtonGroup *m_diagramModeGroup;
- QGroupBox *m_dotGroup;
- QCheckBox *m_dotClass;
- QCheckBox *m_dotCollaboration;
- QCheckBox *m_dotInclude;
- QCheckBox *m_dotIncludedBy;
- QCheckBox *m_dotInheritance;
- QCheckBox *m_dotCall;
- QCheckBox *m_dotCaller;
- Wizard *m_wizard;
+ QGroupBox *m_diagramMode = 0;
+ QButtonGroup *m_diagramModeGroup = 0;
+ QGroupBox *m_dotGroup = 0;
+ QCheckBox *m_dotClass = 0;
+ QCheckBox *m_dotCollaboration = 0;
+ QCheckBox *m_dotInclude = 0;
+ QCheckBox *m_dotIncludedBy = 0;
+ QCheckBox *m_dotInheritance = 0;
+ QCheckBox *m_dotCall = 0;
+ QCheckBox *m_dotCaller = 0;
+ Wizard *m_wizard = 0;
const QHash<QString,Input *> &m_modelData;
};
@@ -241,14 +241,14 @@ class Wizard : public QSplitter
private:
const QHash<QString,Input *> &m_modelData;
- QTreeWidget *m_treeWidget;
- QStackedWidget *m_topicStack;
- Step1 *m_step1;
- Step2 *m_step2;
- Step3 *m_step3;
- Step4 *m_step4;
- QPushButton *m_next;
- QPushButton *m_prev;
+ QTreeWidget *m_treeWidget = 0;
+ QStackedWidget *m_topicStack = 0;
+ Step1 *m_step1 = 0;
+ Step2 *m_step2 = 0;
+ Step3 *m_step3 = 0;
+ Step4 *m_step4 = 0;
+ QPushButton *m_next = 0;
+ QPushButton *m_prev = 0;
};
#endif
diff --git a/doc/commands.doc b/doc/commands.doc
index 4e0a6f9..9bd3f66 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -2277,8 +2277,8 @@ Commands for displaying examples
The `option` `lineno` can be used to enable line numbers for the included code if desired.
The `option` `doc` can be used to treat the file as documentation rather than code.
- \note Some that when using the `{doc}` option,
- commands like \ref cmdcond "\\cond" and \ref cmdif "\\if" don't work with
+ \note When using the `{doc}` option,
+ some commands like \ref cmdcond "\\cond" and \ref cmdif "\\if" don't work with
this command due to the moment of parsing.
\note The included documentation should not have comment signs in it as they will appear
@@ -2409,8 +2409,8 @@ Commands for displaying examples
The `option` `lineno` can be used to enable line numbers for the included code if desired.
The `option` `doc` can be used to treat the file as documentation rather than code.
- \note Some that when using the `{doc}` option,
- commands like \ref cmdcond "\\cond" and \ref cmdif "\\if" don't work with
+ \note When using the `{doc}` option,
+ some commands like \ref cmdcond "\\cond" and \ref cmdif "\\if" don't work with
this command due to the moment of parsing.
\note The included documentation should not have comment signs in it as they will appear
@@ -2599,7 +2599,7 @@ Commands for visual enhancements
a Python file for instance, the syntax highlight will be done according
to the Python syntax.
- If it unclear from the context which language is meant (for instance the
+ If it is unclear from the context which language is meant (for instance the
comment is in a <code>.txt</code> or <code>.markdown</code> file) then you can also explicitly
indicate the language, by putting the file extension typically
that doxygen associated with the language in curly brackets after the
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index 9d14f6e..8e99669 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -513,6 +513,10 @@ Here is an example VHDL file with doxygen comments:
for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen.
\endlatexonly
+As of VHDL 2008 it is also possible to use `/&zwj;*` style comments.
+Doxygen will handle `/&zwj;* ... *&zwj;/`as plain comments and `/&zwj;*! ... *&zwj;/`
+style comments as special comments to be parsed by doxygen.
+
To get proper looking output you need to set
\ref cfg_optimize_output_vhdl "OPTIMIZE_OUTPUT_VHDL" to \c YES in the
configuration file. This will also affect a number of other settings. When they
diff --git a/doc/doxygen_manual.tex b/doc/doxygen_manual.tex
index 8ff3c66..e350013 100644
--- a/doc/doxygen_manual.tex
+++ b/doc/doxygen_manual.tex
@@ -66,6 +66,11 @@
\usepackage{doxygen}
\usepackage{manual}
%%
+%gave problems when in doxygen.sty
+\makeatletter
+\newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@}
+\makeatother
+%%
% unfortunately constructs like:
% \renewcommand{\doxysection}[1]{\doxysubsection{##1}}
% using values from book.cls (see also doxygen.sty) and redefining sections to correct level.
diff --git a/doc/extsearch.doc b/doc/extsearch.doc
index ead7ea8..e139408 100644
--- a/doc/extsearch.doc
+++ b/doc/extsearch.doc
@@ -77,7 +77,7 @@ Since we didn't create or install a doxysearch.db it is OK for the test to
fail for this reason. How to correct this is discussed in the next section.
Before continuing with the next section add the above
-URL (without the `?test` part) to the `SEARCHENGINE_URL` tag in
+URL (without the `?test` part) to the \ref cfg_searchengine_url "SEARCHENGINE_URL" tag in
doxygen's configuration file:
SEARCHENGINE_URL = http://yoursite.com/path/to/cgi/doxysearch.cgi
@@ -135,7 +135,8 @@ and then copy the resulting `doxysearch.db` to the directory where also
The `searchdata.xml` file doesn't contain any absolute paths or links,
so how can the search results from multiple projects be linked back to the right documentation set?
-This is where the `EXTERNAL_SEARCH_ID` and `EXTRA_SEARCH_MAPPINGS` options come into play.
+This is where the \ref cfg_external_search_id "EXTERNAL_SEARCH_ID" and
+\ref cfg_extra_search_mappings "EXTRA_SEARCH_MAPPINGS" options come into play.
To be able to identify the different projects, one needs to
set a unique ID using \ref cfg_external_search_id "EXTERNAL_SEARCH_ID"
@@ -168,8 +169,8 @@ and the search results will link to the right documentation set.
When you modify the source code, you should re-run doxygen to get up to date
documentation again. When using external searching you also need to update the
-search index by re-running `doxyindexer`. You could wrap the call to doxygen
-and doxyindexer together in a script to make this process easier.
+search index by re-running `doxyindexer`. You could wrap the call to `doxygen`
+and `doxyindexer` together in a script to make this process easier.
\section extsearch_api Programming interface
diff --git a/doc/markdown.doc b/doc/markdown.doc
index 5edbaf9..883e831 100644
--- a/doc/markdown.doc
+++ b/doc/markdown.doc
@@ -193,10 +193,12 @@ code spans appear inline in a paragraph. An example:
Use the `printf()` function.
-To show a literal backtick inside a code span use double backticks, i.e.
+To show a literal backtick or single quote inside a code span use double backticks, i.e.
To assign the output of command `ls` to `var` use ``var=`ls```.
+ To assign the text 'text' to `var` use ``var='text'``.
+
See section \ref mddox_code_spans for more info how doxygen handles
code spans slightly different than standard Markdown.
@@ -606,6 +608,9 @@ In other words; a single quote cancels the special treatment of a code span
wrapped in a pair of backtick characters. This extra restriction was
added for backward compatibility reasons.
+In case you want to have single quotes inside a code span, don't use
+one backtick but two backticks around the code span.
+
\subsection mddox_lists Lists Extensions
With Markdown two lists separated by an empty line are joined together into
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 27c1687..23460d0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -197,11 +197,9 @@ add_library(_doxygen STATIC
#
${GENERATED_SRC}/ce_parse.cpp
#
- plantuml.cpp
arguments.cpp
cite.cpp
clangparser.cpp
- fileparser.cpp
classdef.cpp
classlist.cpp
cmdmapper.cpp
@@ -212,13 +210,16 @@ add_library(_doxygen STATIC
defgen.cpp
define.cpp
definition.cpp
+ dia.cpp
diagram.cpp
dirdef.cpp
+ docbookgen.cpp
+ docbookvisitor.cpp
+ docgroup.cpp
docparser.cpp
docsets.cpp
dot.cpp
dotcallgraph.cpp
- dotlegendgraph.cpp
dotclassgraph.cpp
dotdirdeps.cpp
dotfilepatcher.cpp
@@ -226,6 +227,7 @@ add_library(_doxygen STATIC
dotgraph.cpp
dotgroupcollaboration.cpp
dotincldepgraph.cpp
+ dotlegendgraph.cpp
dotnode.cpp
dotrunner.cpp
doxygen.cpp
@@ -234,6 +236,7 @@ add_library(_doxygen STATIC
entry.cpp
filedef.cpp
filename.cpp
+ fileparser.cpp
formula.cpp
ftextstream.cpp
ftvhelp.cpp
@@ -241,7 +244,6 @@ add_library(_doxygen STATIC
htags.cpp
htmldocvisitor.cpp
htmlentity.cpp
- resourcemgr.cpp
htmlgen.cpp
htmlhelp.cpp
image.cpp
@@ -252,7 +254,6 @@ add_library(_doxygen STATIC
layout.cpp
mandocvisitor.cpp
mangen.cpp
- sqlite3gen.cpp
markdown.cpp
memberdef.cpp
membergroup.cpp
@@ -260,20 +261,23 @@ add_library(_doxygen STATIC
membername.cpp
message.cpp
msc.cpp
- dia.cpp
namespacedef.cpp
objcache.cpp
outputgen.cpp
outputlist.cpp
pagedef.cpp
perlmodgen.cpp
+ plantuml.cpp
qhp.cpp
qhpxmlwriter.cpp
reflist.cpp
+ resourcemgr.cpp
rtfdocvisitor.cpp
rtfgen.cpp
rtfstyle.cpp
searchindex.cpp
+ sqlite3gen.cpp
+ stlsupport.cpp
tagreader.cpp
template.cpp
textdocvisitor.cpp
@@ -283,9 +287,6 @@ add_library(_doxygen STATIC
vhdljjparser.cpp
xmldocvisitor.cpp
xmlgen.cpp
- docbookvisitor.cpp
- docbookgen.cpp
- docgroup.cpp
)
##foreach(lex_file ${LEX_FILES})
diff --git a/src/cite.cpp b/src/cite.cpp
index f15f595..797881f 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -235,14 +235,14 @@ void CiteDict::generatePage() const
// 5. run bib2xhtml perl script on the generated file which will insert the
// bibliography in citelist.doc
int exitCode;
- portable_sysTimerStop();
- if ((exitCode=portable_system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+
+ Portable::sysTimerStop();
+ if ((exitCode=Portable::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+
citeListFile+"\"")) != 0)
{
err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n",
exitCode);
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
diff --git a/src/classdef.cpp b/src/classdef.cpp
index cee8be9..61ae528 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -264,7 +264,7 @@ class ClassDefImpl : public DefinitionImpl, public ClassDef
// PIMPL idiom
class IMPL;
- IMPL *m_impl;
+ IMPL *m_impl = 0;
};
ClassDef *createClassDef(
@@ -522,7 +522,7 @@ class ClassDefAliasImpl : public DefinitionAliasImpl, public ClassDef
QPtrDict<void> *visitedClasses=0) const {}
private:
- mutable bool m_visited;
+ mutable bool m_visited = false;
};
@@ -560,27 +560,27 @@ class ClassDefImpl::IMPL
/*! Include information about the header file should be included
* in the documentation. 0 by default, set by setIncludeFile().
*/
- IncludeInfo *incInfo;
+ IncludeInfo *incInfo = 0;
/*! List of base class (or super-classes) from which this class derives
* directly.
*/
- BaseClassList *inherits;
+ BaseClassList *inherits = 0;
/*! List of sub-classes that directly derive from this class
*/
- BaseClassList *inheritedBy;
+ BaseClassList *inheritedBy = 0;
/*! Namespace this class is part of
* (this is the inner most namespace in case of nested namespaces)
*/
- NamespaceDef *nspace;
+ NamespaceDef *nspace = 0;
/*! File this class is defined in */
- FileDef *fileDef;
+ FileDef *fileDef = 0;
/*! List of all members (including inherited members) */
- MemberNameInfoSDict *allMemberNameInfoSDict;
+ MemberNameInfoSDict *allMemberNameInfoSDict = 0;
/*! Template arguments of this class */
ArgumentList tempArgs;
@@ -592,7 +592,7 @@ class ClassDefImpl::IMPL
FileList files;
/*! Examples that use this class */
- ExampleSDict *exampleSDict;
+ ExampleSDict *exampleSDict = 0;
/*! Holds the kind of "class" this is. */
ClassDef::CompoundType compType;
@@ -606,30 +606,30 @@ class ClassDefImpl::IMPL
/*! The inner classes contained in this class. Will be 0 if there are
* no inner classes.
*/
- ClassSDict *innerClasses;
+ ClassSDict *innerClasses = 0;
/* classes for the collaboration diagram */
- UsesClassDict *usesImplClassDict;
- UsesClassDict *usedByImplClassDict;
- UsesClassDict *usesIntfClassDict;
+ UsesClassDict *usesImplClassDict = 0;
+ UsesClassDict *usedByImplClassDict = 0;
+ UsesClassDict *usesIntfClassDict = 0;
- ConstraintClassDict *constraintClassDict;
+ ConstraintClassDict *constraintClassDict = 0;
/*! Template instances that exists of this class, the key in the
* dictionary is the template argument list.
*/
- mutable QDict<ClassDef> *templateInstances;
+ mutable QDict<ClassDef> *templateInstances = 0;
/*! Template instances that exists of this class, as defined by variables.
* We do NOT want to document these individually. The key in the
* dictionary is the template argument list.
*/
- mutable QDict<ClassDef> *variableInstances;
+ mutable QDict<ClassDef> *variableInstances = 0;
- QDict<int> *templBaseClassNames;
+ QDict<int> *templBaseClassNames = 0;
/*! The class this class is an instance of. */
- const ClassDef *templateMaster;
+ const ClassDef *templateMaster = 0;
/*! local class name which could be a typedef'ed alias name. */
QCString className;
@@ -637,54 +637,54 @@ class ClassDefImpl::IMPL
/*! If this class is a Objective-C category, then this points to the
* class which is extended.
*/
- ClassDef *categoryOf;
+ ClassDef *categoryOf = 0;
QList<MemberList> memberLists;
/* user defined member groups */
- MemberGroupSDict *memberGroupSDict;
+ MemberGroupSDict *memberGroupSDict = 0;
/*! Is this an abstract class? */
- bool isAbstract;
+ bool isAbstract = false;
/*! Is the class part of an unnamed namespace? */
- bool isStatic;
+ bool isStatic = false;
/*! TRUE if classes members are merged with those of the base classes. */
- bool membersMerged;
+ bool membersMerged = false;
/*! TRUE if the class is defined in a source file rather than a header file. */
- bool isLocal;
+ bool isLocal = false;
- bool isTemplArg;
+ bool isTemplArg = false;
/*! Does this class group its user-grouped members
* as a sub-section of the normal (public/protected/..)
* groups?
*/
- bool subGrouping;
+ bool subGrouping = false;
/** Reason of existence is a "use" relation */
- bool usedOnly;
+ bool usedOnly = false;
/** List of titles to use for the summary */
SDict<QCString> vhdlSummaryTitles;
/** Is this a simple (non-nested) C structure? */
- bool isSimple;
+ bool isSimple = false;
/** Does this class overloaded the -> operator? */
- MemberDef *arrowOperator;
+ MemberDef *arrowOperator = 0;
- ClassList *taggedInnerClasses;
- ClassDef *tagLessRef;
+ ClassList *taggedInnerClasses = 0;
+ ClassDef *tagLessRef = 0;
/** Does this class represent a Java style enum? */
- bool isJavaEnum;
+ bool isJavaEnum = false;
- bool isGeneric;
+ bool isGeneric = false;
- uint64 spec;
+ uint64 spec = 0;
QCString metaData;
};
@@ -1706,7 +1706,8 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
DotClassGraph inheritanceGraph(this,Inheritance);
if (inheritanceGraph.isTooBig())
{
- warn_uncond("Inheritance graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data());
+ warn_uncond("Inheritance graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
+ name().data(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!inheritanceGraph.isTrivial())
{
@@ -4273,7 +4274,7 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const char *t
for (mnii.toFirst();(mi=mnii.current());++mnii)
{
ArgumentList actualArguments;
- stringToArgumentList(templSpec,actualArguments);
+ stringToArgumentList(getLanguage(),templSpec,actualArguments);
MemberDef *md = mi->memberDef;
MemberDef *imd = md->createTemplateInstanceMember(
cd->templateArguments(),actualArguments);
diff --git a/src/classlist.cpp b/src/classlist.cpp
index 2b284b1..f06f744 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -167,7 +167,7 @@ void GenericsSDict::insert(const QCString &key,ClassDef *cd)
int i=key.find('<');
if (i==-1) return;
ArgumentList argList;
- stringToArgumentList(key.mid(i),argList);
+ stringToArgumentList(SrcLangExt_CSharp, key.mid(i),argList);
int c = argList.size();
if (c==0) return;
GenericsCollection *collection = m_dict.find(key.left(i));
@@ -200,7 +200,7 @@ ClassDef *GenericsSDict::find(const QCString &key)
if (collection)
{
ArgumentList argList;
- stringToArgumentList(key.mid(i),argList);
+ stringToArgumentList(SrcLangExt_CSharp,key.mid(i),argList);
int c = argList.size();
return collection->find(c);
}
diff --git a/src/code.h b/src/code.h
index da6b80e..42265ad 100644
--- a/src/code.h
+++ b/src/code.h
@@ -18,20 +18,37 @@
#ifndef CODE_H
#define CODE_H
-#include "types.h"
+#include "parserintf.h"
-class CodeOutputInterface;
class FileDef;
class MemberDef;
class QCString;
class Definition;
-void parseCCode(CodeOutputInterface &,const char *,const QCString &,
- SrcLangExt lang, bool isExample, const char *exName,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectXRefs);
-void resetCCodeParserState();
-void codeFreeScanner();
+class CCodeParser : public CodeParserInterface
+{
+ public:
+ CCodeParser();
+ virtual ~CCodeParser();
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt lang,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ );
+ void resetCodeParserState();
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
+};
#endif
diff --git a/src/code.l b/src/code.l
index c73911a..fb609e5 100644
--- a/src/code.l
+++ b/src/code.l
@@ -16,6 +16,8 @@
*/
%option never-interactive
%option prefix="codeYY"
+%option reentrant
+%option extra-type="struct codeYY_state *"
%{
@@ -28,6 +30,7 @@
#include <qregexp.h>
#include <qdir.h>
+#include "code.h"
#include "entry.h"
#include "doxygen.h"
#include "message.h"
@@ -58,80 +61,6 @@
* statics
*/
-static CodeOutputInterface * g_code;
-
-static ClassSDict *g_codeClassSDict = 0;
-static QCString g_curClassName;
-static QStrList g_curClassBases;
-
-static QCString g_parmType;
-static QCString g_parmName;
-
-static const char * g_inputString; //!< the code fragment as text
-static int g_inputPosition; //!< read offset during parsing
-static int g_inputLines; //!< number of line in the code fragment
-static int g_yyLineNr; //!< current line number
-static int g_yyColNr; //!< current column number
-static bool g_needsTermination;
-
-static bool g_exampleBlock;
-static QCString g_exampleName;
-static QCString g_exampleFile;
-
-static bool g_insideTemplate = FALSE;
-static QCString g_type;
-static QCString g_name;
-static QCString g_args;
-static QCString g_classScope;
-static QCString g_realScope;
-static QStack<int> g_scopeStack; //!< 1 if bracket starts a scope,
- // 2 for internal blocks
-static int g_anchorCount;
-static FileDef * g_sourceFileDef;
-static bool g_lineNumbers;
-static Definition * g_currentDefinition;
-static MemberDef * g_currentMemberDef;
-static bool g_includeCodeFragment;
-static const char * g_currentFontClass;
-static bool g_searchingForBody;
-static bool g_insideBody;
-static int g_bodyCurlyCount;
-static QCString g_saveName;
-static QCString g_saveType;
-static QCString g_delimiter;
-
-static int g_bracketCount = 0;
-static int g_curlyCount = 0;
-static int g_sharpCount = 0;
-static bool g_inFunctionTryBlock = FALSE;
-static bool g_inForEachExpression = FALSE;
-
-static int g_lastTemplCastContext;
-static int g_lastSpecialCContext;
-static int g_lastStringContext;
-static int g_lastSkipCppContext;
-static int g_lastVerbStringContext;
-static int g_lastObjCCallContext;
-static int g_memCallContext;
-static int g_lastCContext;
-static int g_skipInlineInitContext;
-
-static bool g_insideCpp;
-static bool g_insideObjC;
-static bool g_insideJava;
-static bool g_insideCS;
-static bool g_insidePHP;
-static bool g_insideProtocolList;
-static bool g_insideSlice;
-
-static bool g_lexInit = FALSE;
-
-static QStack<int> g_classScopeLengthStack;
-
-static int g_prefixed_with_this_keyword = FALSE;
-static const Definition *g_searchCtx;
-static bool g_collectXRefs;
-
// context for an Objective-C method call
struct ObjCCallCtx
{
@@ -147,31 +76,6 @@ struct ObjCCallCtx
int braceCount;
};
-// globals for objective-C method calls
-static ObjCCallCtx *g_currentCtx=0;
-static int g_currentCtxId=0;
-static int g_currentNameId=0;
-static int g_currentObjId=0;
-static int g_currentWordId=0;
-static int g_currentCommentId=0;
-static QStack<ObjCCallCtx> g_contextStack;
-static QIntDict<ObjCCallCtx> g_contextDict;
-static QIntDict<QCString> g_nameDict;
-static QIntDict<QCString> g_objectDict;
-static QIntDict<QCString> g_wordDict;
-static QIntDict<QCString> g_commentDict;
-static int g_braceCount=0;
-
-static void saveObjCContext();
-static void restoreObjCContext();
-
-static const char *stateToString(int state);
-
-static QCString g_forceTagReference;
-
-
-//-------------------------------------------------------------------
-
/*! Represents a stack of variable to class mappings as found in the
* code. Each scope is enclosed in pushScope() and popScope() calls.
* Variables are added by calling addVariables() and one can search
@@ -227,7 +131,7 @@ class VariableContext
m_scopes.clear();
}
- void addVariable(const QCString &type,const QCString &name);
+ void addVariable(yyscan_t yyscanner,const QCString &type,const QCString &name);
ClassDef *findVariable(const QCString &name);
int count() const { return m_scopes.count(); }
@@ -237,8 +141,2115 @@ class VariableContext
QList<Scope> m_scopes;
};
-void VariableContext::addVariable(const QCString &type,const QCString &name)
+//-------------------------------------------------------------------
+
+class CallContext
+{
+ public:
+ struct Ctx
+ {
+ Ctx(QCString _name, QCString _type) : name(_name), type(_type), d(0) {}
+ QCString name;
+ QCString type;
+ const Definition *d;
+ };
+
+ CallContext()
+ {
+ m_defList.append(new Ctx("",""));
+ m_defList.setAutoDelete(TRUE);
+ }
+ virtual ~CallContext() {}
+ void setScope(const Definition *d)
+ {
+ Ctx *ctx = m_defList.getLast();
+ if (ctx)
+ {
+ DBG_CTX((stderr,"** Set call context %s (%p)\n",d==0 ? "<null>" : d->name().data(),d));
+ ctx->d=d;
+ }
+ }
+ void pushScope(QCString _name, QCString _type)
+ {
+ m_defList.append(new Ctx(_name,_type));
+ DBG_CTX((stderr,"** Push call context %d\n",m_defList.count()));
+ }
+ void popScope(QCString &_name, QCString &_type)
+ {
+ if (m_defList.count()>1)
+ {
+ DBG_CTX((stderr,"** Pop call context %d\n",m_defList.count()));
+ Ctx *ctx = m_defList.getLast();
+ if (ctx)
+ {
+ _name = ctx->name;
+ _type = ctx->type;
+ }
+ m_defList.removeLast();
+ }
+ else
+ {
+ DBG_CTX((stderr,"** ILLEGAL: Pop call context\n"));
+ }
+ }
+ void clear()
+ {
+ DBG_CTX((stderr,"** Clear call context\n"));
+ m_defList.clear();
+ m_defList.append(new Ctx("",""));
+ }
+ const Definition *getScope() const
+ {
+ Ctx *ctx = m_defList.getLast();
+ if (ctx) return ctx->d; else return 0;
+ }
+
+ private:
+ QList<Ctx> m_defList;
+};
+
+
+struct codeYY_state
+{
+ CodeOutputInterface * code = 0;
+
+ ClassSDict *codeClassSDict = 0;
+ QCString curClassName;
+ QStrList curClassBases;
+
+ QCString parmType;
+ QCString parmName;
+
+ const char * inputString = 0; //!< the code fragment as text
+ int inputPosition = 0; //!< read offset during parsing
+ int inputLines = 0; //!< number of line in the code fragment
+ int yyLineNr = 0; //!< current line number
+ int yyColNr = 0; //!< current column number
+ bool needsTermination = FALSE;
+
+ bool exampleBlock = FALSE;
+ QCString exampleName;
+ QCString exampleFile;
+
+ bool insideTemplate = FALSE;
+ QCString type;
+ QCString name;
+ QCString args;
+ QCString classScope;
+ QCString realScope;
+ QStack<int> scopeStack; //!< 1 if bracket starts a scope,
+ // 2 for internal blocks
+ int anchorCount = 0;
+ FileDef * sourceFileDef = 0;
+ bool lineNumbers = FALSE;
+ Definition * currentDefinition = 0;
+ MemberDef * currentMemberDef = 0;
+ bool includeCodeFragment = FALSE;
+ const char * currentFontClass = 0;
+ bool searchingForBody = FALSE;
+ bool insideBody = FALSE;
+ int bodyCurlyCount = 0;
+ QCString saveName;
+ QCString saveType;
+ QCString delimiter;
+
+ int bracketCount = 0;
+ int curlyCount = 0;
+ int sharpCount = 0;
+ bool inFunctionTryBlock = FALSE;
+ bool inForEachExpression = FALSE;
+
+ int lastTemplCastContext = 0;
+ int lastSpecialCContext = 0;
+ int lastStringContext = 0;
+ int lastSkipCppContext = 0;
+ int lastVerbStringContext = 0;
+ int lastObjCCallContext = 0;
+ int memCallContext = 0;
+ int lastCContext = 0;
+ int skipInlineInitContext = 0;
+
+ SrcLangExt lang = SrcLangExt_Unknown;
+ bool insideObjC = FALSE;
+ bool insideProtocolList = FALSE;
+
+ bool lexInit = FALSE;
+
+ QStack<int> classScopeLengthStack;
+
+ int prefixed_with_this_keyword = FALSE;
+ const Definition *searchCtx = 0;
+ bool collectXRefs = FALSE;
+
+ ObjCCallCtx * currentCtx=0;
+ int currentCtxId=0;
+ int currentNameId=0;
+ int currentObjId=0;
+ int currentWordId=0;
+ int currentCommentId=0;
+ QStack<ObjCCallCtx> contextStack;
+ QIntDict<ObjCCallCtx> contextDict;
+ QIntDict<QCString> nameDict;
+ QIntDict<QCString> objectDict;
+ QIntDict<QCString> wordDict;
+ QIntDict<QCString> commentDict;
+ int braceCount=0;
+
+ QCString forceTagReference;
+ VariableContext theVarContext;
+ CallContext theCallContext;
+};
+
+static bool isCastKeyword(const QCString &s);
+
+//-------------------------------------------------------------------
+
+static void saveObjCContext(yyscan_t yyscanner);
+static void restoreObjCContext(yyscan_t yyscanner);
+static const char *stateToString(yyscan_t yyscanner,int state);
+static void addUsingDirective(yyscan_t yyscanner,const char *name);
+static void pushScope(yyscan_t yyscanner,const char *s);
+static void popScope(yyscan_t yyscanner);
+static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
+static void addToSearchIndex(yyscan_t yyscanner,const char *text);
+static void setClassScope(yyscan_t yyscanner,const QCString &name);
+static void startCodeLine(yyscan_t yyscanner);
+static void endCodeLine(yyscan_t yyscanner);
+static void nextCodeLine(yyscan_t yyscanner);
+static void startFontClass(yyscan_t yyscanner,const char *s);
+static void endFontClass(yyscan_t yyscanner);
+static void codifyLines(yyscan_t yyscanner,const char *text);
+static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
+ const Definition *d,
+ const char *text);
+static void addType(yyscan_t yyscanner);
+static void addParmType(yyscan_t yyscanner);
+static void addUsingDirective(yyscan_t yyscanner,const char *name);
+static void setParameterList(yyscan_t yyscanner,const MemberDef *md);
+static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d);
+static MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &name);
+static void updateCallContextForSmartPointer(yyscan_t yyscanner);
+static bool getLinkInScope(yyscan_t yyscanner,const QCString &c, // scope
+ const QCString &m, // member
+ const char *memberText, // exact text
+ CodeOutputInterface &ol,
+ const char *text,
+ bool varOnly=FALSE
+ );
+static bool getLink(yyscan_t yyscanner,const char *className,
+ const char *memberName,
+ CodeOutputInterface &ol,
+ const char *text=0,
+ bool varOnly=FALSE);
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName,
+ bool typeOnly=FALSE,bool varOnly=FALSE);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,MemberDef *xmd,const char *memName);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Definition *def,const char *memName);
+static void generateMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &varName,
+ const char *memName);
+static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName);
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName);
+static int countLines(yyscan_t yyscanner);
+static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx);
+static QCString escapeName(yyscan_t yyscanner,const char *s);
+static QCString escapeObject(yyscan_t yyscanner,const char *s);
+static QCString escapeWord(yyscan_t yyscanner,const char *s);
+static QCString escapeComment(yyscan_t yyscanner,const char *s);
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
+
+
+/* -----------------------------------------------------------------
+ */
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
+
+
+%}
+
+B [ \t]
+BN [ \t\n\r]
+ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
+SEP ("::"|"\\")
+SCOPENAME ({SEP}{BN}*)?({ID}{BN}*{SEP}{BN}*)*("~"{BN}*)?{ID}
+TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
+SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
+SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
+KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
+KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
+FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally")
+FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try")
+TYPEKW ("bool"|"byte"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
+TYPEKWSL ("LocalObject"|"Object"|"Value")
+CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
+CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
+ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
+ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
+LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
+BITOP "&"|"|"|"^"|"<<"|">>"|"~"
+OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
+RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
+RAWEND ")"[^ \t\(\)\\]{0,16}\"
+
+%option noyywrap
+
+%x SkipString
+%x SkipStringS
+%x SkipVerbString
+%x SkipCPP
+%x SkipComment
+%x SkipCxxComment
+%x RemoveSpecialCComment
+%x StripSpecialCComment
+%x Body
+%x FuncCall
+%x MemberCall
+%x MemberCall2
+%x SkipInits
+%x ClassName
+%x AlignAs
+%x AlignAsEnd
+%x PackageName
+%x ClassVar
+%x CppCliTypeModifierFollowup
+%x Bases
+%x SkipSharp
+%x ReadInclude
+%x TemplDecl
+%x TemplCast
+%x CallEnd
+%x ObjCMethod
+%x ObjCParams
+%x ObjCParamType
+%x ObjCCall
+%x ObjCMName
+%x ObjCSkipStr
+%x ObjCCallComment
+%x OldStyleArgs
+%x UsingName
+%x RawString
+%x InlineInit
+
+%%
+
+<*>\x0d
+<Body>^([ \t]*"#"[ \t]*("include"|"import")[ \t]*)("<"|"\"") {
+ startFontClass(yyscanner,"preprocessor");
+ yyextra->code->codify(yytext);
+ BEGIN( ReadInclude );
+ }
+<Body>("@interface"|"@implementation"|"@protocol")[ \t\n]+ {
+ yyextra->insideObjC=TRUE;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ if (!yyextra->insideTemplate)
+ BEGIN( ClassName );
+ }
+<Body>(("public"|"private"){B}+)?("ref"|"value"|"interface"|"enum"){B}+("class"|"struct") {
+ if (yyextra->insideTemplate) REJECT;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN( ClassName );
+ }
+<Body>"property"|"event"/{BN}* {
+ if (yyextra->insideTemplate) REJECT;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<Body>(KEYWORD_CPPCLI_DATATYPE|("partial"{B}+)?"class"|"struct"|"union"|"namespace"|"interface"){B}+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ if (!yyextra->insideTemplate)
+ BEGIN( ClassName );
+ }
+<Body>("package")[ \t\n]+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN( PackageName );
+ }
+<ClassVar>\n {
+ if (!yyextra->insideObjC) REJECT;
+ codifyLines(yyscanner,yytext);
+ BEGIN(Body);
+ }
+<Body,ClassVar,Bases>"-"|"+" {
+ if (!yyextra->insideObjC || yyextra->insideBody)
+ {
+ yyextra->code->codify(yytext);
+ }
+ else // Start of Objective-C method
+ {
+ //printf("Method!\n");
+ yyextra->code->codify(yytext);
+ BEGIN(ObjCMethod);
+ }
+ }
+<ObjCMethod>":" {
+ yyextra->code->codify(yytext);
+ BEGIN(ObjCParams);
+ }
+<ObjCParams>"(" {
+ yyextra->code->codify(yytext);
+ BEGIN(ObjCParamType);
+ }
+<ObjCParams,ObjCMethod>";"|"{" {
+ yyextra->code->codify(yytext);
+ if (*yytext=='{')
+ {
+ if (yyextra->searchingForBody)
+ {
+ yyextra->searchingForBody=FALSE;
+ yyextra->insideBody=TRUE;
+ }
+ if (yyextra->insideBody) yyextra->bodyCurlyCount++;
+ if (!yyextra->curClassName.isEmpty()) // valid class name
+ {
+ pushScope(yyscanner,yyextra->curClassName);
+ DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
+ yyextra->scopeStack.push(SCOPEBLOCK);
+ }
+ }
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ BEGIN(Body);
+ }
+<ObjCParams>{ID}{B}*":" {
+ yyextra->code->codify(yytext);
+ }
+<ObjCParamType>{TYPEKW} {
+ startFontClass(yyscanner,"keywordtype");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ yyextra->parmType=yytext;
+ }
+<ObjCParamType>{ID} {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ yyextra->parmType=yytext;
+ }
+<ObjCParamType>")" {
+ yyextra->code->codify(yytext);
+ BEGIN(ObjCParams);
+ }
+<ObjCParams>{ID} {
+ yyextra->code->codify(yytext);
+ yyextra->parmName=yytext;
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ }
+<ObjCMethod,ObjCParams,ObjCParamType>{ID} {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<ObjCMethod,ObjCParams,ObjCParamType>. {
+ yyextra->code->codify(yytext);
+ }
+<ObjCMethod,ObjCParams,ObjCParamType>\n {
+ codifyLines(yyscanner,yytext);
+ }
+<ReadInclude>[^\n\"\>]+/(">"|"\"") {
+ //FileInfo *f;
+ bool ambig;
+ bool found=FALSE;
+ //QCString absPath = yytext;
+ //if (yyextra->sourceFileDef && QDir::isRelativePath(absPath))
+ //{
+ // absPath = QDir::cleanDirPath(yyextra->sourceFileDef->getPath()+"/"+absPath);
+ //}
+
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,yytext,ambig);
+ //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
+ if (fd && fd->isLinkable())
+ {
+ if (ambig) // multiple input files match the name
+ {
+ //printf("===== yes %s is ambiguous\n",yytext);
+ QCString name = QDir::cleanDirPath(yytext).utf8();
+ if (!name.isEmpty() && yyextra->sourceFileDef)
+ {
+ FileName *fn = Doxygen::inputNameDict->find(name);
+ if (fn)
+ {
+ FileNameIterator fni(*fn);
+ // for each include name
+ for (fni.toFirst();!found && (fd=fni.current());++fni)
+ {
+ // see if this source file actually includes the file
+ found = yyextra->sourceFileDef->isIncluded(fd->absFilePath());
+ //printf(" include file %s found=%d\n",fd->absFilePath().data(),found);
+ }
+ }
+ }
+ }
+ else // not ambiguous
+ {
+ found = TRUE;
+ }
+ }
+ //printf(" include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found);
+ if (found)
+ {
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,fd,yytext);
+ }
+ else
+ {
+ yyextra->code->codify(yytext);
+ }
+ char c=yyinput(yyscanner);
+ QCString text;
+ text+=c;
+ yyextra->code->codify(text);
+ endFontClass(yyscanner);
+ BEGIN( Body );
+ }
+<Body,Bases>^[ \t]*"#" {
+ startFontClass(yyscanner,"preprocessor");
+ yyextra->lastSkipCppContext = YY_START;
+ yyextra->code->codify(yytext);
+ BEGIN( SkipCPP ) ;
+ }
+<SkipCPP>. {
+ yyextra->code->codify(yytext);
+ }
+<SkipCPP>[^\n\/\\]+ {
+ yyextra->code->codify(yytext);
+ }
+<SkipCPP>\\[\r]?\n {
+ codifyLines(yyscanner,yytext);
+ }
+<SkipCPP>"//" {
+ yyextra->code->codify(yytext);
+ }
+<Body,FuncCall>"{" {
+ yyextra->theVarContext.pushScope();
+
+ DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
+ yyextra->scopeStack.push(INNERBLOCK);
+
+ if (yyextra->searchingForBody)
+ {
+ yyextra->searchingForBody=FALSE;
+ yyextra->insideBody=TRUE;
+ }
+ yyextra->code->codify(yytext);
+ if (yyextra->insideBody)
+ {
+ yyextra->bodyCurlyCount++;
+ }
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ BEGIN( Body );
+ }
+<Body,FuncCall,MemberCall,MemberCall2>"}" {
+ yyextra->theVarContext.popScope();
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+
+ int *scope = yyextra->scopeStack.pop();
+ DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
+ if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
+ {
+ popScope(yyscanner);
+ }
+
+ yyextra->code->codify(yytext);
+
+ DBG_CTX((stderr,"yyextra->bodyCurlyCount=%d\n",yyextra->bodyCurlyCount));
+ if (--yyextra->bodyCurlyCount<=0)
+ {
+ yyextra->insideBody=FALSE;
+ yyextra->currentMemberDef=0;
+ if (yyextra->currentDefinition)
+ yyextra->currentDefinition=yyextra->currentDefinition->getOuterScope();
+ }
+ BEGIN(Body);
+ }
+<Body,ClassVar>"@end" {
+ //printf("End of objc scope fd=%s\n",yyextra->sourceFileDef->name().data());
+ if (yyextra->sourceFileDef)
+ {
+ FileDef *fd=yyextra->sourceFileDef;
+ yyextra->insideObjC = fd->name().lower().right(2)==".m" ||
+ fd->name().lower().right(3)==".mm";
+ //printf("insideObjC=%d\n",yyextra->insideObjC);
+ }
+ else
+ {
+ yyextra->insideObjC = FALSE;
+ }
+ if (yyextra->insideBody)
+ {
+ yyextra->theVarContext.popScope();
+
+ int *scope = yyextra->scopeStack.pop();
+ DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
+ if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
+ {
+ popScope(yyscanner);
+ }
+ yyextra->insideBody=FALSE;
+ }
+
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+
+ yyextra->currentMemberDef=0;
+ if (yyextra->currentDefinition)
+ yyextra->currentDefinition=yyextra->currentDefinition->getOuterScope();
+ BEGIN(Body);
+ }
+<ClassName,ClassVar>";" {
+ yyextra->code->codify(yytext);
+ yyextra->searchingForBody=FALSE;
+ BEGIN( Body );
+ }
+<ClassName,ClassVar>[*&^%]+ {
+ yyextra->type=yyextra->curClassName.copy();
+ yyextra->name.resize(0);
+ yyextra->code->codify(yytext);
+ BEGIN( Body ); // variable of type struct *
+ }
+<ClassName>"__declspec"{B}*"("{B}*{ID}{B}*")" {
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<ClassName>{ID}("."{ID})* |
+<ClassName>{ID}("::"{ID})* {
+ if (yyextra->lang==SrcLangExt_CSharp)
+ yyextra->curClassName=substitute(yytext,".","::");
+ else
+ yyextra->curClassName=yytext;
+ addType(yyscanner);
+ if (yyextra->curClassName=="alignas")
+ {
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ BEGIN( AlignAs );
+ }
+ else
+ {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ BEGIN( ClassVar );
+ }
+ }
+<AlignAs>"(" {
+ yyextra->bracketCount=1;
+ yyextra->code->codify(yytext);
+ BEGIN( AlignAsEnd );
+ }
+<AlignAs>\n { yyextra->yyLineNr++;
+ codifyLines(yyscanner,yytext);
+ }
+<AlignAs>. { yyextra->code->codify(yytext); }
+<AlignAsEnd>"(" { yyextra->code->codify(yytext);
+ yyextra->bracketCount++;
+ }
+<AlignAsEnd>")" {
+ yyextra->code->codify(yytext);
+ if (--yyextra->bracketCount<=0)
+ {
+ BEGIN(ClassName);
+ }
+ }
+<AlignAsEnd>\n { yyextra->yyLineNr++;
+ codifyLines(yyscanner,yytext);
+ }
+<AlignAsEnd>. { yyextra->code->codify(yytext); }
+<ClassName>{ID}("\\"{ID})* { // PHP namespace
+ yyextra->curClassName=substitute(yytext,"\\","::");
+ yyextra->scopeStack.push(CLASSBLOCK);
+ pushScope(yyscanner,yyextra->curClassName);
+ addType(yyscanner);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ BEGIN( ClassVar );
+ }
+<ClassName>{ID}{B}*"("{ID}")" { // Obj-C category
+ yyextra->curClassName=removeRedundantWhiteSpace(yytext);
+ yyextra->scopeStack.push(CLASSBLOCK);
+ pushScope(yyscanner,yyextra->curClassName);
+ addType(yyscanner);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ BEGIN( ClassVar );
+ }
+<PackageName>{ID}("."{ID})* {
+ yyextra->curClassName=substitute(yytext,".","::");
+ //printf("found package: %s\n",yyextra->curClassName.data());
+ addType(yyscanner);
+ codifyLines(yyscanner,yytext);
+ }
+<ClassVar>"=" {
+ unput(*yytext);
+ BEGIN( Body );
+ }
+<ClassVar>("extends"|"implements") { // Java, Slice
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->curClassBases.clear();
+ BEGIN( Bases );
+ }
+<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
+ DBG_CTX((stderr,"***** C++/CLI modifier %s on yyextra->curClassName=%s\n",yytext,yyextra->curClassName.data()));
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN( CppCliTypeModifierFollowup );
+ }
+<ClassVar>{ID} {
+ yyextra->type = yyextra->curClassName.copy();
+ yyextra->name = yytext;
+ if (yyextra->insideBody)
+ {
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->type,yyextra->name);
+ }
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*":"{B}* {
+ codifyLines(yyscanner,yytext);
+ yyextra->curClassBases.clear();
+ BEGIN( Bases );
+ }
+<PackageName>[ \t]*";" |
+<Bases>^{B}*/"@"{ID} | // Objective-C interface
+<Bases,ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*"{"{B}* {
+ yyextra->theVarContext.pushScope();
+ yyextra->code->codify(yytext);
+ if (YY_START==ClassVar && yyextra->curClassName.isEmpty())
+ {
+ yyextra->curClassName = yyextra->name.copy();
+ }
+ if (yyextra->searchingForBody)
+ {
+ yyextra->searchingForBody=FALSE;
+ yyextra->insideBody=TRUE;
+ }
+ if (yyextra->insideBody) yyextra->bodyCurlyCount++;
+ if (!yyextra->curClassName.isEmpty()) // valid class name
+ {
+ DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
+ yyextra->scopeStack.push(CLASSBLOCK);
+ pushScope(yyscanner,yyextra->curClassName);
+ DBG_CTX((stderr,"***** yyextra->curClassName=%s\n",yyextra->curClassName.data()));
+ if (getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,yyextra->curClassName)==0)
+ {
+ DBG_CTX((stderr,"Adding new class %s\n",yyextra->curClassName.data()));
+ ClassDef *ncd=createClassDef("<code>",1,1,
+ yyextra->curClassName,ClassDef::Class,0,0,FALSE);
+ yyextra->codeClassSDict->append(yyextra->curClassName,ncd);
+ // insert base classes.
+ char *s=yyextra->curClassBases.first();
+ while (s)
+ {
+ const ClassDef *bcd=yyextra->codeClassSDict->find(s);
+ if (bcd==0) bcd=getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,s);
+ if (bcd && bcd!=ncd)
+ {
+ ncd->insertBaseClass(const_cast<ClassDef*>(bcd),s,Public,Normal);
+ }
+ s=yyextra->curClassBases.next();
+ }
+ }
+ //printf("yyextra->codeClassList.count()=%d\n",yyextra->codeClassList.count());
+ }
+ else // not a class name -> assume inner block
+ {
+ DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
+ yyextra->scopeStack.push(INNERBLOCK);
+ }
+ yyextra->curClassName.resize(0);
+ yyextra->curClassBases.clear();
+ BEGIN( Body );
+ }
+<Bases>"virtual"|"public"|"protected"|"private"|"@public"|"@private"|"@protected" {
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<Bases>{SEP}?({ID}{SEP})*{ID} {
+ DBG_CTX((stderr,"%s:addBase(%s)\n",yyextra->curClassName.data(),yytext));
+ yyextra->curClassBases.inSort(yytext);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<Bases>"<" {
+ yyextra->code->codify(yytext);
+ if (!yyextra->insideObjC)
+ {
+ yyextra->sharpCount=1;
+ BEGIN ( SkipSharp );
+ }
+ else
+ {
+ yyextra->insideProtocolList=TRUE;
+ }
+ }
+<Bases>">" {
+ yyextra->code->codify(yytext);
+ yyextra->insideProtocolList=FALSE;
+ }
+<SkipSharp>"<" {
+ yyextra->code->codify(yytext);
+ ++yyextra->sharpCount;
+ }
+<SkipSharp>">" {
+ yyextra->code->codify(yytext);
+ if (--yyextra->sharpCount<=0)
+ BEGIN ( Bases );
+ }
+<SkipSharp>"\"" {
+ yyextra->code->codify(yytext);
+ yyextra->lastStringContext=YY_START;
+ BEGIN(SkipString);
+ }
+<SkipSharp>"\'" {
+ yyextra->code->codify(yytext);
+ yyextra->lastStringContext=YY_START;
+ BEGIN(SkipStringS);
+ }
+<Bases>"(" {
+ yyextra->code->codify(yytext);
+ yyextra->sharpCount=1;
+ BEGIN ( SkipSharp );
+ }
+<SkipSharp>"(" {
+ yyextra->code->codify(yytext);
+ ++yyextra->sharpCount;
+ }
+<SkipSharp>")" {
+ yyextra->code->codify(yytext);
+ if (--yyextra->sharpCount<=0)
+ BEGIN ( Bases );
+ }
+
+
+<Bases>"," {
+ yyextra->code->codify(yytext);
+ }
+
+
+<Body>{SCOPEPREFIX}?"operator"{B}*"()"{B}*/"(" {
+ addType(yyscanner);
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ yyextra->bracketCount=0;
+ yyextra->args.resize(0);
+ yyextra->name+=yytext;
+ BEGIN( FuncCall );
+ }
+<Body>{SCOPEPREFIX}?"operator"/"(" {
+ addType(yyscanner);
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ yyextra->bracketCount=0;
+ yyextra->args.resize(0);
+ yyextra->name+=yytext;
+ BEGIN( FuncCall );
+ }
+<Body>{SCOPEPREFIX}?"operator"[^a-z_A-Z0-9\(\n]+/"(" {
+ addType(yyscanner);
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ yyextra->bracketCount=0;
+ yyextra->args.resize(0);
+ yyextra->name+=yytext;
+ BEGIN( FuncCall );
+ }
+<Body,TemplDecl>("template"|"generic")/([^a-zA-Z0-9]) {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->insideTemplate=TRUE;
+ yyextra->sharpCount=0;
+ }
+<Body>"using"{BN}+"namespace"{BN}+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN(UsingName);
+ }
+<UsingName>{ID}("::"{ID})* { addUsingDirective(yyscanner,yytext);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
+ yyextra->scopeStack.push(CLASSBLOCK);
+ pushScope(yyscanner,yytext);
+ BEGIN(Body);
+ }
+<UsingName>\n { codifyLines(yyscanner,yytext); BEGIN(Body); }
+<UsingName>. { codifyLines(yyscanner,yytext); BEGIN(Body); }
+<Body,FuncCall>"$"?"this"("->"|".") { yyextra->code->codify(yytext); // this-> for C++, this. for C#
+ yyextra->prefixed_with_this_keyword = TRUE;
+ }
+<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
+ if (yyextra->lang==SrcLangExt_Java && qstrcmp("internal",yytext) ==0) REJECT;
+ if (skipLanguageSpecificKeyword(yyscanner,yytext)) REJECT;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ if (QCString(yytext)=="typedef")
+ {
+ addType(yyscanner);
+ yyextra->name+=yytext;
+ }
+ endFontClass(yyscanner);
+ }
+<Body>{KEYWORD}/{B}* {
+ if (skipLanguageSpecificKeyword(yyscanner,yytext)) REJECT;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<Body>{KEYWORD}/{BN}*"(" {
+ if (skipLanguageSpecificKeyword(yyscanner,yytext)) REJECT;
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ }
+<FuncCall>"in"/{BN}* {
+ if (!yyextra->inForEachExpression) REJECT;
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ // insert the variable in the parent scope, see bug 546158
+ yyextra->theVarContext.popScope();
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ yyextra->theVarContext.pushScope();
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ }
+<Body>{FLOWKW}/{BN}*"(" {
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ yyextra->inForEachExpression = (qstrcmp(yytext,"for each")==0 || qstrcmp(yytext, "foreach")==0);
+ BEGIN(FuncCall);
+ }
+<Body>{FLOWCONDITION}/{BN}*"(" {
+ if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction())
+ {
+ yyextra->currentMemberDef->incrementFlowKeyWordCount();
+ }
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ yyextra->inForEachExpression = (strcmp(yytext,"for each")==0 || strcmp(yytext, "foreach")==0);
+ BEGIN(FuncCall);
+ }
+<Body>{FLOWKW}/([^a-z_A-Z0-9]) {
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ if (yyextra->inFunctionTryBlock && (qstrcmp(yytext,"catch")==0 || qstrcmp(yytext,"finally")==0))
+ {
+ yyextra->inFunctionTryBlock=FALSE;
+ }
+ }
+<Body>{FLOWCONDITION}/([^a-z_A-Z0-9]) {
+ if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction())
+ {
+ yyextra->currentMemberDef->incrementFlowKeyWordCount();
+ }
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ if (yyextra->inFunctionTryBlock && (strcmp(yytext,"catch")==0 || strcmp(yytext,"finally")==0))
+ {
+ yyextra->inFunctionTryBlock=FALSE;
+ }
+ }
+<Body>{FLOWKW}/{B}* {
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<Body>{FLOWCONDITION}/{B}* {
+ if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction())
+ {
+ yyextra->currentMemberDef->incrementFlowKeyWordCount();
+ }
+ startFontClass(yyscanner,"keywordflow");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<Body>"*"{B}*")" { // end of cast?
+ yyextra->code->codify(yytext);
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->bracketCount--;
+ yyextra->parmType = yyextra->name;
+ BEGIN(FuncCall);
+ }
+<Body>[\\|\)\+\-\/\%\~\!] {
+ yyextra->code->codify(yytext);
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ if (*yytext==')')
+ {
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->bracketCount--;
+ BEGIN(FuncCall);
+ }
+ }
+<Body,TemplDecl,ObjCMethod>{TYPEKW}/{B}* {
+ startFontClass(yyscanner,"keywordtype");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ addType(yyscanner);
+ yyextra->name+=yytext;
+ }
+<Body,TemplDecl,ObjCMethod>{TYPEKWSL}/{B}* {
+ if (yyextra->lang!=SrcLangExt_Slice)
+ {
+ REJECT;
+ }
+ else
+ {
+ startFontClass(yyscanner,"keywordtype");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ addType(yyscanner);
+ yyextra->name+=yytext;
+ }
+ }
+<Body>"generic"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* {
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ yyextra->sharpCount=0;
+ BEGIN(TemplDecl);
+ }
+<Body>"template"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* { // template<...>
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ yyextra->sharpCount=0;
+ BEGIN(TemplDecl);
+ }
+<TemplDecl>"class"|"typename" {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<TemplDecl>"<" {
+ yyextra->code->codify(yytext);
+ yyextra->sharpCount++;
+ }
+<TemplDecl>">" {
+ yyextra->code->codify(yytext);
+ yyextra->sharpCount--;
+ if (yyextra->sharpCount<=0)
+ {
+ BEGIN(Body);
+ }
+ }
+<TemplCast>">" {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastTemplCastContext );
+ }
+<TemplCast>{ID}("::"{ID})* {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<TemplCast>("const"|"volatile"){B}* {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<TemplCast>[*^]* {
+ codifyLines(yyscanner,yytext);
+ }
+<Body,MemberCall2,FuncCall>{CASTKW}{B}*"<" { // static_cast<T>(
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ yyextra->lastTemplCastContext = YY_START;
+ BEGIN(TemplCast);
+ }
+<Body>"$this->"{SCOPENAME}/{BN}*[;,)\]] { // PHP member variable
+ addType(yyscanner);
+ generatePHPVariableLink(yyscanner,*yyextra->code,yytext);
+ yyextra->name+=yytext+7;
+ }
+<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>\(]*">"("::"{ID})*/{B}* { // A<T> *pt;
+ if (isCastKeyword(yytext) && YY_START==Body)
+ {
+ REJECT;
+ }
+ addType(yyscanner);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ yyextra->name+=yytext;
+ }
+<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
+ addType(yyscanner);
+ // changed this to generateFunctionLink, see bug 624514
+ //generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,FALSE,TRUE);
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ yyextra->name+=yytext;
+ }
+<Body>{SCOPENAME}/{B}* { // p->func()
+ addType(yyscanner);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ yyextra->name+=yytext;
+ }
+<Body>"("{B}*("*"{B}*)+{SCOPENAME}*{B}*")"/{B}* { // (*p)->func() but not "if (p) ..."
+ yyextra->code->codify(yytext);
+ int s=0;while (s<(int)yyleng && !isId(yytext[s])) s++;
+ int e=(int)yyleng-1;while (e>=0 && !isId(yytext[e])) e--;
+ QCString varname = ((QCString)yytext).mid(s,e-s+1);
+ addType(yyscanner);
+ yyextra->name=varname;
+ }
+<Body>{SCOPETNAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"/{BN}*"(" |
+<Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a() or A\B\foo()
+ if (isCastKeyword(yytext))
+ {
+ REJECT;
+ }
+ addType(yyscanner);
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ yyextra->bracketCount=0;
+ yyextra->args.resize(0);
+ yyextra->name+=yytext;
+ BEGIN( FuncCall );
+ }
+<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>{RAWBEGIN} {
+ QCString text=yytext;
+ int i=text.find('R');
+ yyextra->code->codify(text.left(i+1));
+ startFontClass(yyscanner,"stringliteral");
+ yyextra->code->codify(yytext+i+1);
+ yyextra->lastStringContext=YY_START;
+ yyextra->inForEachExpression = FALSE;
+ yyextra->delimiter = yytext+i+2;
+ yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
+ BEGIN( RawString );
+ }
+<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>\" {
+ startFontClass(yyscanner,"stringliteral");
+ yyextra->code->codify(yytext);
+ yyextra->lastStringContext=YY_START;
+ yyextra->inForEachExpression = FALSE;
+ BEGIN( SkipString );
+ }
+<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>\' {
+ startFontClass(yyscanner,"stringliteral");
+ yyextra->code->codify(yytext);
+ yyextra->lastStringContext=YY_START;
+ yyextra->inForEachExpression = FALSE;
+ BEGIN( SkipStringS );
+ }
+<SkipString>[^\"\\\r\n]* {
+ yyextra->code->codify(yytext);
+ }
+<SkipStringS>[^\'\\\r\n]* {
+ yyextra->code->codify(yytext);
+ }
+<SkipString,SkipStringS>"//"|"/*" {
+ yyextra->code->codify(yytext);
+ }
+<SkipString>@?\" {
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastStringContext );
+ }
+<SkipStringS>\' {
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastStringContext );
+ }
+<SkipString,SkipStringS>\\. {
+ yyextra->code->codify(yytext);
+ }
+<RawString>{RAWEND} {
+ yyextra->code->codify(yytext);
+ QCString delimiter = yytext+1;
+ delimiter=delimiter.left(delimiter.length()-1);
+ if (delimiter==yyextra->delimiter)
+ {
+ BEGIN( yyextra->lastStringContext );
+ }
+ }
+<RawString>[^)\n]+ { yyextra->code->codify(yytext); }
+<RawString>. { yyextra->code->codify(yytext); }
+<RawString>\n { codifyLines(yyscanner,yytext); }
+<SkipVerbString>[^"\n]+ {
+ yyextra->code->codify(yytext);
+ }
+<SkipVerbString>\"\" { // escaped quote
+ yyextra->code->codify(yytext);
+ }
+<SkipVerbString>\" { // end of string
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastVerbStringContext );
+ }
+<SkipVerbString>. {
+ yyextra->code->codify(yytext);
+ }
+<SkipVerbString>\n {
+ codifyLines(yyscanner,yytext);
+ }
+<Body>":" {
+ yyextra->code->codify(yytext);
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ }
+<Body>"<" {
+ if (yyextra->insideTemplate)
+ {
+ yyextra->sharpCount++;
+ }
+ yyextra->code->codify(yytext);
+ }
+<Body>">" {
+ if (yyextra->insideTemplate)
+ {
+ if (--yyextra->sharpCount<=0)
+ {
+ yyextra->insideTemplate=FALSE;
+ }
+ }
+ yyextra->code->codify(yytext);
+ }
+<Body,MemberCall,MemberCall2,FuncCall>"'"((\\0[Xx0-9]+)|(\\.)|(.))"'" {
+ startFontClass(yyscanner,"charliteral");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<Body>"."|"->" {
+ if (yytext[0]=='-') // -> could be overloaded
+ {
+ updateCallContextForSmartPointer(yyscanner);
+ }
+ yyextra->code->codify(yytext);
+ yyextra->memCallContext = YY_START;
+ BEGIN( MemberCall );
+ }
+<MemberCall>{SCOPETNAME}/{BN}*"(" {
+ if (yyextra->theCallContext.getScope())
+ {
+ if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getScope(),yytext))
+ {
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yytext);
+ }
+ yyextra->name.resize(0);
+ }
+ else
+ {
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yytext);
+ yyextra->name.resize(0);
+ }
+ yyextra->type.resize(0);
+ if (yyextra->memCallContext==Body)
+ {
+ BEGIN(FuncCall);
+ }
+ else
+ {
+ BEGIN(yyextra->memCallContext);
+ }
+ }
+<MemberCall>{SCOPENAME}/{B}* {
+ if (yyextra->theCallContext.getScope())
+ {
+ DBG_CTX((stderr,"yyextra->theCallContext.getClass()=%p\n",yyextra->theCallContext.getScope()));
+ if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getScope(),yytext))
+ {
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yytext);
+ }
+ yyextra->name.resize(0);
+ }
+ else
+ {
+ DBG_CTX((stderr,"no class context!\n"));
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yytext);
+ yyextra->name.resize(0);
+ }
+ yyextra->type.resize(0);
+ BEGIN(yyextra->memCallContext);
+ }
+<Body>[,=;\[] {
+ if (yyextra->insideObjC && *yytext=='[')
+ {
+ //printf("Found start of ObjC call!\n");
+ // start of a method call
+ yyextra->contextDict.setAutoDelete(TRUE);
+ yyextra->nameDict.setAutoDelete(TRUE);
+ yyextra->objectDict.setAutoDelete(TRUE);
+ yyextra->wordDict.setAutoDelete(TRUE);
+ yyextra->commentDict.setAutoDelete(TRUE);
+ yyextra->contextDict.clear();
+ yyextra->nameDict.clear();
+ yyextra->objectDict.clear();
+ yyextra->wordDict.clear();
+ yyextra->commentDict.clear();
+ yyextra->currentCtxId = 0;
+ yyextra->currentNameId = 0;
+ yyextra->currentObjId = 0;
+ yyextra->currentCtx = 0;
+ yyextra->braceCount = 0;
+ unput('[');
+ BEGIN(ObjCCall);
+ }
+ else
+ {
+ yyextra->code->codify(yytext);
+ yyextra->saveName = yyextra->name.copy();
+ yyextra->saveType = yyextra->type.copy();
+ if (*yytext!='[' && !yyextra->type.isEmpty())
+ {
+ //printf("yyextra->scopeStack.bottom()=%p\n",yyextra->scopeStack.bottom());
+ //if (yyextra->scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
+ {
+ //printf("AddVariable: '%s' '%s' context=%d\n",
+ // yyextra->type.data(),yyextra->name.data(),yyextra->theVarContext.count());
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->type,yyextra->name);
+ }
+ yyextra->name.resize(0);
+ }
+ if (*yytext==';' || *yytext=='=')
+ {
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ }
+ else if (*yytext=='[')
+ {
+ yyextra->theCallContext.pushScope(yyextra->name, yyextra->type);
+ }
+ yyextra->args.resize(0);
+ yyextra->parmType.resize(0);
+ yyextra->parmName.resize(0);
+ }
+ }
+ /*
+<ObjCMemberCall>{ID} {
+ if (qstrcmp(yytext,"self")==0 || qstrcmp(yytext,"super")==0)
+ {
+ // TODO: get proper base class for "super"
+ yyextra->theCallContext.setClass(getClass(yyextra->curClassName));
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+ else
+ {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+ yyextra->name.resize(0);
+ BEGIN(ObjCMemberCall2);
+ }
+<ObjCMemberCall>"[" {
+ yyextra->code->codify(yytext);
+ yyextra->theCallContext.pushScope(yyscanner,yyextra->name, yyextra->type);
+ }
+<ObjCMemberCall2>{ID}":"? {
+ yyextra->name+=yytext;
+ if (yyextra->theCallContext.getClass())
+ {
+ //printf("Calling method %s\n",yyextra->name.data());
+ if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getClass(),yyextra->name))
+ {
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yyextra->name);
+ }
+ }
+ else
+ {
+ yyextra->code->codify(yytext);
+ addToSearchIndex(yyscanner,yyextra->name);
+ }
+ yyextra->name.resize(0);
+ BEGIN(ObjCMemberCall3);
+ }
+<ObjCMemberCall2,ObjCMemberCall3>"]" {
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->code->codify(yytext);
+ BEGIN(Body);
+ }
+ */
+<ObjCCall,ObjCMName>"["|"{" {
+ saveObjCContext(yyscanner);
+ yyextra->currentCtx->format+=*yytext;
+ BEGIN(ObjCCall);
+ //printf("open\n");
+ }
+<ObjCCall,ObjCMName>"]"|"}" {
+ yyextra->currentCtx->format+=*yytext;
+ restoreObjCContext(yyscanner);
+ BEGIN(ObjCMName);
+ if (yyextra->currentCtx==0)
+ {
+ // end of call
+ writeObjCMethodCall(yyscanner,yyextra->contextDict.find(0));
+ BEGIN(Body);
+ }
+ //printf("close\n");
+ }
+<ObjCCall,ObjCMName>"//".* {
+ yyextra->currentCtx->format+=escapeComment(yyscanner,yytext);
+ }
+<ObjCCall,ObjCMName>"/*" {
+ yyextra->lastObjCCallContext = YY_START;
+ yyextra->currentCtx->comment=yytext;
+ BEGIN(ObjCCallComment);
+ }
+<ObjCCallComment>"*/" {
+ yyextra->currentCtx->comment+=yytext;
+ yyextra->currentCtx->format+=escapeComment(yyscanner,yyextra->currentCtx->comment);
+ BEGIN(yyextra->lastObjCCallContext);
+ }
+<ObjCCallComment>[^*\n]+ { yyextra->currentCtx->comment+=yytext; }
+<ObjCCallComment>"//"|"/*" { yyextra->currentCtx->comment+=yytext; }
+<ObjCCallComment>\n { yyextra->currentCtx->comment+=*yytext; }
+<ObjCCallComment>. { yyextra->currentCtx->comment+=*yytext; }
+<ObjCCall>{ID} {
+ yyextra->currentCtx->format+=escapeObject(yyscanner,yytext);
+ if (yyextra->braceCount==0)
+ {
+ yyextra->currentCtx->objectTypeOrName=yytext;
+ //printf("new type=%s\n",yyextra->currentCtx->objectTypeOrName.data());
+ BEGIN(ObjCMName);
+ }
+ }
+<ObjCMName>{ID}/{BN}*"]" {
+ if (yyextra->braceCount==0 &&
+ yyextra->currentCtx->methodName.isEmpty())
+ {
+ yyextra->currentCtx->methodName=yytext;
+ yyextra->currentCtx->format+=escapeName(yyscanner,yytext);
+ }
+ else
+ {
+ yyextra->currentCtx->format+=escapeWord(yyscanner,yytext);
+ }
+ }
+<ObjCMName>{ID}/{BN}*":" {
+ if (yyextra->braceCount==0)
+ {
+ yyextra->currentCtx->methodName+=yytext;
+ yyextra->currentCtx->methodName+=":";
+ }
+ yyextra->currentCtx->format+=escapeName(yyscanner,yytext);
+ }
+<ObjCSkipStr>[^\n\"$\\]* { yyextra->currentCtx->format+=yytext; }
+<ObjCSkipStr>\\. { yyextra->currentCtx->format+=yytext; }
+<ObjCSkipStr>"\"" { yyextra->currentCtx->format+=yytext;
+ BEGIN(yyextra->lastStringContext);
+ }
+<ObjCCall,ObjCMName>{CHARLIT} { yyextra->currentCtx->format+=yytext; }
+<ObjCCall,ObjCMName>"@"?"\"" { yyextra->currentCtx->format+=yytext;
+ yyextra->lastStringContext=YY_START;
+ BEGIN(ObjCSkipStr);
+ }
+<ObjCCall,ObjCMName,ObjCSkipStr>"$" { yyextra->currentCtx->format+="$$"; }
+<ObjCCall,ObjCMName>"(" { yyextra->currentCtx->format+=*yytext; yyextra->braceCount++; }
+<ObjCCall,ObjCMName>")" { yyextra->currentCtx->format+=*yytext; yyextra->braceCount--; }
+<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#)
+ yyextra->currentCtx->format+=yytext;
+ }
+<ObjCCall,ObjCMName,ObjCSkipStr>{ID} { yyextra->currentCtx->format+=escapeWord(yyscanner,yytext); }
+<ObjCCall,ObjCMName,ObjCSkipStr>. { yyextra->currentCtx->format+=*yytext; }
+<ObjCCall,ObjCMName,ObjCSkipStr>\n { yyextra->currentCtx->format+=*yytext; }
+
+<Body>"]" {
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->code->codify(yytext);
+ // TODO: nested arrays like: a[b[0]->func()]->func()
+ yyextra->name = yyextra->saveName.copy();
+ yyextra->type = yyextra->saveType.copy();
+ }
+<Body>[0-9]+ {
+ yyextra->code->codify(yytext);
+ }
+<Body>[0-9]+[xX][0-9A-Fa-f]+ {
+ yyextra->code->codify(yytext);
+ }
+<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
+ //addParmType(yyscanner);
+ //yyextra->parmName=yytext;
+ if (skipLanguageSpecificKeyword(yyscanner,yytext)) REJECT;
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKW}/([^a-z_A-Z0-9]) {
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ startFontClass(yyscanner,"keywordtype");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKWSL}/([^a-z_A-Z0-9]) {
+ if (yyextra->lang!=SrcLangExt_Slice)
+ {
+ REJECT;
+ }
+ else
+ {
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ startFontClass(yyscanner,"keywordtype");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+ }
+<MemberCall2,FuncCall>{FLOWKW}/([^a-z_A-Z0-9]) {
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ startFontClass(yyscanner,"keywordflow");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<MemberCall2,FuncCall>{FLOWCONDITION}/([^a-z_A-Z0-9]) {
+ if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction())
+ {
+ yyextra->currentMemberDef->incrementFlowKeyWordCount();
+ }
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ startFontClass(yyscanner,"keywordflow");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+<MemberCall2,FuncCall>{ID}(({B}*"<"[^\n\[\](){}<>]*">")?({B}*"::"{B}*{ID})?)* {
+ if (isCastKeyword(yytext))
+ {
+ REJECT;
+ }
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,!yyextra->insideBody);
+ }
+<FuncCall>";" { // probably a cast, not a function call
+ yyextra->code->codify(yytext);
+ yyextra->inForEachExpression = FALSE;
+ BEGIN( Body );
+ }
+<MemberCall2,FuncCall>, {
+ yyextra->code->codify(yytext);
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ }
+<MemberCall2,FuncCall>"{" {
+ if (yyextra->bracketCount>0)
+ {
+ yyextra->code->codify(yytext);
+ yyextra->skipInlineInitContext=YY_START;
+ yyextra->curlyCount=0;
+ BEGIN(InlineInit);
+ }
+ else
+ {
+ REJECT;
+ }
+ }
+<InlineInit>"{" { yyextra->curlyCount++;
+ yyextra->code->codify(yytext);
+ }
+<InlineInit>"}" {
+ yyextra->code->codify(yytext);
+ if (--yyextra->curlyCount<=0)
+ {
+ BEGIN(yyextra->skipInlineInitContext);
+ }
+ }
+<InlineInit>\n {
+ codifyLines(yyscanner,yytext);
+ }
+<InlineInit>. {
+ yyextra->code->codify(yytext);
+ }
+<MemberCall2,FuncCall>"(" {
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ yyextra->code->codify(yytext);
+ yyextra->bracketCount++;
+ yyextra->theCallContext.pushScope(yyextra->name, yyextra->type);
+ if (YY_START==FuncCall && !yyextra->insideBody)
+ {
+ yyextra->theVarContext.pushScope();
+ }
+ }
+<MemberCall2,FuncCall>{OPERATOR} { // operator
+ if (qstrcmp(yytext,"*") &&
+ qstrcmp(yytext,"&") &&
+ qstrcmp(yytext,"^") &&
+ qstrcmp(yytext,"%")) // typically a pointer or reference
+ {
+ // not a * or &, or C++/CLI's ^ or %
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ }
+ yyextra->code->codify(yytext);
+ }
+<MemberCall,MemberCall2,FuncCall>("*"{B}*)?")" {
+ if (yytext[0]==')') // no a pointer cast
+ {
+ //printf("addVariable(%s,%s)\n",yyextra->parmType.data(),yyextra->parmName.data());
+ if (yyextra->parmType.isEmpty())
+ {
+ yyextra->parmType=yyextra->parmName;
+ yyextra->parmName.resize(0);
+ }
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ }
+ else
+ {
+ yyextra->parmType = yyextra->parmName;
+ yyextra->parmName.resize(0);
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ }
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->inForEachExpression = FALSE;
+ //yyextra->theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b().
+ yyextra->code->codify(yytext);
+ if (--yyextra->bracketCount<=0)
+ {
+ if (yyextra->name.isEmpty())
+ {
+ BEGIN( Body );
+ }
+ else
+ {
+ BEGIN( CallEnd );
+ }
+ }
+ }
+<CallEnd>[ \t\n]* { codifyLines(yyscanner,yytext); }
+ /*
+<MemberCall2,FuncCall>")"[ \t\n]*[;:] {
+ */
+<CallEnd>[;:] {
+ codifyLines(yyscanner,yytext);
+ yyextra->bracketCount=0;
+ if (*yytext==';') yyextra->searchingForBody=FALSE;
+ if (!yyextra->type.isEmpty())
+ {
+ DBG_CTX((stderr,"add variable yyextra->type=%s yyextra->name=%s)\n",yyextra->type.data(),yyextra->name.data()));
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->type,yyextra->name);
+ }
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ yyextra->theCallContext.setScope(0);
+ if (*yytext==';' || yyextra->insideBody)
+ {
+ if (!yyextra->insideBody)
+ {
+ yyextra->theVarContext.popScope();
+ }
+ yyextra->name.resize(0);yyextra->type.resize(0);
+ BEGIN( Body );
+ }
+ else
+ {
+ yyextra->bracketCount=0;
+ BEGIN( SkipInits );
+ }
+ }
+<CallEnd>("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"sealed"|"override"))*/{BN}*(";"|"="|"throw"{BN}*"(") {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+<CallEnd,OldStyleArgs>("const"|"volatile"|"sealed"|"override")*({BN}+("const"|"volatile"|"sealed"|"override"))*{BN}*"{" {
+ if (yyextra->insideBody)
+ {
+ yyextra->theVarContext.pushScope();
+ }
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ //yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ int index = yyextra->name.findRev("::");
+ DBG_CTX((stderr,"yyextra->name=%s\n",yyextra->name.data()));
+ if (index!=-1)
+ {
+ QCString scope = yyextra->name.left(index);
+ if (!yyextra->classScope.isEmpty()) scope.prepend(yyextra->classScope+"::");
+ const ClassDef *cd=getResolvedClass(Doxygen::globalScope,yyextra->sourceFileDef,scope);
+ if (cd)
+ {
+ setClassScope(yyscanner,cd->name());
+ yyextra->scopeStack.push(SCOPEBLOCK);
+ DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
+ }
+ else
+ {
+ //setClassScope(yyscanner,yyextra->realScope);
+ yyextra->scopeStack.push(INNERBLOCK);
+ DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
+ }
+ }
+ else
+ {
+ DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
+ yyextra->scopeStack.push(INNERBLOCK);
+ }
+ yytext[yyleng-1]='\0';
+ QCString cv(yytext);
+ if (!cv.stripWhiteSpace().isEmpty())
+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ else // just whitespace
+ {
+ codifyLines(yyscanner,yytext);
+ }
+ yyextra->code->codify("{");
+ if (yyextra->searchingForBody)
+ {
+ yyextra->searchingForBody=FALSE;
+ yyextra->insideBody=TRUE;
+ }
+ if (yyextra->insideBody) yyextra->bodyCurlyCount++;
+ yyextra->type.resize(0); yyextra->name.resize(0);
+ BEGIN( Body );
+ }
+<CallEnd>"try" { // function-try-block
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ yyextra->inFunctionTryBlock=TRUE;
+ }
+<CallEnd>{ID} {
+ if (yyextra->insideBody || !yyextra->parmType.isEmpty())
+ {
+ REJECT;
+ }
+ // could be K&R style definition
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,!yyextra->insideBody);
+ BEGIN(OldStyleArgs);
+ }
+<OldStyleArgs>{ID} {
+ addParmType(yyscanner);
+ yyextra->parmName=yytext;
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,!yyextra->insideBody);
+ }
+<OldStyleArgs>[,;] {
+ yyextra->code->codify(yytext);
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
+ if (*yytext==';') yyextra->parmType.resize(0);
+ yyextra->parmName.resize(0);
+ }
+<CallEnd,OldStyleArgs>"#" {
+ startFontClass(yyscanner,"preprocessor");
+ yyextra->lastSkipCppContext = Body;
+ yyextra->code->codify(yytext);
+ BEGIN( SkipCPP );
+ }
+<CallEnd>. {
+ unput(*yytext);
+ if (!yyextra->insideBody)
+ {
+ yyextra->theVarContext.popScope();
+ }
+ yyextra->name.resize(0);yyextra->args.resize(0);
+ yyextra->parmType.resize(0);yyextra->parmName.resize(0);
+ BEGIN( Body );
+ }
+<SkipInits>";" {
+ yyextra->code->codify(yytext);
+ yyextra->type.resize(0); yyextra->name.resize(0);
+ BEGIN( Body );
+ }
+<SkipInits>"{" {
+ yyextra->code->codify(yytext);
+ if (yyextra->searchingForBody)
+ {
+ yyextra->searchingForBody=FALSE;
+ yyextra->insideBody=TRUE;
+ }
+ if (yyextra->insideBody) yyextra->bodyCurlyCount++;
+ if (yyextra->name.find("::")!=-1)
+ {
+ DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
+ yyextra->scopeStack.push(SCOPEBLOCK);
+ setClassScope(yyscanner,yyextra->realScope);
+ }
+ else
+ {
+ DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
+ yyextra->scopeStack.push(INNERBLOCK);
+ }
+ yyextra->type.resize(0); yyextra->name.resize(0);
+ BEGIN( Body );
+ }
+<SkipInits>{ID} {
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<FuncCall>{ID}/"(" {
+ generateFunctionLink(yyscanner,*yyextra->code,yytext);
+ }
+<FuncCall>{ID}/("."|"->") {
+ yyextra->name=yytext;
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ BEGIN( MemberCall2 );
+ }
+<FuncCall,MemberCall2>("("{B}*("*"{B}*)+{ID}*{B}*")"{B}*)/("."|"->") {
+ yyextra->code->codify(yytext);
+ int s=0;while (!isId(yytext[s])) s++;
+ int e=(int)yyleng-1;while (!isId(yytext[e])) e--;
+ yyextra->name=((QCString)yytext).mid(s,e-s+1);
+ BEGIN( MemberCall2 );
+ }
+<MemberCall2>{ID}/([ \t\n]*"(") {
+ if (!yyextra->args.isEmpty())
+ generateMemberLink(yyscanner,*yyextra->code,yyextra->args,yytext);
+ else
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ yyextra->args.resize(0);
+ BEGIN( FuncCall );
+ }
+<MemberCall2>{ID}/([ \t\n]*("."|"->")) {
+ //yyextra->code->codify(yytext);
+ yyextra->name=yytext;
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ BEGIN( MemberCall2 );
+ }
+<MemberCall2>"->"|"." {
+ if (yytext[0]=='-') // -> could be overloaded
+ {
+ updateCallContextForSmartPointer(yyscanner);
+ }
+ yyextra->code->codify(yytext);
+ yyextra->memCallContext = YY_START;
+ BEGIN( MemberCall );
+ }
+<SkipComment>"/*"("!"?)"*/" {
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastCContext ) ;
+ }
+<SkipComment>"//"|"/*" {
+ yyextra->code->codify(yytext);
+ }
+<SkipComment>[^*/\n]+ {
+ yyextra->code->codify(yytext);
+ }
+<SkipComment>[ \t]*"*/" {
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ if (yyextra->lastCContext==SkipCPP)
+ {
+ startFontClass(yyscanner,"preprocessor");
+ }
+ BEGIN( yyextra->lastCContext ) ;
+ }
+<SkipCxxComment>[^\r\n]*"\\"[\r]?\n { // line continuation
+ codifyLines(yyscanner,yytext);
+ }
+<SkipCxxComment>[^\r\n]+ {
+ yyextra->code->codify(yytext);
+ }
+<SkipCxxComment>\r
+<SkipCxxComment>\n {
+ unput('\n');
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastCContext ) ;
+ }
+<SkipCxxComment>. {
+ yyextra->code->codify(yytext);
+ }
+<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)?{B}*"/*"[*!]/[^/*] {
+ yyextra->yyLineNr+=QCString(yytext).contains('\n');
+ }
+<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)? {
+ yyextra->yyLineNr+=QCString(yytext).contains('\n');
+ nextCodeLine(yyscanner);
+ if (yyextra->lastSpecialCContext==SkipCxxComment)
+ { // force end of C++ comment here
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastCContext ) ;
+ }
+ else
+ {
+ BEGIN(yyextra->lastSpecialCContext);
+ }
+ }
+<RemoveSpecialCComment>"*/" {
+ BEGIN(yyextra->lastSpecialCContext);
+ }
+<RemoveSpecialCComment>[^*\n]+
+<RemoveSpecialCComment>"//"|"/*"
+<RemoveSpecialCComment>\n { yyextra->yyLineNr++; }
+<RemoveSpecialCComment>.
+<MemberCall>[^a-z_A-Z0-9(\n] {
+ yyextra->code->codify(yytext);
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ BEGIN(yyextra->memCallContext);
+ }
+<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
+ if (YY_START==SkipCPP) REJECT;
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ yyextra->yyLineNr+=((QCString)yytext).contains('\n');
+ nextCodeLine(yyscanner);
+ }
+ else
+ {
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ if (YY_START==SkipCxxComment)
+ {
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastCContext ) ;
+ }
+ }
+<SkipCPP>\n/.*\n {
+ endFontClass(yyscanner);
+ codifyLines(yyscanner,yytext);
+ BEGIN( yyextra->lastSkipCppContext ) ;
+ }
+<*>\n{B}*"//@"[{}].*\n { // remove one-line group marker
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ yyextra->yyLineNr+=2;
+ nextCodeLine(yyscanner);
+ }
+ else
+ {
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ if (YY_START==SkipCxxComment)
+ {
+ endFontClass(yyscanner);
+ BEGIN( yyextra->lastCContext ) ;
+ }
+ }
+<*>\n{B}*"/*@"[{}] { // remove one-line group marker
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ yyextra->yyLineNr++;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>^{B}*"//@"[{}].*\n { // remove one-line group marker
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ yyextra->yyLineNr++;
+ nextCodeLine(yyscanner);
+ }
+ else
+ {
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ }
+<*>^{B}*"/*@"[{}] { // remove multi-line group marker
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ yyextra->yyLineNr++;
+ //nextCodeLine(yyscanner);
+ }
+ else
+ {
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ }
+<*>"//"[!/][^\n]*\n { // strip special one-line comment
+ if (YY_START==SkipComment || YY_START==SkipString) REJECT;
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ char c[2]; c[0]='\n'; c[1]=0;
+ codifyLines(yyscanner,c);
+ }
+ else
+ {
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
+ }
+<*>"/*[tag:"[^\]\n]*"]*/"{B}* { // special pattern /*[tag:filename]*/ to force linking to a tag file
+ yyextra->forceTagReference=yytext;
+ int s=yyextra->forceTagReference.find(':');
+ int e=yyextra->forceTagReference.findRev(']');
+ yyextra->forceTagReference = yyextra->forceTagReference.mid(s+1,e-s-1);
+ }
+<*>\n{B}*"/*"[!*]/[^/*] {
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ yyextra->yyLineNr++;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>^{B}*"/**"[*]+/[^/] { // special C "banner" comment block at a new line
+ if (Config_getBool(JAVADOC_BANNER) && Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>"/*"[!*]/[^/*] { // special C comment block half way a line
+ if (YY_START==SkipString) REJECT;
+ if (Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ if (YY_START != RemoveSpecialCComment) yyextra->lastSpecialCContext = YY_START;
+ BEGIN(RemoveSpecialCComment);
+ }
+ else
+ {
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ BEGIN(SkipComment);
+ }
+ }
+<*>"/*"("!"?)"*/" {
+ if (YY_START==SkipString) REJECT;
+ if (!Config_getBool(STRIP_CODE_COMMENTS))
+ {
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
+ }
+<SkipComment>[^\*\n]+ {
+ yyextra->code->codify(yytext);
+ }
+<*>"/*" {
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ // check is to prevent getting stuck in skipping C++ comments
+ if (YY_START != SkipComment && YY_START != SkipCxxComment)
+ {
+ yyextra->lastCContext = YY_START ;
+ }
+ BEGIN( SkipComment ) ;
+ }
+<*>@\" { // C# verbatim string
+ startFontClass(yyscanner,"stringliteral");
+ yyextra->code->codify(yytext);
+ yyextra->lastVerbStringContext=YY_START;
+ BEGIN(SkipVerbString);
+ }
+<*>"//" {
+ startFontClass(yyscanner,"comment");
+ yyextra->code->codify(yytext);
+ yyextra->lastCContext = YY_START ;
+ BEGIN( SkipCxxComment ) ;
+ }
+<*>"("|"[" {
+ yyextra->code->codify(yytext);
+ yyextra->theCallContext.pushScope(yyextra->name, yyextra->type);
+ }
+<*>")"|"]" {
+ yyextra->code->codify(yytext);
+ yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
+ }
+<*>\n {
+ yyextra->yyColNr++;
+ codifyLines(yyscanner,yytext);
+ }
+<*>. {
+ yyextra->yyColNr++;
+ yyextra->code->codify(yytext);
+ }
+ /*
+<*>([ \t\n]*"\n"){2,} { // combine multiple blank lines
+ //QCString sepLine=yytext;
+ //yyextra->code->codify("\n\n");
+ //yyextra->yyLineNr+=sepLine.contains('\n');
+ //char sepLine[3]="\n\n";
+ codifyLines(yyscanner,yytext);
+ }
+ */
+
+%%
+
+/*@ ----------------------------------------------------------------------------
+ */
+
+void VariableContext::addVariable(yyscan_t yyscanner,const QCString &type,const QCString &name)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("VariableContext::addVariable(%s,%s)\n",type.data(),name.data());
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
@@ -257,8 +2268,8 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
const ClassDef *varType;
int i=0;
if (
- (varType=g_codeClassSDict->find(ltype)) || // look for class definitions inside the code block
- (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions
+ (varType=yyextra->codeClassSDict->find(ltype)) || // look for class definitions inside the code block
+ (varType=getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,ltype)) // look for global class definitions
)
{
DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
@@ -272,9 +2283,9 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
QCString templateArgs(ltype.right(ltype.length() - i));
if ( !typeName.isEmpty() &&
( // look for class definitions inside the code block
- (varType=g_codeClassSDict->find(typeName)) ||
+ (varType=yyextra->codeClassSDict->find(typeName)) ||
// otherwise look for global class definitions
- (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,typeName,0,0,TRUE,TRUE))
+ (varType=getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,typeName,0,0,TRUE,TRUE))
) && // and it must be a template
!varType->templateArguments().empty())
{
@@ -288,7 +2299,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
else
{
// Doesn't seem to be a template. Try just the base name.
- addVariable(typeName,name);
+ addVariable(yyscanner,typeName,name);
}
}
else
@@ -330,137 +2341,73 @@ ClassDef *VariableContext::findVariable(const QCString &name)
return result;
}
-static VariableContext g_theVarContext;
const ClassDef *VariableContext::dummyContext = (ClassDef*)0x8;
//-------------------------------------------------------------------
-class CallContext
-{
- public:
- struct Ctx
- {
- Ctx(QCString _name, QCString _type) : name(_name), type(_type), d(0) {}
- QCString name;
- QCString type;
- const Definition *d;
- };
-
- CallContext()
- {
- m_defList.append(new Ctx("",""));
- m_defList.setAutoDelete(TRUE);
- }
- virtual ~CallContext() {}
- void setScope(const Definition *d)
- {
- Ctx *ctx = m_defList.getLast();
- if (ctx)
- {
- DBG_CTX((stderr,"** Set call context %s (%p)\n",d==0 ? "<null>" : d->name().data(),d));
- ctx->d=d;
- }
- }
- void pushScope(QCString _name, QCString _type)
- {
- m_defList.append(new Ctx(_name,_type));
- DBG_CTX((stderr,"** Push call context %d\n",m_defList.count()));
- }
- void popScope(QCString &_name, QCString &_type)
- {
- if (m_defList.count()>1)
- {
- DBG_CTX((stderr,"** Pop call context %d\n",m_defList.count()));
- Ctx *ctx = m_defList.getLast();
- if (ctx)
- {
- _name = ctx->name;
- _type = ctx->type;
- }
- m_defList.removeLast();
- }
- else
- {
- DBG_CTX((stderr,"** ILLEGAL: Pop call context\n"));
- }
- }
- void clear()
- {
- DBG_CTX((stderr,"** Clear call context\n"));
- m_defList.clear();
- m_defList.append(new Ctx("",""));
- }
- const Definition *getScope() const
- {
- Ctx *ctx = m_defList.getLast();
- if (ctx) return ctx->d; else return 0;
- }
-
- private:
- QList<Ctx> m_defList;
-};
-
-static CallContext g_theCallContext;
-
-//-------------------------------------------------------------------
-
/*! add class/namespace name s to the scope */
-static void pushScope(const char *s)
+static void pushScope(yyscan_t yyscanner,const char *s)
{
- g_classScopeLengthStack.push(new int(g_classScope.length()));
- if (g_classScope.isEmpty() || leftScopeMatch(s,g_classScope))
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->classScopeLengthStack.push(new int(yyextra->classScope.length()));
+ if (yyextra->classScope.isEmpty() || leftScopeMatch(s,yyextra->classScope))
{
- g_classScope = s;
+ yyextra->classScope = s;
}
else
{
- g_classScope += "::";
- g_classScope += s;
+ yyextra->classScope += "::";
+ yyextra->classScope += s;
}
- //printf("pushScope(%s) result: '%s'\n",s,g_classScope.data());
+ //printf("pushScope(%s) result: '%s'\n",s,yyextra->classScope.data());
}
+
/*! remove the top class/namespace name from the scope */
-static void popScope()
+static void popScope(yyscan_t yyscanner)
{
- if (!g_classScopeLengthStack.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->classScopeLengthStack.isEmpty())
{
- int *pLength = g_classScopeLengthStack.pop();
- g_classScope.truncate(*pLength);
+ int *pLength = yyextra->classScopeLengthStack.pop();
+ yyextra->classScope.truncate(*pLength);
delete pLength;
}
else
{
//err("Too many end of scopes found!\n");
}
- //printf("popScope() result: '%s'\n",g_classScope.data());
+ //printf("popScope() result: '%s'\n",yyextra->classScope.data());
}
-static void setCurrentDoc(const QCString &anchor)
+static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
{
- if (g_searchCtx)
+ if (yyextra->searchCtx)
{
- g_code->setCurrentDoc(g_searchCtx,g_searchCtx->anchor(),FALSE);
+ yyextra->code->setCurrentDoc(yyextra->searchCtx,yyextra->searchCtx->anchor(),FALSE);
}
else
{
- g_code->setCurrentDoc(g_sourceFileDef,anchor,TRUE);
+ yyextra->code->setCurrentDoc(yyextra->sourceFileDef,anchor,TRUE);
}
}
}
-static void addToSearchIndex(const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const char *text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
{
- g_code->addWord(text,FALSE);
+ yyextra->code->addWord(text,FALSE);
}
}
-static void setClassScope(const QCString &name)
+static void setClassScope(yyscan_t yyscanner,const QCString &name)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("setClassScope(%s)\n",name.data());
QCString n=name;
n=n.simplifyWhiteSpace();
@@ -472,132 +2419,134 @@ static void setClassScope(const QCString &name)
// remove template from scope
n=n.left(ts)+n.right(n.length()-te-1);
}
- while (!g_classScopeLengthStack.isEmpty())
+ while (!yyextra->classScopeLengthStack.isEmpty())
{
- popScope();
+ popScope(yyscanner);
}
- g_classScope.resize(0);
+ yyextra->classScope.resize(0);
int i;
while ((i=n.find("::"))!=-1)
{
- pushScope(n.left(i));
+ pushScope(yyscanner,n.left(i));
n = n.mid(i+2);
}
- pushScope(n);
- //printf("--->New class scope '%s'\n",g_classScope.data());
+ pushScope(yyscanner,n);
+ //printf("--->New class scope '%s'\n",yyextra->classScope.data());
}
-/*! start a new line of code, inserting a line number if g_sourceFileDef
+/*! start a new line of code, inserting a line number if yyextra->sourceFileDef
* is TRUE. If a definition starts at the current line, then the line
* number is linked to the documentation of that definition.
*/
-static void startCodeLine()
+static void startCodeLine(yyscan_t yyscanner)
{
- //if (g_currentFontClass) { g_code->endFontClass(); }
- if (g_sourceFileDef && g_lineNumbers)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //if (yyextra->currentFontClass) { yyextra->code->endFontClass(yyscanner); }
+ if (yyextra->sourceFileDef && yyextra->lineNumbers)
{
//QCString lineNumber,lineAnchor;
- //lineNumber.sprintf("%05d",g_yyLineNr);
- //lineAnchor.sprintf("l%05d",g_yyLineNr);
+ //lineNumber.sprintf("%05d",yyextra->yyLineNr);
+ //lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
- Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);
- //printf("%s:startCodeLine(%d)=%p\n",g_sourceFileDef->name().data(),g_yyLineNr,d);
- if (!g_includeCodeFragment && d)
- {
- g_currentDefinition = d;
- g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);
- g_insideBody = FALSE;
- g_searchingForBody = TRUE;
- g_realScope = d->name();
- //g_classScope = "";
- g_type.resize(0);
- g_name.resize(0);
- g_args.resize(0);
- g_parmType.resize(0);
- g_parmName.resize(0);
- //printf("Real scope: '%s'\n",g_realScope.data());
- g_bodyCurlyCount = 0;
+ Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
+ //printf("%s:startCodeLine(%d)=%p\n",yyextra->sourceFileDef->name().data(),yyextra->yyLineNr,d);
+ if (!yyextra->includeCodeFragment && d)
+ {
+ yyextra->currentDefinition = d;
+ yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
+ yyextra->insideBody = FALSE;
+ yyextra->searchingForBody = TRUE;
+ yyextra->realScope = d->name();
+ //yyextra->classScope = "";
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ yyextra->args.resize(0);
+ yyextra->parmType.resize(0);
+ yyextra->parmName.resize(0);
+ //printf("Real scope: '%s'\n",yyextra->realScope.data());
+ yyextra->bodyCurlyCount = 0;
QCString lineAnchor;
- lineAnchor.sprintf("l%05d",g_yyLineNr);
- if (g_currentMemberDef)
+ lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
+ if (yyextra->currentMemberDef)
{
- g_code->writeLineNumber(g_currentMemberDef->getReference(),
- g_currentMemberDef->getOutputFileBase(),
- g_currentMemberDef->anchor(),g_yyLineNr);
- setCurrentDoc(lineAnchor);
+ yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
+ yyextra->currentMemberDef->getOutputFileBase(),
+ yyextra->currentMemberDef->anchor(),yyextra->yyLineNr);
+ setCurrentDoc(yyscanner,lineAnchor);
}
else if (d->isLinkableInProject())
{
- g_code->writeLineNumber(d->getReference(),
+ yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,g_yyLineNr);
- setCurrentDoc(lineAnchor);
+ 0,yyextra->yyLineNr);
+ setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- g_code->writeLineNumber(0,0,0,g_yyLineNr);
+ yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
}
}
- DBG_CTX((stderr,"startCodeLine(%d)\n",g_yyLineNr));
- g_code->startCodeLine(g_sourceFileDef && g_lineNumbers);
- if (g_currentFontClass)
+ DBG_CTX((stderr,"startCodeLine(%d)\n",yyextra->yyLineNr));
+ yyextra->code->startCodeLine(yyextra->sourceFileDef && yyextra->lineNumbers);
+ if (yyextra->currentFontClass)
{
- g_code->startFontClass(g_currentFontClass);
+ yyextra->code->startFontClass(yyextra->currentFontClass);
}
}
-static void endFontClass();
-static void startFontClass(const char *s);
-static void endCodeLine()
+static void endCodeLine(yyscan_t yyscanner)
{
- DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
- endFontClass();
- g_code->endCodeLine();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ DBG_CTX((stderr,"endCodeLine(%d)\n",yyextra->yyLineNr));
+ endFontClass(yyscanner);
+ yyextra->code->endCodeLine();
}
-static void nextCodeLine()
+static void nextCodeLine(yyscan_t yyscanner)
{
- const char * fc = g_currentFontClass;
- endCodeLine();
- if (g_yyLineNr<g_inputLines)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ const char * fc = yyextra->currentFontClass;
+ endCodeLine(yyscanner);
+ if (yyextra->yyLineNr<yyextra->inputLines)
{
- g_currentFontClass = fc;
- startCodeLine();
+ yyextra->currentFontClass = fc;
+ startCodeLine(yyscanner);
}
}
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(const char *text)
+static void codifyLines(yyscan_t yyscanner,const char *text)
{
- //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
const char *p=text,*sp=p;
char c;
bool done=FALSE;
while (!done)
{
sp=p;
- while ((c=*p++) && c!='\n') { g_yyColNr++; }
+ while ((c=*p++) && c!='\n') { yyextra->yyColNr++; }
if (c=='\n')
{
- g_yyLineNr++;
- g_yyColNr=1;
+ yyextra->yyLineNr++;
+ yyextra->yyColNr=1;
//*(p-1)='\0';
int l = (int)(p-sp-1);
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
- g_code->codify(tmp);
+ yyextra->code->codify(tmp);
free(tmp);
- nextCodeLine();
+ nextCodeLine(yyscanner);
}
else
{
- g_code->codify(sp);
+ yyextra->code->codify(sp);
done=TRUE;
}
}
@@ -607,10 +2556,11 @@ static void codifyLines(const char *text)
* line numbers for each line. If \a text contains newlines, the link will be
* split into multiple links with the same destination, one for each line.
*/
-static void writeMultiLineCodeLink(CodeOutputInterface &ol,
+static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
const char *text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
@@ -630,11 +2580,11 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
while ((c=*p++) && c!='\n') { }
if (c=='\n')
{
- g_yyLineNr++;
+ yyextra->yyLineNr++;
*(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
ol.writeCodeLink(ref,file,anchor,sp,tooltip);
- nextCodeLine();
+ nextCodeLine(yyscanner);
}
else
{
@@ -645,56 +2595,61 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
}
}
-static void addType()
+static void addType(yyscan_t yyscanner)
{
- if (g_name=="const") { g_name.resize(0); return; }
- if (!g_type.isEmpty()) g_type += ' ' ;
- g_type += g_name ;
- g_name.resize(0) ;
- if (!g_type.isEmpty()) g_type += ' ' ;
- g_type += g_args ;
- g_args.resize(0) ;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->name=="const") { yyextra->name.resize(0); return; }
+ if (!yyextra->type.isEmpty()) yyextra->type += ' ' ;
+ yyextra->type += yyextra->name ;
+ yyextra->name.resize(0) ;
+ if (!yyextra->type.isEmpty()) yyextra->type += ' ' ;
+ yyextra->type += yyextra->args ;
+ yyextra->args.resize(0) ;
}
-static void addParmType()
+static void addParmType(yyscan_t yyscanner)
{
- if (g_parmName=="const") { g_parmName.resize(0); return; }
- if (!g_parmType.isEmpty()) g_parmType += ' ' ;
- g_parmType += g_parmName ;
- g_parmName.resize(0) ;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->parmName=="const") { yyextra->parmName.resize(0); return; }
+ if (!yyextra->parmType.isEmpty()) yyextra->parmType += ' ' ;
+ yyextra->parmType += yyextra->parmName ;
+ yyextra->parmName.resize(0) ;
}
-static void addUsingDirective(const char *name)
+static void addUsingDirective(yyscan_t yyscanner,const char *name)
{
- if (g_sourceFileDef && name)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->sourceFileDef && name)
{
NamespaceDef *nd = Doxygen::namespaceSDict->find(name);
if (nd)
{
- g_sourceFileDef->addUsingDirective(nd);
+ yyextra->sourceFileDef->addUsingDirective(nd);
}
}
}
-static void setParameterList(const MemberDef *md)
+static void setParameterList(yyscan_t yyscanner,const MemberDef *md)
{
- g_classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
for (const Argument &a : md->argumentList())
{
- g_parmName = a.name;
- g_parmType = a.type;
- int i = g_parmType.find('*');
- if (i!=-1) g_parmType = g_parmType.left(i);
- i = g_parmType.find('&');
- if (i!=-1) g_parmType = g_parmType.left(i);
- g_parmType.stripPrefix("const ");
- g_parmType=g_parmType.stripWhiteSpace();
- g_theVarContext.addVariable(g_parmType,g_parmName);
+ yyextra->parmName = a.name;
+ yyextra->parmType = a.type;
+ int i = yyextra->parmType.find('*');
+ if (i!=-1) yyextra->parmType = yyextra->parmType.left(i);
+ i = yyextra->parmType.find('&');
+ if (i!=-1) yyextra->parmType = yyextra->parmType.left(i);
+ yyextra->parmType.stripPrefix("const ");
+ yyextra->parmType=yyextra->parmType.stripWhiteSpace();
+ yyextra->theVarContext.addVariable(yyscanner,yyextra->parmType,yyextra->parmName);
}
}
-static const ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
+static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int pos=0;
QCString type = s;
QCString className;
@@ -703,13 +2658,13 @@ static const ClassDef *stripClassName(const char *s,Definition *d=g_currentDefin
{
QCString clName=className+templSpec;
const ClassDef *cd=0;
- if (!g_classScope.isEmpty())
+ if (!yyextra->classScope.isEmpty())
{
- cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName);
+ cd=getResolvedClass(d,yyextra->sourceFileDef,yyextra->classScope+"::"+clName);
}
if (cd==0)
{
- cd=getResolvedClass(d,g_sourceFileDef,clName);
+ cd=getResolvedClass(d,yyextra->sourceFileDef,clName);
}
//printf("stripClass trying '%s' = %p\n",clName.data(),cd);
if (cd)
@@ -721,10 +2676,11 @@ static const ClassDef *stripClassName(const char *s,Definition *d=g_currentDefin
return 0;
}
-static MemberDef *setCallContextForVar(const QCString &name)
+static MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &name)
{
if (name.isEmpty()) return 0;
- DBG_CTX((stderr,"setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data()));
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ DBG_CTX((stderr,"setCallContextForVar(%s) yyextra->classScope=%s\n",name.data(),yyextra->classScope.data()));
int scopeEnd = name.findRev("::");
if (scopeEnd!=-1) // name with explicit scope
@@ -739,7 +2695,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md)
{
//printf("name=%s scope=%s\n",locName.data(),scope.data());
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
return md;
}
}
@@ -752,7 +2708,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md)
{
//printf("name=%s scope=%s\n",locName.data(),scope.data());
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
return md;
}
}
@@ -760,21 +2716,21 @@ static MemberDef *setCallContextForVar(const QCString &name)
}
MemberName *mn;
- ClassDef *mcd = g_theVarContext.findVariable(name);
+ ClassDef *mcd = yyextra->theVarContext.findVariable(name);
if (mcd) // local variable
{
DBG_CTX((stderr,"local variable?\n"));
if (mcd!=VariableContext::dummyContext)
{
DBG_CTX((stderr,"local var '%s' mcd=%s\n",name.data(),mcd->name().data()));
- g_theCallContext.setScope(mcd);
+ yyextra->theCallContext.setScope(mcd);
}
}
else
{
- DBG_CTX((stderr,"class member? scope=%s\n",g_classScope.data()));
+ DBG_CTX((stderr,"class member? scope=%s\n",yyextra->classScope.data()));
// look for a class member
- mcd = getClass(g_classScope);
+ mcd = getClass(yyextra->classScope);
if (mcd)
{
DBG_CTX((stderr,"Inside class %s\n",mcd->name().data()));
@@ -782,10 +2738,10 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md)
{
DBG_CTX((stderr,"Found member %s\n",md->name().data()));
- if (g_scopeStack.top()!=CLASSBLOCK)
+ if (yyextra->scopeStack.top()!=CLASSBLOCK)
{
DBG_CTX((stderr,"class member '%s' mcd=%s\n",name.data(),mcd->name().data()));
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
}
return md;
}
@@ -799,9 +2755,9 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (mn->count()==1) // global defined only once
{
MemberDef *md=mn->getFirst();
- if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
+ if (!md->isStatic() || md->getBodyDef()==yyextra->sourceFileDef)
{
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
return md;
}
return 0;
@@ -812,19 +2768,19 @@ static MemberDef *setCallContextForVar(const QCString &name)
MemberDef *md;
for (;(md=it.current());++it)
{
- //printf("mn=%p md=%p md->getBodyDef()=%p g_sourceFileDef=%p\n",
+ //printf("mn=%p md=%p md->getBodyDef()=%p yyextra->sourceFileDef=%p\n",
// mn,md,
- // md->getBodyDef(),g_sourceFileDef);
+ // md->getBodyDef(),yyextra->sourceFileDef);
// in case there are multiple members we could link to, we
// only link to members if defined in the same file or
// defined as external.
- if ((!md->isStatic() || md->getBodyDef()==g_sourceFileDef) &&
- (g_forceTagReference.isEmpty() || g_forceTagReference==md->getReference())
+ if ((!md->isStatic() || md->getBodyDef()==yyextra->sourceFileDef) &&
+ (yyextra->forceTagReference.isEmpty() || yyextra->forceTagReference==md->getReference())
)
{
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
- //printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
+ //printf("returning member %s in source file %s\n",md->name().data(),yyextra->sourceFileDef->name().data());
return md;
}
}
@@ -834,52 +2790,55 @@ static MemberDef *setCallContextForVar(const QCString &name)
return 0;
}
-static void updateCallContextForSmartPointer()
+static void updateCallContextForSmartPointer(yyscan_t yyscanner)
{
- const Definition *d = g_theCallContext.getScope();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ const Definition *d = yyextra->theCallContext.getScope();
//printf("updateCallContextForSmartPointer() cd=%s\n",cd ? d->name().data() : "<none>");
MemberDef *md;
if (d && d->definitionType()==Definition::TypeClass && (md=(dynamic_cast<const ClassDef*>(d))->isSmartPointer()))
{
- const ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
+ const ClassDef *ncd = stripClassName(yyscanner,md->typeString(),md->getOuterScope());
if (ncd)
{
- g_theCallContext.setScope(ncd);
+ yyextra->theCallContext.setScope(ncd);
//printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
}
}
}
-static bool getLinkInScope(const QCString &c, // scope
+static bool getLinkInScope(yyscan_t yyscanner,
+ const QCString &c, // scope
const QCString &m, // member
const char *memberText, // exact text
CodeOutputInterface &ol,
const char *text,
- bool varOnly=FALSE
+ bool varOnly
)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
const MemberDef *md = 0;
const ClassDef *cd = 0;
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",c.data(),m.data(),varOnly));
- if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
+ if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,yyextra->sourceFileDef,FALSE,yyextra->forceTagReference) &&
(!varOnly || md->isVariable()))
{
if (md->isLinkable())
{
//printf("found it %s!\n",md->qualifiedName().data());
- if (g_exampleBlock)
+ if (yyextra->exampleBlock)
{
QCString anchor;
- anchor.sprintf("a%d",g_anchorCount);
- //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
- // g_exampleFile.data());
- if (const_cast<MemberDef*>(md)->addExample(anchor,g_exampleName,g_exampleFile))
+ anchor.sprintf("a%d",yyextra->anchorCount);
+ //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
+ // yyextra->exampleFile.data());
+ if (const_cast<MemberDef*>(md)->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
ol.writeCodeAnchor(anchor);
- g_anchorCount++;
+ yyextra->anchorCount++;
}
}
@@ -888,19 +2847,19 @@ static bool getLinkInScope(const QCString &c, // scope
if (md->resolveAlias()->getGroupDef()) d = md->resolveAlias()->getGroupDef();
if (d && d->isLinkable())
{
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
- //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
- // g_currentDefinition,g_currentMemberDef,g_insideBody);
+ yyextra->theCallContext.setScope(stripClassName(yyscanner,md->typeString(),md->getOuterScope()));
+ //printf("yyextra->currentDefinition=%p yyextra->currentMemberDef=%p yyextra->insideBody=%d\n",
+ // yyextra->currentDefinition,yyextra->currentMemberDef,yyextra->insideBody);
- if (g_currentDefinition && g_currentMemberDef &&
- md!=g_currentMemberDef && g_insideBody && g_collectXRefs)
+ if (yyextra->currentDefinition && yyextra->currentMemberDef &&
+ md!=yyextra->currentMemberDef && yyextra->insideBody && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
+ addDocCrossReference(yyextra->currentMemberDef,const_cast<MemberDef*>(md));
}
//printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
- writeMultiLineCodeLink(ol,md, text ? text : memberText);
- addToSearchIndex(text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md, text ? text : memberText);
+ addToSearchIndex(yyscanner,text ? text : memberText);
return TRUE;
}
}
@@ -908,54 +2867,60 @@ static bool getLinkInScope(const QCString &c, // scope
// to the previous member, see bug762760
{
DBG_CTX((stderr,"unlinkable member %s\n",md->name().data()));
- g_currentMemberDef = 0;
+ yyextra->currentMemberDef = 0;
}
}
return FALSE;
}
-static bool getLink(const char *className,
+static bool getLink(yyscan_t yyscanner,
+ const char *className,
const char *memberName,
CodeOutputInterface &ol,
- const char *text=0,
- bool varOnly=FALSE)
+ const char *text,
+ bool varOnly)
{
- //printf("getLink(%s,%s) g_curClassName=%s\n",className,memberName,g_curClassName.data());
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("getLink(%s,%s) yyextra->curClassName=%s\n",className,memberName,yyextra->curClassName.data());
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
- if (!getLinkInScope(c,m,memberName,ol,text,varOnly))
+ if (!getLinkInScope(yyscanner,c,m,memberName,ol,text,varOnly))
{
- if (!g_curClassName.isEmpty())
+ if (!yyextra->curClassName.isEmpty())
{
if (!c.isEmpty()) c.prepend("::");
- c.prepend(g_curClassName);
- return getLinkInScope(c,m,memberName,ol,text,varOnly);
+ c.prepend(yyextra->curClassName);
+ return getLinkInScope(yyscanner,c,m,memberName,ol,text,varOnly);
}
return FALSE;
}
return TRUE;
}
-static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName,
- bool typeOnly=FALSE,bool varOnly=FALSE)
+static void generateClassOrGlobalLink(yyscan_t yyscanner,
+ CodeOutputInterface &ol,
+ const char *clName,
+ bool typeOnly,
+ bool varOnly)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int i=0;
if (*clName=='~') // correct for matching negated values i.s.o. destructors.
{
- g_code->codify("~");
+ yyextra->code->codify("~");
clName++;
}
QCString className=clName;
if (className.isEmpty()) return;
- if (g_insideProtocolList) // for Obj-C
+ if (yyextra->insideProtocolList) // for Obj-C
{
className+="-p";
}
- if (g_insidePHP)
+ if (yyextra->lang==SrcLangExt_PHP)
{
className = substitute(className,"\\","::"); // for PHP namespaces
}
- else if (g_insideCS || g_insideJava)
+ else if (yyextra->lang==SrcLangExt_CSharp || yyextra->lang==SrcLangExt_Java)
{
className = substitute(className,".","::"); // for PHP namespaces
}
@@ -964,13 +2929,13 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
bool isLocal=FALSE;
//printf("generateClassOrGlobalLink(className=%s)\n",className.data());
- if (!g_prefixed_with_this_keyword || (lcd=g_theVarContext.findVariable(className))==0) // not a local variable
+ if (!yyextra->prefixed_with_this_keyword || (lcd=yyextra->theVarContext.findVariable(className))==0) // not a local variable
{
- Definition *d = g_currentDefinition;
- //printf("d=%s g_sourceFileDef=%s\n",d?d->name().data():"<none>",g_sourceFileDef?g_sourceFileDef->name().data():"<none>");
- cd = getResolvedClass(d,g_sourceFileDef,className,&md);
+ Definition *d = yyextra->currentDefinition;
+ //printf("d=%s yyextra->sourceFileDef=%s\n",d?d->name().data():"<none>",yyextra->sourceFileDef?yyextra->sourceFileDef->name().data():"<none>");
+ cd = getResolvedClass(d,yyextra->sourceFileDef,className,&md);
DBG_CTX((stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n",
- className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>",
+ className.data(),yyextra->theVarContext.count(),cd?cd->name().data():"<none>",
md?md->name().data():"<none>"));
if (cd==0 && md==0 && (i=className.find('<'))!=-1)
{
@@ -978,15 +2943,15 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
DBG_CTX((stderr,"bareName=%s\n",bareName.data()));
if (bareName!=className)
{
- cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
+ cd=getResolvedClass(d,yyextra->sourceFileDef,bareName,&md); // try unspecialized version
}
}
const NamespaceDef *nd = getResolvedNamespace(className);
if (nd && nd->isLinkable())
{
- g_theCallContext.setScope(nd);
- addToSearchIndex(className);
- writeMultiLineCodeLink(*g_code,nd,clName);
+ yyextra->theCallContext.setScope(nd);
+ addToSearchIndex(yyscanner,className);
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,nd,clName);
return;
}
//printf("md=%s\n",md?md->name().data():"<none>");
@@ -995,7 +2960,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
nd?nd->name().data():"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
- if (getLink(g_classScope,clName,ol,clName,varOnly))
+ if (getLink(yyscanner,yyextra->classScope,clName,ol,clName,varOnly))
{
return;
}
@@ -1007,12 +2972,12 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
if (lcd!=VariableContext::dummyContext)
{
//printf("non-dummy context lcd=%s!\n",lcd->name().data());
- g_theCallContext.setScope(lcd);
+ yyextra->theCallContext.setScope(lcd);
// to following is needed for links to a global variable, but is
// no good for a link to a local variable that is also a global symbol.
- //if (getLink(g_classScope,clName,ol,clName))
+ //if (getLink(yyscanner,yyextra->classScope,clName,ol,clName))
//{
//return;
//}
@@ -1020,35 +2985,35 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
isLocal=TRUE;
DBG_CTX((stderr,"is a local variable cd=%p!\n",cd));
}
- g_prefixed_with_this_keyword = FALSE; // discard the "this" prefix for the next calls
+ yyextra->prefixed_with_this_keyword = FALSE; // discard the "this" prefix for the next calls
if (cd && cd->isLinkable()) // is it a linkable class
{
DBG_CTX((stderr,"is linkable class %s\n",clName));
- if (g_exampleBlock)
+ if (yyextra->exampleBlock)
{
QCString anchor;
- anchor.sprintf("_a%d",g_anchorCount);
- //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
- // g_exampleFile.data());
- if (const_cast<ClassDef*>(cd)->addExample(anchor,g_exampleName,g_exampleFile))
+ anchor.sprintf("_a%d",yyextra->anchorCount);
+ //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
+ // yyextra->exampleFile.data());
+ if (const_cast<ClassDef*>(cd)->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
ol.writeCodeAnchor(anchor);
- g_anchorCount++;
+ yyextra->anchorCount++;
}
}
- writeMultiLineCodeLink(ol,cd,clName);
- addToSearchIndex(className);
- g_theCallContext.setScope(cd);
+ writeMultiLineCodeLink(yyscanner,ol,cd,clName);
+ addToSearchIndex(yyscanner,className);
+ yyextra->theCallContext.setScope(cd);
if (md)
{
const Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getFileDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable() &&
- g_currentMemberDef && g_collectXRefs)
+ yyextra->currentMemberDef && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
+ addDocCrossReference(yyextra->currentMemberDef,const_cast<MemberDef*>(md));
}
}
}
@@ -1059,31 +3024,31 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
{
if (md==0) // not found as a typedef
{
- md = setCallContextForVar(clName);
- //printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
- if (md && g_currentDefinition)
+ md = setCallContextForVar(yyscanner,clName);
+ //printf("setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",clName,md,yyextra->currentDefinition);
+ if (md && yyextra->currentDefinition)
{
DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
- md->name().data(),g_currentDefinition->name().data(),
- isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md),
+ md->name().data(),yyextra->currentDefinition->name().data(),
+ isAccessibleFrom(yyextra->currentDefinition,yyextra->sourceFileDef,md),
md->getOuterScope()->name().data()));
}
- if (md && g_currentDefinition &&
- isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)==-1)
+ if (md && yyextra->currentDefinition &&
+ isAccessibleFrom(yyextra->currentDefinition,yyextra->sourceFileDef,md)==-1)
{
md=0; // variable not accessible
}
}
if (md && (!varOnly || md->isVariable()))
{
- DBG_CTX((stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable()));
+ DBG_CTX((stderr,"is a global md=%p yyextra->currentDefinition=%s linkable=%d\n",md,yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>",md->isLinkable()));
if (md->isLinkable())
{
QCString text;
- if (!g_forceTagReference.isEmpty()) // explicit reference to symbol in tag file
+ if (!yyextra->forceTagReference.isEmpty()) // explicit reference to symbol in tag file
{
- text=g_forceTagReference;
+ text=yyextra->forceTagReference;
if (text.right(4)==".tag") // strip .tag if present
{
text=text.left(text.length()-4);
@@ -1097,11 +3062,11 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
{
text=clName;
}
- writeMultiLineCodeLink(ol,md,text);
- addToSearchIndex(clName);
- if (g_currentMemberDef && g_collectXRefs)
+ writeMultiLineCodeLink(yyscanner,ol,md,text);
+ addToSearchIndex(yyscanner,clName);
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
+ addDocCrossReference(yyextra->currentMemberDef,const_cast<MemberDef*>(md));
}
return;
}
@@ -1110,13 +3075,17 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
// nothing found, just write out the word
DBG_CTX((stderr,"not found!\n"));
- codifyLines(clName);
- addToSearchIndex(clName);
+ codifyLines(yyscanner,clName);
+ addToSearchIndex(yyscanner,clName);
}
}
-static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const char *memName)
+static bool generateClassMemberLink(yyscan_t yyscanner,
+ CodeOutputInterface &ol,
+ MemberDef *xmd,
+ const char *memName)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// extract class definition of the return type in order to resolve
// a->b()->c() like call chains
@@ -1124,22 +3093,22 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
// xmd->typeString(),xmd->argsString(),
// xmd->getClassDef()->name().data());
- if (g_exampleBlock)
+ if (yyextra->exampleBlock)
{
QCString anchor;
- anchor.sprintf("a%d",g_anchorCount);
- //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
- // g_exampleFile.data());
- if (xmd->addExample(anchor,g_exampleName,g_exampleFile))
+ anchor.sprintf("a%d",yyextra->anchorCount);
+ //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
+ // yyextra->exampleFile.data());
+ if (xmd->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
ol.writeCodeAnchor(anchor);
- g_anchorCount++;
+ yyextra->anchorCount++;
}
}
- const ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
+ const ClassDef *typeClass = stripClassName(yyscanner,removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
- g_theCallContext.setScope(typeClass);
+ yyextra->theCallContext.setScope(typeClass);
const Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
xmd->getFileDef() : xmd->getOuterScope();
@@ -1147,22 +3116,22 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
if (xd && xd->isLinkable())
{
- //printf("g_currentDefinition=%p g_currentMemberDef=%p xmd=%p g_insideBody=%d\n",g_currentDefinition,g_currentMemberDef,xmd,g_insideBody);
+ //printf("yyextra->currentDefinition=%p yyextra->currentMemberDef=%p xmd=%p yyextra->insideBody=%d\n",yyextra->currentDefinition,yyextra->currentMemberDef,xmd,yyextra->insideBody);
if (xmd->templateMaster()) xmd = xmd->templateMaster();
if (xmd->isLinkable())
{
// add usage reference
- if (g_currentDefinition && g_currentMemberDef &&
- /*xmd!=g_currentMemberDef &&*/ g_insideBody && g_collectXRefs)
+ if (yyextra->currentDefinition && yyextra->currentMemberDef &&
+ /*xmd!=yyextra->currentMemberDef &&*/ yyextra->insideBody && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,xmd);
+ addDocCrossReference(yyextra->currentMemberDef,xmd);
}
// write the actual link
- writeMultiLineCodeLink(ol,xmd,memName);
- addToSearchIndex(memName);
+ writeMultiLineCodeLink(yyscanner,ol,xmd,memName);
+ addToSearchIndex(yyscanner,memName);
return TRUE;
}
}
@@ -1170,8 +3139,12 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
return FALSE;
}
-static bool generateClassMemberLink(CodeOutputInterface &ol,const Definition *def,const char *memName)
+static bool generateClassMemberLink(yyscan_t yyscanner,
+ CodeOutputInterface &ol,
+ const Definition *def,
+ const char *memName)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (def && def->definitionType()==Definition::TypeClass)
{
const ClassDef *cd = dynamic_cast<const ClassDef*>(def);
@@ -1179,16 +3152,16 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,const Definition *de
//printf("generateClassMemberLink(class=%s,member=%s)=%p\n",def->name().data(),memName,xmd);
if (xmd)
{
- return generateClassMemberLink(ol,xmd,memName);
+ return generateClassMemberLink(yyscanner,ol,xmd,memName);
}
else
{
Definition *innerDef = cd->findInnerCompound(memName);
if (innerDef)
{
- g_theCallContext.setScope(innerDef);
- addToSearchIndex(memName);
- writeMultiLineCodeLink(*g_code,innerDef,memName);
+ yyextra->theCallContext.setScope(innerDef);
+ addToSearchIndex(yyscanner,memName);
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,innerDef,memName);
return TRUE;
}
}
@@ -1200,31 +3173,34 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,const Definition *de
Definition *innerDef = nd->findInnerCompound(memName);
if (innerDef)
{
- g_theCallContext.setScope(innerDef);
- addToSearchIndex(memName);
- writeMultiLineCodeLink(*g_code,innerDef,memName);
+ yyextra->theCallContext.setScope(innerDef);
+ addToSearchIndex(yyscanner,memName);
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,innerDef,memName);
return TRUE;
}
}
return FALSE;
}
-static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
- char *memName)
+static void generateMemberLink(yyscan_t yyscanner,
+ CodeOutputInterface &ol,
+ const QCString &varName,
+ const char *memName)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n",
- // varName.data(),memName,g_classScope.data());
+ // varName.data(),memName,yyextra->classScope.data());
if (varName.isEmpty()) return;
// look for the variable in the current context
- const ClassDef *vcd = g_theVarContext.findVariable(varName);
+ const ClassDef *vcd = yyextra->theVarContext.findVariable(varName);
if (vcd)
{
if (vcd!=VariableContext::dummyContext)
{
//printf("Class found!\n");
- if (getLink(vcd->name(),memName,ol))
+ if (getLink(yyscanner,vcd->name(),memName,ol))
{
//printf("Found result!\n");
return;
@@ -1234,7 +3210,7 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
BaseClassListIterator bcli(*vcd->baseClasses());
for ( ; bcli.current() ; ++bcli)
{
- if (getLink(bcli.current()->classDef->name(),memName,ol))
+ if (getLink(yyscanner,bcli.current()->classDef->name(),memName,ol))
{
//printf("Found result!\n");
return;
@@ -1245,10 +3221,10 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
}
else // variable not in current context, maybe it is in a parent context
{
- vcd = getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope);
+ vcd = getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,yyextra->classScope);
if (vcd && vcd->isLinkable())
{
- //printf("Found class %s for variable '%s'\n",g_classScope.data(),varName.data());
+ //printf("Found class %s for variable '%s'\n",yyextra->classScope.data(),varName.data());
MemberName *vmn=Doxygen::memberNameSDict->find(varName);
if (vmn==0)
{
@@ -1270,10 +3246,10 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
vmd->getClassDef()==jcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
- const ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
+ const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
- if (generateClassMemberLink(ol,mcd,memName)) return;
+ if (generateClassMemberLink(yyscanner,ol,mcd,memName)) return;
}
}
}
@@ -1291,10 +3267,10 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
vmd->getClassDef()==vcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
- const ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
+ const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
- if (generateClassMemberLink(ol,mcd,memName)) return;
+ if (generateClassMemberLink(yyscanner,ol,mcd,memName)) return;
}
}
}
@@ -1302,29 +3278,31 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
}
}
// nothing found -> write result as is
- codifyLines(memName);
- addToSearchIndex(memName);
+ codifyLines(yyscanner,memName);
+ addToSearchIndex(yyscanner,memName);
return;
}
-static void generatePHPVariableLink(CodeOutputInterface &ol,const char *varName)
+static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString name = varName+7; // strip $this->
name.prepend("$");
- //printf("generatePHPVariableLink(%s) name=%s scope=%s\n",varName,name.data(),g_classScope.data());
- if (!getLink(g_classScope,name,ol,varName))
+ //printf("generatePHPVariableLink(%s) name=%s scope=%s\n",varName,name.data(),yyextra->classScope.data());
+ if (!getLink(yyscanner,yyextra->classScope,name,ol,varName))
{
- codifyLines(varName);
+ codifyLines(yyscanner,varName);
}
}
-static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//CodeClassDef *ccd=0;
ClassDef *ccd=0;
- QCString locScope=g_classScope;
+ QCString locScope=yyextra->classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
- if (g_insidePHP && locFunc.startsWith("self::")) locFunc=locFunc.mid(4);
+ if (yyextra->lang==SrcLangExt_PHP && locFunc.startsWith("self::")) locFunc=locFunc.mid(4);
QCString funcScope;
QCString funcWithScope=locFunc;
QCString funcWithFullScope=locFunc;
@@ -1332,15 +3310,15 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
int len=2;
int i=locFunc.findRev("::");
- if (g_currentMemberDef && g_currentMemberDef->resolveAlias()->getClassDef() &&
- funcName==g_currentMemberDef->localName() &&
- g_currentMemberDef->getDefLine()==g_yyLineNr &&
- generateClassMemberLink(ol,g_currentMemberDef,funcName)
+ if (yyextra->currentMemberDef && yyextra->currentMemberDef->resolveAlias()->getClassDef() &&
+ funcName==yyextra->currentMemberDef->localName() &&
+ yyextra->currentMemberDef->getDefLine()==yyextra->yyLineNr &&
+ generateClassMemberLink(yyscanner,ol,yyextra->currentMemberDef,funcName)
)
{
// special case where funcName is the name of a method that is also
// defined on this line. In this case we can directly link to
- // g_currentMemberDef, which is not only faster, but
+ // yyextra->currentMemberDef, which is not only faster, but
// in case of overloaded methods, this will make sure that we link to
// the correct method, and thereby get the correct reimplemented relations.
// See also bug 549022.
@@ -1381,49 +3359,50 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
funcWithFullScope = locScope+"::"+funcWithScope;
}
}
- if (!fullScope.isEmpty() && (ccd=g_codeClassSDict->find(fullScope)))
+ if (!fullScope.isEmpty() && (ccd=yyextra->codeClassSDict->find(fullScope)))
{
- //printf("using classScope %s\n",g_classScope.data());
+ //printf("using classScope %s\n",yyextra->classScope.data());
if (ccd->baseClasses())
{
BaseClassListIterator bcli(*ccd->baseClasses());
for ( ; bcli.current() ; ++bcli)
{
- if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName))
+ if (getLink(yyscanner,bcli.current()->classDef->name(),locFunc,ol,funcName))
{
goto exit;
}
}
}
}
- if (!locScope.isEmpty() && fullScope!=locScope && (ccd=g_codeClassSDict->find(locScope)))
+ if (!locScope.isEmpty() && fullScope!=locScope && (ccd=yyextra->codeClassSDict->find(locScope)))
{
- //printf("using classScope %s\n",g_classScope.data());
+ //printf("using classScope %s\n",yyextra->classScope.data());
if (ccd->baseClasses())
{
BaseClassListIterator bcli(*ccd->baseClasses());
for ( ; bcli.current() ; ++bcli)
{
- if (getLink(bcli.current()->classDef->name(),funcWithScope,ol,funcName))
+ if (getLink(yyscanner,bcli.current()->classDef->name(),funcWithScope,ol,funcName))
{
goto exit;
}
}
}
}
- if (!getLink(locScope,funcWithScope,ol,funcName))
+ if (!getLink(yyscanner,locScope,funcWithScope,ol,funcName))
{
- generateClassOrGlobalLink(ol,funcName);
+ generateClassOrGlobalLink(yyscanner,ol,funcName);
}
exit:
- g_forceTagReference.resize(0);
+ yyextra->forceTagReference.resize(0);
return;
}
/*! counts the number of lines in the input */
-static int countLines()
+static int countLines(yyscan_t yyscanner)
{
- const char *p=g_inputString;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ const char *p=yyextra->inputString;
char c;
int count=1;
while ((c=*p))
@@ -1431,37 +3410,40 @@ static int countLines()
p++ ;
if (c=='\n') count++;
}
- if (p>g_inputString && *(p-1)!='\n')
+ if (p>yyextra->inputString && *(p-1)!='\n')
{ // last line does not end with a \n, so we add an extra
// line and explicitly terminate the line after parsing.
count++,
- g_needsTermination=TRUE;
+ yyextra->needsTermination=TRUE;
}
return count;
}
-static void endFontClass()
+static void endFontClass(yyscan_t yyscanner)
{
- if (g_currentFontClass)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->currentFontClass)
{
- g_code->endFontClass();
- g_currentFontClass=0;
+ yyextra->code->endFontClass();
+ yyextra->currentFontClass=0;
}
}
-static void startFontClass(const char *s)
+static void startFontClass(yyscan_t yyscanner,const char *s)
{
- endFontClass();
- g_code->startFontClass(s);
- g_currentFontClass=s;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ endFontClass(yyscanner);
+ yyextra->code->startFontClass(s);
+ yyextra->currentFontClass=s;
}
//----------------------------------------------------------------------------
// recursively writes a linkified Objective-C method call
-static void writeObjCMethodCall(ObjCCallCtx *ctx)
+static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
{
if (ctx==0) return;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
char c;
const char *p = ctx->format.data();
if (!ctx->methodName.isEmpty())
@@ -1472,22 +3454,22 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
//printf("Looking for object=%s method=%s\n",ctx->objectTypeOrName.data(),
// ctx->methodName.data());
- ClassDef *cd = g_theVarContext.findVariable(ctx->objectTypeOrName);
+ ClassDef *cd = yyextra->theVarContext.findVariable(ctx->objectTypeOrName);
if (cd==0) // not a local variable
{
if (ctx->objectTypeOrName=="self")
{
- if (g_currentDefinition &&
- g_currentDefinition->definitionType()==Definition::TypeClass)
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ctx->objectType = dynamic_cast<ClassDef *>(g_currentDefinition);
+ ctx->objectType = dynamic_cast<ClassDef *>(yyextra->currentDefinition);
}
}
else
{
ctx->objectType = getResolvedClass(
- g_currentDefinition,
- g_sourceFileDef,
+ yyextra->currentDefinition,
+ yyextra->sourceFileDef,
ctx->objectTypeOrName,
&ctx->method);
}
@@ -1500,15 +3482,15 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
else if (ctx->method==0) // search for class variable with the same name
{
//printf(" no\n");
- //printf("g_currentDefinition=%p\n",g_currentDefinition);
- if (g_currentDefinition &&
- g_currentDefinition->definitionType()==Definition::TypeClass)
+ //printf("yyextra->currentDefinition=%p\n",yyextra->currentDefinition);
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ctx->objectVar = (dynamic_cast<ClassDef *>(g_currentDefinition))->getMemberByName(ctx->objectTypeOrName);
+ ctx->objectVar = (dynamic_cast<ClassDef *>(yyextra->currentDefinition))->getMemberByName(ctx->objectTypeOrName);
//printf(" ctx->objectVar=%p\n",ctx->objectVar);
if (ctx->objectVar)
{
- ctx->objectType = stripClassName(ctx->objectVar->typeString());
+ ctx->objectType = stripClassName(yyscanner,ctx->objectVar->typeString(),yyextra->currentDefinition);
//printf(" ctx->objectType=%p\n",ctx->objectType);
if (ctx->objectType && !ctx->methodName.isEmpty())
{
@@ -1539,7 +3521,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
char nc=*p++;
if (nc=='$') // escaped $
{
- g_code->codify("$");
+ yyextra->code->codify("$");
}
else // name fragment or reference to a nested call
{
@@ -1550,20 +3532,20 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
- QCString *pName = g_nameDict.find(refId);
+ QCString *pName = yyextra->nameDict.find(refId);
if (pName)
{
if (ctx->method && ctx->method->isLinkable())
{
- writeMultiLineCodeLink(*g_code,ctx->method,pName->data());
- if (g_currentMemberDef && g_collectXRefs)
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->method,pName->data());
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(ctx->method));
+ addDocCrossReference(yyextra->currentMemberDef,const_cast<MemberDef*>(ctx->method));
}
}
else
{
- codifyLines(pName->data());
+ codifyLines(yyscanner,pName->data());
}
}
else
@@ -1578,15 +3560,15 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
- QCString *pObject = g_objectDict.find(refId);
+ QCString *pObject = yyextra->objectDict.find(refId);
if (pObject)
{
if (*pObject=="self")
{
- if (g_currentDefinition &&
- g_currentDefinition->definitionType()==Definition::TypeClass)
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ctx->objectType = dynamic_cast<ClassDef *>(g_currentDefinition);
+ ctx->objectType = dynamic_cast<ClassDef *>(yyextra->currentDefinition);
if (ctx->objectType->categoryOf())
{
ctx->objectType = ctx->objectType->categoryOf();
@@ -1596,16 +3578,16 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
}
}
- startFontClass("keyword");
- codifyLines(pObject->data());
- endFontClass();
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,pObject->data());
+ endFontClass(yyscanner);
}
else if (*pObject=="super")
{
- if (g_currentDefinition &&
- g_currentDefinition->definitionType()==Definition::TypeClass)
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ClassDef *cd = dynamic_cast<ClassDef *>(g_currentDefinition);
+ ClassDef *cd = dynamic_cast<ClassDef *>(yyextra->currentDefinition);
if (cd->categoryOf())
{
cd = cd->categoryOf();
@@ -1628,16 +3610,16 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
}
}
}
- startFontClass("keyword");
- codifyLines(pObject->data());
- endFontClass();
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,pObject->data());
+ endFontClass(yyscanner);
}
else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
{
- writeMultiLineCodeLink(*g_code,ctx->objectVar,pObject->data());
- if (g_currentMemberDef && g_collectXRefs)
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->objectVar,pObject->data());
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(ctx->objectVar));
+ addDocCrossReference(yyextra->currentMemberDef,const_cast<MemberDef*>(ctx->objectVar));
}
}
else if (ctx->objectType &&
@@ -1646,20 +3628,20 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
) // object is class name
{
const ClassDef *cd = ctx->objectType;
- writeMultiLineCodeLink(*g_code,cd,pObject->data());
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,pObject->data());
}
else // object still needs to be resolved
{
- const ClassDef *cd = getResolvedClass(g_currentDefinition,
- g_sourceFileDef, *pObject);
+ const ClassDef *cd = getResolvedClass(yyextra->currentDefinition,
+ yyextra->sourceFileDef, *pObject);
if (cd && cd->isLinkable())
{
if (ctx->objectType==0) ctx->objectType=cd;
- writeMultiLineCodeLink(*g_code,cd,pObject->data());
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,pObject->data());
}
else
{
- codifyLines(pObject->data());
+ codifyLines(yyscanner,pObject->data());
}
}
}
@@ -1675,10 +3657,10 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
- ObjCCallCtx *ictx = g_contextDict.find(refId);
+ ObjCCallCtx *ictx = yyextra->contextDict.find(refId);
if (ictx) // recurse into nested call
{
- writeObjCMethodCall(ictx);
+ writeObjCMethodCall(yyscanner,ictx);
if (ictx->method) // link to nested call successfully
{
// get the ClassDef representing the method's return type
@@ -1697,7 +3679,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
}
else
{
- ctx->objectType = stripClassName(ictx->method->typeString());
+ ctx->objectType = stripClassName(yyscanner,ictx->method->typeString(),yyextra->currentDefinition);
if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
@@ -1718,10 +3700,10 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
- QCString *pWord = g_wordDict.find(refId);
+ QCString *pWord = yyextra->wordDict.find(refId);
if (pWord)
{
- codifyLines(pWord->data());
+ codifyLines(yyscanner,pWord->data());
}
}
else if (nc=='d') // comment block
@@ -1731,12 +3713,12 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
- QCString *pComment = g_commentDict.find(refId);
+ QCString *pComment = yyextra->commentDict.find(refId);
if (pComment)
{
- startFontClass("comment");
- codifyLines(pComment->data());
- endFontClass();
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,pComment->data());
+ endFontClass(yyscanner);
}
}
else // illegal marker
@@ -1749,7 +3731,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
char s[2];
s[0]=c;s[1]=0;
- codifyLines(s);
+ codifyLines(yyscanner,s);
}
}
//printf("%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data());
@@ -1760,46 +3742,51 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
// Replaces an Objective-C method name fragment s by a marker of the form
// $n12, the number (12) can later be used as a key for obtaining the name
-// fragment, from g_nameDict
-static QCString escapeName(const char *s)
+// fragment, from yyextra->nameDict
+static QCString escapeName(yyscan_t yyscanner,const char *s)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString result;
- result.sprintf("$n%d",g_currentNameId);
- g_nameDict.insert(g_currentNameId,new QCString(s));
- g_currentNameId++;
+ result.sprintf("$n%d",yyextra->currentNameId);
+ yyextra->nameDict.insert(yyextra->currentNameId,new QCString(s));
+ yyextra->currentNameId++;
return result;
}
-static QCString escapeObject(const char *s)
+static QCString escapeObject(yyscan_t yyscanner,const char *s)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString result;
- result.sprintf("$o%d",g_currentObjId);
- g_objectDict.insert(g_currentObjId,new QCString(s));
- g_currentObjId++;
+ result.sprintf("$o%d",yyextra->currentObjId);
+ yyextra->objectDict.insert(yyextra->currentObjId,new QCString(s));
+ yyextra->currentObjId++;
return result;
}
-static QCString escapeWord(const char *s)
+static QCString escapeWord(yyscan_t yyscanner,const char *s)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString result;
- result.sprintf("$w%d",g_currentWordId);
- g_wordDict.insert(g_currentWordId,new QCString(s));
- g_currentWordId++;
+ result.sprintf("$w%d",yyextra->currentWordId);
+ yyextra->wordDict.insert(yyextra->currentWordId,new QCString(s));
+ yyextra->currentWordId++;
return result;
}
-static QCString escapeComment(const char *s)
+static QCString escapeComment(yyscan_t yyscanner,const char *s)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString result;
- result.sprintf("$d%d",g_currentCommentId);
- g_commentDict.insert(g_currentCommentId,new QCString(s));
- g_currentCommentId++;
+ result.sprintf("$d%d",yyextra->currentCommentId);
+ yyextra->commentDict.insert(yyextra->currentCommentId,new QCString(s));
+ yyextra->currentCommentId++;
return result;
}
-static bool skipLanguageSpecificKeyword(const QCString &kw)
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw)
{
- return g_insideCpp && (kw == "remove" || kw == "set" || kw == "get");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ return yyextra->lang==SrcLangExt_Cpp && (kw == "remove" || kw == "set" || kw == "get");
}
static bool isCastKeyword(const QCString &s)
@@ -1810,1971 +3797,117 @@ static bool isCastKeyword(const QCString &s)
return kw=="const_cast" || kw=="static_cast" || kw=="dynamic_cast" || kw=="reinterpret_cast";
}
-/* -----------------------------------------------------------------
- */
-#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-
-static int yyread(char *buf,int max_size)
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
{
- int c=0;
- while( c < max_size && g_inputString[g_inputPosition] )
- {
- *buf = g_inputString[g_inputPosition++] ;
- c++; buf++;
- }
- return c;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int inputPosition = yyextra->inputPosition;
+ const char *s = yyextra->inputString + yyextra->inputPosition;
+ int c=0;
+ while( c < max_size && *s )
+ {
+ *buf++ = *s++;
+ c++;
+ }
+ yyextra->inputPosition += c;
+ return c;
}
-%}
-
-B [ \t]
-BN [ \t\n\r]
-ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
-SEP ("::"|"\\")
-SCOPENAME ({SEP}{BN}*)?({ID}{BN}*{SEP}{BN}*)*("~"{BN}*)?{ID}
-TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
-SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
-SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
-KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
-KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
-FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally")
-FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try")
-TYPEKW ("bool"|"byte"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
-TYPEKWSL ("LocalObject"|"Object"|"Value")
-CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
-CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
-ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
-ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
-LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
-BITOP "&"|"|"|"^"|"<<"|">>"|"~"
-OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
-RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
-RAWEND ")"[^ \t\(\)\\]{0,16}\"
-
-%option noyywrap
-
-%x SkipString
-%x SkipStringS
-%x SkipVerbString
-%x SkipCPP
-%x SkipComment
-%x SkipCxxComment
-%x RemoveSpecialCComment
-%x StripSpecialCComment
-%x Body
-%x FuncCall
-%x MemberCall
-%x MemberCall2
-%x SkipInits
-%x ClassName
-%x AlignAs
-%x AlignAsEnd
-%x PackageName
-%x ClassVar
-%x CppCliTypeModifierFollowup
-%x Bases
-%x SkipSharp
-%x ReadInclude
-%x TemplDecl
-%x TemplCast
-%x CallEnd
-%x ObjCMethod
-%x ObjCParams
-%x ObjCParamType
-%x ObjCCall
-%x ObjCMName
-%x ObjCSkipStr
-%x ObjCCallComment
-%x OldStyleArgs
-%x UsingName
-%x RawString
-%x InlineInit
-
-%%
-
-<*>\x0d
-<Body>^([ \t]*"#"[ \t]*("include"|"import")[ \t]*)("<"|"\"") {
- startFontClass("preprocessor");
- g_code->codify(yytext);
- BEGIN( ReadInclude );
- }
-<Body>("@interface"|"@implementation"|"@protocol")[ \t\n]+ {
- g_insideObjC=TRUE;
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- if (!g_insideTemplate)
- BEGIN( ClassName );
- }
-<Body>(("public"|"private"){B}+)?("ref"|"value"|"interface"|"enum"){B}+("class"|"struct") {
- if (g_insideTemplate) REJECT;
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- BEGIN( ClassName );
- }
-<Body>"property"|"event"/{BN}* {
- if (g_insideTemplate) REJECT;
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
-<Body>(KEYWORD_CPPCLI_DATATYPE|("partial"{B}+)?"class"|"struct"|"union"|"namespace"|"interface"){B}+ {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- if (!g_insideTemplate)
- BEGIN( ClassName );
- }
-<Body>("package")[ \t\n]+ {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- BEGIN( PackageName );
- }
-<ClassVar>\n {
- if (!g_insideObjC) REJECT;
- codifyLines(yytext);
- BEGIN(Body);
- }
-<Body,ClassVar,Bases>"-"|"+" {
- if (!g_insideObjC || g_insideBody)
- {
- g_code->codify(yytext);
- }
- else // Start of Objective-C method
- {
- //printf("Method!\n");
- g_code->codify(yytext);
- BEGIN(ObjCMethod);
- }
- }
-<ObjCMethod>":" {
- g_code->codify(yytext);
- BEGIN(ObjCParams);
- }
-<ObjCParams>"(" {
- g_code->codify(yytext);
- BEGIN(ObjCParamType);
- }
-<ObjCParams,ObjCMethod>";"|"{" {
- g_code->codify(yytext);
- if (*yytext=='{')
- {
- if (g_searchingForBody)
- {
- g_searchingForBody=FALSE;
- g_insideBody=TRUE;
- }
- if (g_insideBody) g_bodyCurlyCount++;
- if (!g_curClassName.isEmpty()) // valid class name
- {
- pushScope(g_curClassName);
- DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
- g_scopeStack.push(SCOPEBLOCK);
- }
- }
- g_type.resize(0);
- g_name.resize(0);
- BEGIN(Body);
- }
-<ObjCParams>{ID}{B}*":" {
- g_code->codify(yytext);
- }
-<ObjCParamType>{TYPEKW} {
- startFontClass("keywordtype");
- g_code->codify(yytext);
- endFontClass();
- g_parmType=yytext;
- }
-<ObjCParamType>{ID} {
- generateClassOrGlobalLink(*g_code,yytext);
- g_parmType=yytext;
- }
-<ObjCParamType>")" {
- g_code->codify(yytext);
- BEGIN(ObjCParams);
- }
-<ObjCParams>{ID} {
- g_code->codify(yytext);
- g_parmName=yytext;
- g_theVarContext.addVariable(g_parmType,g_parmName);
- g_parmType.resize(0);g_parmName.resize(0);
- }
-<ObjCMethod,ObjCParams,ObjCParamType>{ID} {
- generateClassOrGlobalLink(*g_code,yytext);
- }
-<ObjCMethod,ObjCParams,ObjCParamType>. {
- g_code->codify(yytext);
- }
-<ObjCMethod,ObjCParams,ObjCParamType>\n {
- codifyLines(yytext);
- }
-<ReadInclude>[^\n\"\>]+/(">"|"\"") {
- //FileInfo *f;
- bool ambig;
- bool found=FALSE;
- //QCString absPath = yytext;
- //if (g_sourceFileDef && QDir::isRelativePath(absPath))
- //{
- // absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath);
- //}
- FileDef *fd=findFileDef(Doxygen::inputNameDict,yytext,ambig);
- //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
- if (fd && fd->isLinkable())
- {
- if (ambig) // multiple input files match the name
- {
- //printf("===== yes %s is ambiguous\n",yytext);
- QCString name = QDir::cleanDirPath(yytext).utf8();
- if (!name.isEmpty() && g_sourceFileDef)
- {
- FileName *fn = Doxygen::inputNameDict->find(name);
- if (fn)
- {
- FileNameIterator fni(*fn);
- // for each include name
- for (fni.toFirst();!found && (fd=fni.current());++fni)
- {
- // see if this source file actually includes the file
- found = g_sourceFileDef->isIncluded(fd->absFilePath());
- //printf(" include file %s found=%d\n",fd->absFilePath().data(),found);
- }
- }
- }
- }
- else // not ambiguous
- {
- found = TRUE;
- }
- }
- //printf(" include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found);
- if (found)
- {
- writeMultiLineCodeLink(*g_code,fd,yytext);
- }
- else
- {
- g_code->codify(yytext);
- }
- char c=yyinput();
- QCString text;
- text+=c;
- g_code->codify(text);
- endFontClass();
- BEGIN( Body );
- }
-<Body,Bases>^[ \t]*"#" {
- startFontClass("preprocessor");
- g_lastSkipCppContext = YY_START;
- g_code->codify(yytext);
- BEGIN( SkipCPP ) ;
- }
-<SkipCPP>. {
- g_code->codify(yytext);
- }
-<SkipCPP>[^\n\/\\]+ {
- g_code->codify(yytext);
- }
-<SkipCPP>\\[\r]?\n {
- codifyLines(yytext);
- }
-<SkipCPP>"//" {
- g_code->codify(yytext);
- }
-<Body,FuncCall>"{" {
- g_theVarContext.pushScope();
-
- DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
- g_scopeStack.push(INNERBLOCK);
-
- if (g_searchingForBody)
- {
- g_searchingForBody=FALSE;
- g_insideBody=TRUE;
- }
- g_code->codify(yytext);
- if (g_insideBody)
- {
- g_bodyCurlyCount++;
- }
- g_type.resize(0);
- g_name.resize(0);
- BEGIN( Body );
- }
-<Body,FuncCall,MemberCall,MemberCall2>"}" {
- g_theVarContext.popScope();
- g_type.resize(0);
- g_name.resize(0);
-
- int *scope = g_scopeStack.pop();
- DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
- if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
- {
- popScope();
- }
-
- g_code->codify(yytext);
-
- DBG_CTX((stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount));
- if (--g_bodyCurlyCount<=0)
- {
- g_insideBody=FALSE;
- g_currentMemberDef=0;
- if (g_currentDefinition)
- g_currentDefinition=g_currentDefinition->getOuterScope();
- }
- BEGIN(Body);
- }
-<Body,ClassVar>"@end" {
- //printf("End of objc scope fd=%s\n",g_sourceFileDef->name().data());
- if (g_sourceFileDef)
- {
- FileDef *fd=g_sourceFileDef;
- g_insideObjC = fd->name().lower().right(2)==".m" ||
- fd->name().lower().right(3)==".mm";
- //printf("insideObjC=%d\n",g_insideObjC);
- }
- else
- {
- g_insideObjC = FALSE;
- }
- if (g_insideBody)
- {
- g_theVarContext.popScope();
-
- int *scope = g_scopeStack.pop();
- DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
- if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
- {
- popScope();
- }
- g_insideBody=FALSE;
- }
-
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
-
- g_currentMemberDef=0;
- if (g_currentDefinition)
- g_currentDefinition=g_currentDefinition->getOuterScope();
- BEGIN(Body);
- }
-<ClassName,ClassVar>";" {
- g_code->codify(yytext);
- g_searchingForBody=FALSE;
- BEGIN( Body );
- }
-<ClassName,ClassVar>[*&^%]+ {
- g_type=g_curClassName.copy();
- g_name.resize(0);
- g_code->codify(yytext);
- BEGIN( Body ); // variable of type struct *
- }
-<ClassName>"__declspec"{B}*"("{B}*{ID}{B}*")" {
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- }
-<ClassName>{ID}("."{ID})* |
-<ClassName>{ID}("::"{ID})* {
- if(g_insideCS)
- g_curClassName=substitute(yytext,".","::");
- else
- g_curClassName=yytext;
- addType();
- if (g_curClassName=="alignas")
- {
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- BEGIN( AlignAs );
- }
- else
- {
- generateClassOrGlobalLink(*g_code,yytext);
- BEGIN( ClassVar );
- }
- }
-<AlignAs>"(" {
- g_bracketCount=1;
- g_code->codify(yytext);
- BEGIN( AlignAsEnd );
- }
-<AlignAs>\n { g_yyLineNr++;
- codifyLines(yytext);
- }
-<AlignAs>. { g_code->codify(yytext); }
-<AlignAsEnd>"(" { g_code->codify(yytext);
- g_bracketCount++;
- }
-<AlignAsEnd>")" {
- g_code->codify(yytext);
- if (--g_bracketCount<=0)
- {
- BEGIN(ClassName);
- }
- }
-<AlignAsEnd>\n { g_yyLineNr++;
- codifyLines(yytext);
- }
-<AlignAsEnd>. { g_code->codify(yytext); }
-<ClassName>{ID}("\\"{ID})* { // PHP namespace
- g_curClassName=substitute(yytext,"\\","::");
- g_scopeStack.push(CLASSBLOCK);
- pushScope(g_curClassName);
- addType();
- generateClassOrGlobalLink(*g_code,yytext);
- BEGIN( ClassVar );
- }
-<ClassName>{ID}{B}*"("{ID}")" { // Obj-C category
- g_curClassName=removeRedundantWhiteSpace(yytext);
- g_scopeStack.push(CLASSBLOCK);
- pushScope(g_curClassName);
- addType();
- generateClassOrGlobalLink(*g_code,yytext);
- BEGIN( ClassVar );
- }
-<PackageName>{ID}("."{ID})* {
- g_curClassName=substitute(yytext,".","::");
- //printf("found package: %s\n",g_curClassName.data());
- addType();
- codifyLines(yytext);
- }
-<ClassVar>"=" {
- unput(*yytext);
- BEGIN( Body );
- }
-<ClassVar>("extends"|"implements") { // Java, Slice
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- g_curClassBases.clear();
- BEGIN( Bases );
- }
-<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
- DBG_CTX((stderr,"***** C++/CLI modifier %s on g_curClassName=%s\n",yytext,g_curClassName.data()));
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- BEGIN( CppCliTypeModifierFollowup );
- }
-<ClassVar>{ID} {
- g_type = g_curClassName.copy();
- g_name = yytext;
- if (g_insideBody)
- {
- g_theVarContext.addVariable(g_type,g_name);
- }
- generateClassOrGlobalLink(*g_code,yytext);
- }
-<ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*":"{B}* {
- codifyLines(yytext);
- g_curClassBases.clear();
- BEGIN( Bases );
- }
-<PackageName>[ \t]*";" |
-<Bases>^{B}*/"@"{ID} | // Objective-C interface
-<Bases,ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*"{"{B}* {
- g_theVarContext.pushScope();
- g_code->codify(yytext);
- if (YY_START==ClassVar && g_curClassName.isEmpty())
- {
- g_curClassName = g_name.copy();
- }
- if (g_searchingForBody)
- {
- g_searchingForBody=FALSE;
- g_insideBody=TRUE;
- }
- if (g_insideBody) g_bodyCurlyCount++;
- if (!g_curClassName.isEmpty()) // valid class name
- {
- DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
- g_scopeStack.push(CLASSBLOCK);
- pushScope(g_curClassName);
- DBG_CTX((stderr,"***** g_curClassName=%s\n",g_curClassName.data()));
- if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
- {
- DBG_CTX((stderr,"Adding new class %s\n",g_curClassName.data()));
- ClassDef *ncd=createClassDef("<code>",1,1,
- g_curClassName,ClassDef::Class,0,0,FALSE);
- g_codeClassSDict->append(g_curClassName,ncd);
- // insert base classes.
- char *s=g_curClassBases.first();
- while (s)
- {
- const ClassDef *bcd=g_codeClassSDict->find(s);
- if (bcd==0) bcd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s);
- if (bcd && bcd!=ncd)
- {
- ncd->insertBaseClass(const_cast<ClassDef*>(bcd),s,Public,Normal);
- }
- s=g_curClassBases.next();
- }
- }
- //printf("g_codeClassList.count()=%d\n",g_codeClassList.count());
- }
- else // not a class name -> assume inner block
- {
- DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
- g_scopeStack.push(INNERBLOCK);
- }
- g_curClassName.resize(0);
- g_curClassBases.clear();
- BEGIN( Body );
- }
-<Bases>"virtual"|"public"|"protected"|"private"|"@public"|"@private"|"@protected" {
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- }
-<Bases>{SEP}?({ID}{SEP})*{ID} {
- DBG_CTX((stderr,"%s:addBase(%s)\n",g_curClassName.data(),yytext));
- g_curClassBases.inSort(yytext);
- generateClassOrGlobalLink(*g_code,yytext);
- }
-<Bases>"<" {
- g_code->codify(yytext);
- if (!g_insideObjC)
- {
- g_sharpCount=1;
- BEGIN ( SkipSharp );
- }
- else
- {
- g_insideProtocolList=TRUE;
- }
- }
-<Bases>">" {
- g_code->codify(yytext);
- g_insideProtocolList=FALSE;
- }
-<SkipSharp>"<" {
- g_code->codify(yytext);
- ++g_sharpCount;
- }
-<SkipSharp>">" {
- g_code->codify(yytext);
- if (--g_sharpCount<=0)
- BEGIN ( Bases );
- }
-<SkipSharp>"\"" {
- g_code->codify(yytext);
- g_lastStringContext=YY_START;
- BEGIN(SkipString);
- }
-<SkipSharp>"\'" {
- g_code->codify(yytext);
- g_lastStringContext=YY_START;
- BEGIN(SkipStringS);
- }
-<Bases>"(" {
- g_code->codify(yytext);
- g_sharpCount=1;
- BEGIN ( SkipSharp );
- }
-<SkipSharp>"(" {
- g_code->codify(yytext);
- ++g_sharpCount;
- }
-<SkipSharp>")" {
- g_code->codify(yytext);
- if (--g_sharpCount<=0)
- BEGIN ( Bases );
- }
-
-
-<Bases>"," {
- g_code->codify(yytext);
- }
-
-
-<Body>{SCOPEPREFIX}?"operator"{B}*"()"{B}*/"(" {
- addType();
- generateFunctionLink(*g_code,yytext);
- g_bracketCount=0;
- g_args.resize(0);
- g_name+=yytext;
- BEGIN( FuncCall );
- }
-<Body>{SCOPEPREFIX}?"operator"/"(" {
- addType();
- generateFunctionLink(*g_code,yytext);
- g_bracketCount=0;
- g_args.resize(0);
- g_name+=yytext;
- BEGIN( FuncCall );
- }
-<Body>{SCOPEPREFIX}?"operator"[^a-z_A-Z0-9\(\n]+/"(" {
- addType();
- generateFunctionLink(*g_code,yytext);
- g_bracketCount=0;
- g_args.resize(0);
- g_name+=yytext;
- BEGIN( FuncCall );
- }
-<Body,TemplDecl>("template"|"generic")/([^a-zA-Z0-9]) {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- g_insideTemplate=TRUE;
- g_sharpCount=0;
- }
-<Body>"using"{BN}+"namespace"{BN}+ {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- BEGIN(UsingName);
- }
-<UsingName>{ID}("::"{ID})* { addUsingDirective(yytext);
- generateClassOrGlobalLink(*g_code,yytext);
- DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
- g_scopeStack.push(CLASSBLOCK);
- pushScope(yytext);
- BEGIN(Body);
- }
-<UsingName>\n { codifyLines(yytext); BEGIN(Body); }
-<UsingName>. { codifyLines(yytext); BEGIN(Body); }
-<Body,FuncCall>"$"?"this"("->"|".") { g_code->codify(yytext); // this-> for C++, this. for C#
- g_prefixed_with_this_keyword = TRUE;
- }
-<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
- if (g_insideJava && qstrcmp("internal",yytext) ==0) REJECT;
- if (skipLanguageSpecificKeyword(yytext)) REJECT;
- startFontClass("keyword");
- codifyLines(yytext);
- if (QCString(yytext)=="typedef")
- {
- addType();
- g_name+=yytext;
- }
- endFontClass();
- }
-<Body>{KEYWORD}/{B}* {
- if (skipLanguageSpecificKeyword(yytext)) REJECT;
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
-<Body>{KEYWORD}/{BN}*"(" {
- if (skipLanguageSpecificKeyword(yytext)) REJECT;
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- g_name.resize(0);g_type.resize(0);
- }
-<FuncCall>"in"/{BN}* {
- if (!g_inForEachExpression) REJECT;
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- // insert the variable in the parent scope, see bug 546158
- g_theVarContext.popScope();
- g_theVarContext.addVariable(g_parmType,g_parmName);
- g_theVarContext.pushScope();
- g_name.resize(0);g_type.resize(0);
- }
-<Body>{FLOWKW}/{BN}*"(" {
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- g_name.resize(0);g_type.resize(0);
- g_inForEachExpression = (qstrcmp(yytext,"for each")==0 || qstrcmp(yytext, "foreach")==0);
- BEGIN(FuncCall);
- }
-<Body>{FLOWCONDITION}/{BN}*"(" {
- if (g_currentMemberDef && g_currentMemberDef->isFunction())
- {
- g_currentMemberDef->incrementFlowKeyWordCount();
- }
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- g_name.resize(0);g_type.resize(0);
- g_inForEachExpression = (strcmp(yytext,"for each")==0 || strcmp(yytext, "foreach")==0);
- BEGIN(FuncCall);
- }
-<Body>{FLOWKW}/([^a-z_A-Z0-9]) {
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- if (g_inFunctionTryBlock && (qstrcmp(yytext,"catch")==0 || qstrcmp(yytext,"finally")==0))
- {
- g_inFunctionTryBlock=FALSE;
- }
- }
-<Body>{FLOWCONDITION}/([^a-z_A-Z0-9]) {
- if (g_currentMemberDef && g_currentMemberDef->isFunction())
- {
- g_currentMemberDef->incrementFlowKeyWordCount();
- }
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- if (g_inFunctionTryBlock && (strcmp(yytext,"catch")==0 || strcmp(yytext,"finally")==0))
- {
- g_inFunctionTryBlock=FALSE;
- }
- }
-<Body>{FLOWKW}/{B}* {
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- }
-<Body>{FLOWCONDITION}/{B}* {
- if (g_currentMemberDef && g_currentMemberDef->isFunction())
- {
- g_currentMemberDef->incrementFlowKeyWordCount();
- }
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- }
-<Body>"*"{B}*")" { // end of cast?
- g_code->codify(yytext);
- g_theCallContext.popScope(g_name, g_type);
- g_bracketCount--;
- g_parmType = g_name;
- BEGIN(FuncCall);
- }
-<Body>[\\|\)\+\-\/\%\~\!] {
- g_code->codify(yytext);
- g_name.resize(0);g_type.resize(0);
- if (*yytext==')')
- {
- g_theCallContext.popScope(g_name, g_type);
- g_bracketCount--;
- BEGIN(FuncCall);
- }
- }
-<Body,TemplDecl,ObjCMethod>{TYPEKW}/{B}* {
- startFontClass("keywordtype");
- g_code->codify(yytext);
- endFontClass();
- addType();
- g_name+=yytext;
- }
-<Body,TemplDecl,ObjCMethod>{TYPEKWSL}/{B}* {
- if (!g_insideSlice)
- {
- REJECT;
- }
- else
- {
- startFontClass("keywordtype");
- g_code->codify(yytext);
- endFontClass();
- addType();
- g_name+=yytext;
- }
- }
-<Body>"generic"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* {
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- g_sharpCount=0;
- BEGIN(TemplDecl);
- }
-<Body>"template"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* { // template<...>
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- g_sharpCount=0;
- BEGIN(TemplDecl);
- }
-<TemplDecl>"class"|"typename" {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
-<TemplDecl>"<" {
- g_code->codify(yytext);
- g_sharpCount++;
- }
-<TemplDecl>">" {
- g_code->codify(yytext);
- g_sharpCount--;
- if (g_sharpCount<=0)
- {
- BEGIN(Body);
- }
- }
-<TemplCast>">" {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- BEGIN( g_lastTemplCastContext );
- }
-<TemplCast>{ID}("::"{ID})* {
- generateClassOrGlobalLink(*g_code,yytext);
- }
-<TemplCast>("const"|"volatile"){B}* {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
-<TemplCast>[*^]* {
- codifyLines(yytext);
- }
-<Body,MemberCall2,FuncCall>{CASTKW}{B}*"<" { // static_cast<T>(
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- g_lastTemplCastContext = YY_START;
- BEGIN(TemplCast);
- }
-<Body>"$this->"{SCOPENAME}/{BN}*[;,)\]] { // PHP member variable
- addType();
- generatePHPVariableLink(*g_code,yytext);
- g_name+=yytext+7;
- }
-<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>\(]*">"("::"{ID})*/{B}* { // A<T> *pt;
- if (isCastKeyword(yytext) && YY_START==Body)
- {
- REJECT;
- }
- addType();
- generateClassOrGlobalLink(*g_code,yytext);
- g_name+=yytext;
- }
-<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
- addType();
- // changed this to generateFunctionLink, see bug 624514
- //generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE);
- generateFunctionLink(*g_code,yytext);
- g_name+=yytext;
- }
-<Body>{SCOPENAME}/{B}* { // p->func()
- addType();
- generateClassOrGlobalLink(*g_code,yytext);
- g_name+=yytext;
- }
-<Body>"("{B}*("*"{B}*)+{SCOPENAME}*{B}*")"/{B}* { // (*p)->func() but not "if (p) ..."
- g_code->codify(yytext);
- int s=0;while (s<(int)yyleng && !isId(yytext[s])) s++;
- int e=(int)yyleng-1;while (e>=0 && !isId(yytext[e])) e--;
- QCString varname = ((QCString)yytext).mid(s,e-s+1);
- addType();
- g_name=varname;
- }
-<Body>{SCOPETNAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"/{BN}*"(" |
-<Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a() or A\B\foo()
- if (isCastKeyword(yytext))
- {
- REJECT;
- }
- addType();
- generateFunctionLink(*g_code,yytext);
- g_bracketCount=0;
- g_args.resize(0);
- g_name+=yytext;
- BEGIN( FuncCall );
- }
-<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>{RAWBEGIN} {
- QCString text=yytext;
- int i=text.find('R');
- g_code->codify(text.left(i+1));
- startFontClass("stringliteral");
- g_code->codify(yytext+i+1);
- g_lastStringContext=YY_START;
- g_inForEachExpression = FALSE;
- g_delimiter = yytext+i+2;
- g_delimiter=g_delimiter.left(g_delimiter.length()-1);
- BEGIN( RawString );
- }
-<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>\" {
- startFontClass("stringliteral");
- g_code->codify(yytext);
- g_lastStringContext=YY_START;
- g_inForEachExpression = FALSE;
- BEGIN( SkipString );
- }
-<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>\' {
- startFontClass("stringliteral");
- g_code->codify(yytext);
- g_lastStringContext=YY_START;
- g_inForEachExpression = FALSE;
- BEGIN( SkipStringS );
- }
-<SkipString>[^\"\\\r\n]* {
- g_code->codify(yytext);
- }
-<SkipStringS>[^\'\\\r\n]* {
- g_code->codify(yytext);
- }
-<SkipString,SkipStringS>"//"|"/*" {
- g_code->codify(yytext);
- }
-<SkipString>@?\" {
- g_code->codify(yytext);
- endFontClass();
- BEGIN( g_lastStringContext );
- }
-<SkipStringS>\' {
- g_code->codify(yytext);
- endFontClass();
- BEGIN( g_lastStringContext );
- }
-<SkipString,SkipStringS>\\. {
- g_code->codify(yytext);
- }
-<RawString>{RAWEND} {
- g_code->codify(yytext);
- QCString delimiter = yytext+1;
- delimiter=delimiter.left(delimiter.length()-1);
- if (delimiter==g_delimiter)
- {
- BEGIN( g_lastStringContext );
- }
- }
-<RawString>[^)\n]+ { g_code->codify(yytext); }
-<RawString>. { g_code->codify(yytext); }
-<RawString>\n { codifyLines(yytext); }
-<SkipVerbString>[^"\n]+ {
- g_code->codify(yytext);
- }
-<SkipVerbString>\"\" { // escaped quote
- g_code->codify(yytext);
- }
-<SkipVerbString>\" { // end of string
- g_code->codify(yytext);
- endFontClass();
- BEGIN( g_lastVerbStringContext );
- }
-<SkipVerbString>. {
- g_code->codify(yytext);
- }
-<SkipVerbString>\n {
- codifyLines(yytext);
- }
-<Body>":" {
- g_code->codify(yytext);
- g_name.resize(0);g_type.resize(0);
- }
-<Body>"<" {
- if (g_insideTemplate)
- {
- g_sharpCount++;
- }
- g_code->codify(yytext);
- }
-<Body>">" {
- if (g_insideTemplate)
- {
- if (--g_sharpCount<=0)
- {
- g_insideTemplate=FALSE;
- }
- }
- g_code->codify(yytext);
- }
-<Body,MemberCall,MemberCall2,FuncCall>"'"((\\0[Xx0-9]+)|(\\.)|(.))"'" {
- startFontClass("charliteral");
- g_code->codify(yytext);
- endFontClass();
- }
-<Body>"."|"->" {
- if (yytext[0]=='-') // -> could be overloaded
- {
- updateCallContextForSmartPointer();
- }
- g_code->codify(yytext);
- g_memCallContext = YY_START;
- BEGIN( MemberCall );
- }
-<MemberCall>{SCOPETNAME}/{BN}*"(" {
- if (g_theCallContext.getScope())
- {
- if (!generateClassMemberLink(*g_code,g_theCallContext.getScope(),yytext))
- {
- g_code->codify(yytext);
- addToSearchIndex(yytext);
- }
- g_name.resize(0);
- }
- else
- {
- g_code->codify(yytext);
- addToSearchIndex(yytext);
- g_name.resize(0);
- }
- g_type.resize(0);
- if (g_memCallContext==Body)
- {
- BEGIN(FuncCall);
- }
- else
- {
- BEGIN(g_memCallContext);
- }
- }
-<MemberCall>{SCOPENAME}/{B}* {
- if (g_theCallContext.getScope())
- {
- DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getScope()));
- if (!generateClassMemberLink(*g_code,g_theCallContext.getScope(),yytext))
- {
- g_code->codify(yytext);
- addToSearchIndex(yytext);
- }
- g_name.resize(0);
- }
- else
- {
- DBG_CTX((stderr,"no class context!\n"));
- g_code->codify(yytext);
- addToSearchIndex(yytext);
- g_name.resize(0);
- }
- g_type.resize(0);
- BEGIN(g_memCallContext);
- }
-<Body>[,=;\[] {
- if (g_insideObjC && *yytext=='[')
- {
- //printf("Found start of ObjC call!\n");
- // start of a method call
- g_contextDict.setAutoDelete(TRUE);
- g_nameDict.setAutoDelete(TRUE);
- g_objectDict.setAutoDelete(TRUE);
- g_wordDict.setAutoDelete(TRUE);
- g_commentDict.setAutoDelete(TRUE);
- g_contextDict.clear();
- g_nameDict.clear();
- g_objectDict.clear();
- g_wordDict.clear();
- g_commentDict.clear();
- g_currentCtxId = 0;
- g_currentNameId = 0;
- g_currentObjId = 0;
- g_currentCtx = 0;
- g_braceCount = 0;
- unput('[');
- BEGIN(ObjCCall);
- }
- else
- {
- g_code->codify(yytext);
- g_saveName = g_name.copy();
- g_saveType = g_type.copy();
- if (*yytext!='[' && !g_type.isEmpty())
- {
- //printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom());
- //if (g_scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
- {
- //printf("AddVariable: '%s' '%s' context=%d\n",
- // g_type.data(),g_name.data(),g_theVarContext.count());
- g_theVarContext.addVariable(g_type,g_name);
- }
- g_name.resize(0);
- }
- if (*yytext==';' || *yytext=='=')
- {
- g_type.resize(0);
- g_name.resize(0);
- }
- else if (*yytext=='[')
- {
- g_theCallContext.pushScope(g_name, g_type);
- }
- g_args.resize(0);
- g_parmType.resize(0);
- g_parmName.resize(0);
- }
- }
- /*
-<ObjCMemberCall>{ID} {
- if (qstrcmp(yytext,"self")==0 || qstrcmp(yytext,"super")==0)
- {
- // TODO: get proper base class for "super"
- g_theCallContext.setClass(getClass(g_curClassName));
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- }
- else
- {
- generateClassOrGlobalLink(*g_code,yytext);
- }
- g_name.resize(0);
- BEGIN(ObjCMemberCall2);
- }
-<ObjCMemberCall>"[" {
- g_code->codify(yytext);
- g_theCallContext.pushScope(g_name, g_type);
- }
-<ObjCMemberCall2>{ID}":"? {
- g_name+=yytext;
- if (g_theCallContext.getClass())
- {
- //printf("Calling method %s\n",g_name.data());
- if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),g_name))
- {
- g_code->codify(yytext);
- addToSearchIndex(g_name);
- }
- }
- else
- {
- g_code->codify(yytext);
- addToSearchIndex(g_name);
- }
- g_name.resize(0);
- BEGIN(ObjCMemberCall3);
- }
-<ObjCMemberCall2,ObjCMemberCall3>"]" {
- g_theCallContext.popScope(g_name, g_type);
- g_code->codify(yytext);
- BEGIN(Body);
- }
- */
-<ObjCCall,ObjCMName>"["|"{" {
- saveObjCContext();
- g_currentCtx->format+=*yytext;
- BEGIN(ObjCCall);
- //printf("open\n");
- }
-<ObjCCall,ObjCMName>"]"|"}" {
- g_currentCtx->format+=*yytext;
- restoreObjCContext();
- BEGIN(ObjCMName);
- if (g_currentCtx==0)
- {
- // end of call
- writeObjCMethodCall(g_contextDict.find(0));
- BEGIN(Body);
- }
- //printf("close\n");
- }
-<ObjCCall,ObjCMName>"//".* {
- g_currentCtx->format+=escapeComment(yytext);
- }
-<ObjCCall,ObjCMName>"/*" {
- g_lastObjCCallContext = YY_START;
- g_currentCtx->comment=yytext;
- BEGIN(ObjCCallComment);
- }
-<ObjCCallComment>"*/" {
- g_currentCtx->comment+=yytext;
- g_currentCtx->format+=escapeComment(g_currentCtx->comment);
- BEGIN(g_lastObjCCallContext);
- }
-<ObjCCallComment>[^*\n]+ { g_currentCtx->comment+=yytext; }
-<ObjCCallComment>"//"|"/*" { g_currentCtx->comment+=yytext; }
-<ObjCCallComment>\n { g_currentCtx->comment+=*yytext; }
-<ObjCCallComment>. { g_currentCtx->comment+=*yytext; }
-<ObjCCall>{ID} {
- g_currentCtx->format+=escapeObject(yytext);
- if (g_braceCount==0)
- {
- g_currentCtx->objectTypeOrName=yytext;
- //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data());
- BEGIN(ObjCMName);
- }
- }
-<ObjCMName>{ID}/{BN}*"]" {
- if (g_braceCount==0 &&
- g_currentCtx->methodName.isEmpty())
- {
- g_currentCtx->methodName=yytext;
- g_currentCtx->format+=escapeName(yytext);
- }
- else
- {
- g_currentCtx->format+=escapeWord(yytext);
- }
- }
-<ObjCMName>{ID}/{BN}*":" {
- if (g_braceCount==0)
- {
- g_currentCtx->methodName+=yytext;
- g_currentCtx->methodName+=":";
- }
- g_currentCtx->format+=escapeName(yytext);
- }
-<ObjCSkipStr>[^\n\"$\\]* { g_currentCtx->format+=yytext; }
-<ObjCSkipStr>\\. { g_currentCtx->format+=yytext; }
-<ObjCSkipStr>"\"" { g_currentCtx->format+=yytext;
- BEGIN(g_lastStringContext);
- }
-<ObjCCall,ObjCMName>{CHARLIT} { g_currentCtx->format+=yytext; }
-<ObjCCall,ObjCMName>"@"?"\"" { g_currentCtx->format+=yytext;
- g_lastStringContext=YY_START;
- BEGIN(ObjCSkipStr);
- }
-<ObjCCall,ObjCMName,ObjCSkipStr>"$" { g_currentCtx->format+="$$"; }
-<ObjCCall,ObjCMName>"(" { g_currentCtx->format+=*yytext; g_braceCount++; }
-<ObjCCall,ObjCMName>")" { g_currentCtx->format+=*yytext; g_braceCount--; }
-<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#)
- g_currentCtx->format+=yytext;
- }
-<ObjCCall,ObjCMName,ObjCSkipStr>{ID} { g_currentCtx->format+=escapeWord(yytext); }
-<ObjCCall,ObjCMName,ObjCSkipStr>. { g_currentCtx->format+=*yytext; }
-<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; }
-
-<Body>"]" {
- g_theCallContext.popScope(g_name, g_type);
- g_code->codify(yytext);
- // TODO: nested arrays like: a[b[0]->func()]->func()
- g_name = g_saveName.copy();
- g_type = g_saveType.copy();
- }
-<Body>[0-9]+ {
- g_code->codify(yytext);
- }
-<Body>[0-9]+[xX][0-9A-Fa-f]+ {
- g_code->codify(yytext);
- }
-<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
- //addParmType();
- //g_parmName=yytext;
- if (skipLanguageSpecificKeyword(yytext)) REJECT;
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- }
-<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKW}/([^a-z_A-Z0-9]) {
- addParmType();
- g_parmName=yytext;
- startFontClass("keywordtype");
- g_code->codify(yytext);
- endFontClass();
- }
-<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKWSL}/([^a-z_A-Z0-9]) {
- if (!g_insideSlice)
- {
- REJECT;
- }
- else
- {
- addParmType();
- g_parmName=yytext;
- startFontClass("keywordtype");
- g_code->codify(yytext);
- endFontClass();
- }
- }
-<MemberCall2,FuncCall>{FLOWKW}/([^a-z_A-Z0-9]) {
- addParmType();
- g_parmName=yytext;
- startFontClass("keywordflow");
- g_code->codify(yytext);
- endFontClass();
- }
-<MemberCall2,FuncCall>{FLOWCONDITION}/([^a-z_A-Z0-9]) {
- if (g_currentMemberDef && g_currentMemberDef->isFunction())
- {
- g_currentMemberDef->incrementFlowKeyWordCount();
- }
- addParmType();
- g_parmName=yytext;
- startFontClass("keywordflow");
- g_code->codify(yytext);
- endFontClass();
- }
-<MemberCall2,FuncCall>{ID}(({B}*"<"[^\n\[\](){}<>]*">")?({B}*"::"{B}*{ID})?)* {
- if (isCastKeyword(yytext))
- {
- REJECT;
- }
- addParmType();
- g_parmName=yytext;
- generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
- }
-<FuncCall>";" { // probably a cast, not a function call
- g_code->codify(yytext);
- g_inForEachExpression = FALSE;
- BEGIN( Body );
- }
-<MemberCall2,FuncCall>, {
- g_code->codify(yytext);
- g_theVarContext.addVariable(g_parmType,g_parmName);
- g_parmType.resize(0);g_parmName.resize(0);
- }
-<MemberCall2,FuncCall>"{" {
- if (g_bracketCount>0)
- {
- g_code->codify(yytext);
- g_skipInlineInitContext=YY_START;
- g_curlyCount=0;
- BEGIN(InlineInit);
- }
- else
- {
- REJECT;
- }
- }
-<InlineInit>"{" { g_curlyCount++;
- g_code->codify(yytext);
- }
-<InlineInit>"}" {
- g_code->codify(yytext);
- if (--g_curlyCount<=0)
- {
- BEGIN(g_skipInlineInitContext);
- }
- }
-<InlineInit>\n {
- codifyLines(yytext);
- }
-<InlineInit>. {
- g_code->codify(yytext);
- }
-<MemberCall2,FuncCall>"(" {
- g_parmType.resize(0);g_parmName.resize(0);
- g_code->codify(yytext);
- g_bracketCount++;
- g_theCallContext.pushScope(g_name, g_type);
- if (YY_START==FuncCall && !g_insideBody)
- {
- g_theVarContext.pushScope();
- }
- }
-<MemberCall2,FuncCall>{OPERATOR} { // operator
- if (qstrcmp(yytext,"*") &&
- qstrcmp(yytext,"&") &&
- qstrcmp(yytext,"^") &&
- qstrcmp(yytext,"%")) // typically a pointer or reference
- {
- // not a * or &, or C++/CLI's ^ or %
- g_parmType.resize(0);g_parmName.resize(0);
- }
- g_code->codify(yytext);
- }
-<MemberCall,MemberCall2,FuncCall>("*"{B}*)?")" {
- if (yytext[0]==')') // no a pointer cast
- {
- //printf("addVariable(%s,%s)\n",g_parmType.data(),g_parmName.data());
- if (g_parmType.isEmpty())
- {
- g_parmType=g_parmName;
- g_parmName.resize(0);
- }
- g_theVarContext.addVariable(g_parmType,g_parmName);
- }
- else
- {
- g_parmType = g_parmName;
- g_parmName.resize(0);
- g_theVarContext.addVariable(g_parmType,g_parmName);
- }
- g_theCallContext.popScope(g_name, g_type);
- g_inForEachExpression = FALSE;
- //g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b().
- g_code->codify(yytext);
- if (--g_bracketCount<=0)
- {
- if (g_name.isEmpty())
- {
- BEGIN( Body );
- }
- else
- {
- BEGIN( CallEnd );
- }
- }
- }
-<CallEnd>[ \t\n]* { codifyLines(yytext); }
- /*
-<MemberCall2,FuncCall>")"[ \t\n]*[;:] {
- */
-<CallEnd>[;:] {
- codifyLines(yytext);
- g_bracketCount=0;
- if (*yytext==';') g_searchingForBody=FALSE;
- if (!g_type.isEmpty())
- {
- DBG_CTX((stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data()));
- g_theVarContext.addVariable(g_type,g_name);
- }
- g_parmType.resize(0);g_parmName.resize(0);
- g_theCallContext.setScope(0);
- if (*yytext==';' || g_insideBody)
- {
- if (!g_insideBody)
- {
- g_theVarContext.popScope();
- }
- g_name.resize(0);g_type.resize(0);
- BEGIN( Body );
- }
- else
- {
- g_bracketCount=0;
- BEGIN( SkipInits );
- }
- }
-<CallEnd>("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"sealed"|"override"))*/{BN}*(";"|"="|"throw"{BN}*"(") {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
-<CallEnd,OldStyleArgs>("const"|"volatile"|"sealed"|"override")*({BN}+("const"|"volatile"|"sealed"|"override"))*{BN}*"{" {
- if (g_insideBody)
- {
- g_theVarContext.pushScope();
- }
- g_theVarContext.addVariable(g_parmType,g_parmName);
- //g_theCallContext.popScope(g_name, g_type);
- g_parmType.resize(0);g_parmName.resize(0);
- int index = g_name.findRev("::");
- DBG_CTX((stderr,"g_name=%s\n",g_name.data()));
- if (index!=-1)
- {
- QCString scope = g_name.left(index);
- if (!g_classScope.isEmpty()) scope.prepend(g_classScope+"::");
- const ClassDef *cd=getResolvedClass(Doxygen::globalScope,g_sourceFileDef,scope);
- if (cd)
- {
- setClassScope(cd->name());
- g_scopeStack.push(SCOPEBLOCK);
- DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
- }
- else
- {
- //setClassScope(g_realScope);
- g_scopeStack.push(INNERBLOCK);
- DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
- }
- }
- else
- {
- DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
- g_scopeStack.push(INNERBLOCK);
- }
- yytext[yyleng-1]='\0';
- QCString cv(yytext);
- if (!cv.stripWhiteSpace().isEmpty())
- {
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
- }
- else // just whitespace
- {
- codifyLines(yytext);
- }
- g_code->codify("{");
- if (g_searchingForBody)
- {
- g_searchingForBody=FALSE;
- g_insideBody=TRUE;
- }
- if (g_insideBody) g_bodyCurlyCount++;
- g_type.resize(0); g_name.resize(0);
- BEGIN( Body );
- }
-<CallEnd>"try" { // function-try-block
- startFontClass("keyword");
- g_code->codify(yytext);
- endFontClass();
- g_inFunctionTryBlock=TRUE;
- }
-<CallEnd>{ID} {
- if (g_insideBody || !g_parmType.isEmpty())
- {
- REJECT;
- }
- // could be K&R style definition
- addParmType();
- g_parmName=yytext;
- generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
- BEGIN(OldStyleArgs);
- }
-<OldStyleArgs>{ID} {
- addParmType();
- g_parmName=yytext;
- generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
- }
-<OldStyleArgs>[,;] {
- g_code->codify(yytext);
- g_theVarContext.addVariable(g_parmType,g_parmName);
- if (*yytext==';') g_parmType.resize(0);
- g_parmName.resize(0);
- }
-<CallEnd,OldStyleArgs>"#" {
- startFontClass("preprocessor");
- g_lastSkipCppContext = Body;
- g_code->codify(yytext);
- BEGIN( SkipCPP );
- }
-<CallEnd>. {
- unput(*yytext);
- if (!g_insideBody)
- {
- g_theVarContext.popScope();
- }
- g_name.resize(0);g_args.resize(0);
- g_parmType.resize(0);g_parmName.resize(0);
- BEGIN( Body );
- }
-<SkipInits>";" {
- g_code->codify(yytext);
- g_type.resize(0); g_name.resize(0);
- BEGIN( Body );
- }
-<SkipInits>"{" {
- g_code->codify(yytext);
- if (g_searchingForBody)
- {
- g_searchingForBody=FALSE;
- g_insideBody=TRUE;
- }
- if (g_insideBody) g_bodyCurlyCount++;
- if (g_name.find("::")!=-1)
- {
- DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
- g_scopeStack.push(SCOPEBLOCK);
- setClassScope(g_realScope);
- }
- else
- {
- DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
- g_scopeStack.push(INNERBLOCK);
- }
- g_type.resize(0); g_name.resize(0);
- BEGIN( Body );
- }
-<SkipInits>{ID} {
- generateClassOrGlobalLink(*g_code,yytext);
- }
-<FuncCall>{ID}/"(" {
- generateFunctionLink(*g_code,yytext);
- }
-<FuncCall>{ID}/("."|"->") {
- g_name=yytext;
- generateClassOrGlobalLink(*g_code,yytext);
- BEGIN( MemberCall2 );
- }
-<FuncCall,MemberCall2>("("{B}*("*"{B}*)+{ID}*{B}*")"{B}*)/("."|"->") {
- g_code->codify(yytext);
- int s=0;while (!isId(yytext[s])) s++;
- int e=(int)yyleng-1;while (!isId(yytext[e])) e--;
- g_name=((QCString)yytext).mid(s,e-s+1);
- BEGIN( MemberCall2 );
- }
-<MemberCall2>{ID}/([ \t\n]*"(") {
- if (!g_args.isEmpty())
- generateMemberLink(*g_code,g_args,yytext);
- else
- generateClassOrGlobalLink(*g_code,yytext);
- g_args.resize(0);
- BEGIN( FuncCall );
- }
-<MemberCall2>{ID}/([ \t\n]*("."|"->")) {
- //g_code->codify(yytext);
- g_name=yytext;
- generateClassOrGlobalLink(*g_code,yytext);
- BEGIN( MemberCall2 );
- }
-<MemberCall2>"->"|"." {
- if (yytext[0]=='-') // -> could be overloaded
- {
- updateCallContextForSmartPointer();
- }
- g_code->codify(yytext);
- g_memCallContext = YY_START;
- BEGIN( MemberCall );
- }
-<SkipComment>"/*"("!"?)"*/" {
- g_code->codify(yytext);
- endFontClass();
- BEGIN( g_lastCContext ) ;
- }
-<SkipComment>"//"|"/*" {
- g_code->codify(yytext);
- }
-<SkipComment>[^*/\n]+ {
- g_code->codify(yytext);
- }
-<SkipComment>[ \t]*"*/" {
- g_code->codify(yytext);
- endFontClass();
- if (g_lastCContext==SkipCPP)
- {
- startFontClass("preprocessor");
- }
- BEGIN( g_lastCContext ) ;
- }
-<SkipCxxComment>[^\r\n]*"\\"[\r]?\n { // line continuation
- codifyLines(yytext);
- }
-<SkipCxxComment>[^\r\n]+ {
- g_code->codify(yytext);
- }
-<SkipCxxComment>\r
-<SkipCxxComment>\n {
- unput('\n');
- endFontClass();
- BEGIN( g_lastCContext ) ;
- }
-<SkipCxxComment>. {
- g_code->codify(yytext);
- }
-<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)?{B}*"/*"[*!]/[^/*] {
- g_yyLineNr+=QCString(yytext).contains('\n');
- }
-<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)? {
- g_yyLineNr+=QCString(yytext).contains('\n');
- nextCodeLine();
- if (g_lastSpecialCContext==SkipCxxComment)
- { // force end of C++ comment here
- endFontClass();
- BEGIN( g_lastCContext ) ;
- }
- else
- {
- BEGIN(g_lastSpecialCContext);
- }
- }
-<RemoveSpecialCComment>"*/" {
- BEGIN(g_lastSpecialCContext);
- }
-<RemoveSpecialCComment>[^*\n]+
-<RemoveSpecialCComment>"//"|"/*"
-<RemoveSpecialCComment>\n { g_yyLineNr++; }
-<RemoveSpecialCComment>.
-<MemberCall>[^a-z_A-Z0-9(\n] {
- g_code->codify(yytext);
- g_type.resize(0);
- g_name.resize(0);
- BEGIN(g_memCallContext);
- }
-<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
- if (YY_START==SkipCPP) REJECT;
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- g_yyLineNr+=((QCString)yytext).contains('\n');
- nextCodeLine();
- }
- else
- {
- startFontClass("comment");
- codifyLines(yytext);
- endFontClass();
- }
- if (YY_START==SkipCxxComment)
- {
- endFontClass();
- BEGIN( g_lastCContext ) ;
- }
- }
-<SkipCPP>\n/.*\n {
- endFontClass();
- codifyLines(yytext);
- BEGIN( g_lastSkipCppContext ) ;
- }
-<*>\n{B}*"//@"[{}].*\n { // remove one-line group marker
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- g_yyLineNr+=2;
- nextCodeLine();
- }
- else
- {
- startFontClass("comment");
- codifyLines(yytext);
- endFontClass();
- }
- if (YY_START==SkipCxxComment)
- {
- endFontClass();
- BEGIN( g_lastCContext ) ;
- }
- }
-<*>\n{B}*"/*@"[{}] { // remove one-line group marker
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- g_yyLineNr++;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- codifyLines(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>^{B}*"//@"[{}].*\n { // remove one-line group marker
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- g_yyLineNr++;
- nextCodeLine();
- }
- else
- {
- startFontClass("comment");
- codifyLines(yytext);
- endFontClass();
- }
- }
-<*>^{B}*"/*@"[{}] { // remove multi-line group marker
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- g_code->codify(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- g_yyLineNr++;
- //nextCodeLine();
- }
- else
- {
- startFontClass("comment");
- codifyLines(yytext);
- endFontClass();
- }
- }
-<*>"//"[!/][^\n]*\n { // strip special one-line comment
- if (YY_START==SkipComment || YY_START==SkipString) REJECT;
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- char c[2]; c[0]='\n'; c[1]=0;
- codifyLines(c);
- }
- else
- {
- startFontClass("comment");
- codifyLines(yytext);
- endFontClass();
- }
- }
-<*>"/*[tag:"[^\]\n]*"]*/"{B}* { // special pattern /*[tag:filename]*/ to force linking to a tag file
- g_forceTagReference=yytext;
- int s=g_forceTagReference.find(':');
- int e=g_forceTagReference.findRev(']');
- g_forceTagReference = g_forceTagReference.mid(s+1,e-s-1);
- }
-<*>\n{B}*"/*"[!*]/[^/*] {
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- g_yyLineNr++;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- codifyLines(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>^{B}*"/**"[*]+/[^/] { // special C "banner" comment block at a new line
- if (Config_getBool(JAVADOC_BANNER) && Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- g_code->codify(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- g_code->codify(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>"/*"[!*]/[^/*] { // special C comment block half way a line
- if (YY_START==SkipString) REJECT;
- if (Config_getBool(STRIP_CODE_COMMENTS))
- {
- if (YY_START != RemoveSpecialCComment) g_lastSpecialCContext = YY_START;
- BEGIN(RemoveSpecialCComment);
- }
- else
- {
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- startFontClass("comment");
- g_code->codify(yytext);
- BEGIN(SkipComment);
- }
- }
-<*>"/*"("!"?)"*/" {
- if (YY_START==SkipString) REJECT;
- if (!Config_getBool(STRIP_CODE_COMMENTS))
- {
- startFontClass("comment");
- g_code->codify(yytext);
- endFontClass();
- }
- }
-<SkipComment>[^\*\n]+ {
- g_code->codify(yytext);
- }
-<*>"/*" {
- startFontClass("comment");
- g_code->codify(yytext);
- // check is to prevent getting stuck in skipping C++ comments
- if (YY_START != SkipComment && YY_START != SkipCxxComment)
- {
- g_lastCContext = YY_START ;
- }
- BEGIN( SkipComment ) ;
- }
-<*>@\" { // C# verbatim string
- startFontClass("stringliteral");
- g_code->codify(yytext);
- g_lastVerbStringContext=YY_START;
- BEGIN(SkipVerbString);
- }
-<*>"//" {
- startFontClass("comment");
- g_code->codify(yytext);
- g_lastCContext = YY_START ;
- BEGIN( SkipCxxComment ) ;
- }
-<*>"("|"[" {
- g_code->codify(yytext);
- g_theCallContext.pushScope(g_name, g_type);
- }
-<*>")"|"]" {
- g_code->codify(yytext);
- g_theCallContext.popScope(g_name, g_type);
- }
-<*>\n {
- g_yyColNr++;
- codifyLines(yytext);
- }
-<*>. {
- g_yyColNr++;
- g_code->codify(yytext);
- }
- /*
-<*>([ \t\n]*"\n"){2,} { // combine multiple blank lines
- //QCString sepLine=yytext;
- //g_code->codify("\n\n");
- //g_yyLineNr+=sepLine.contains('\n');
- //char sepLine[3]="\n\n";
- codifyLines(yytext);
- }
- */
-
-%%
-
-/*@ ----------------------------------------------------------------------------
- */
-
-static void saveObjCContext()
+static void saveObjCContext(yyscan_t yyscanner)
{
- if (g_currentCtx)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->currentCtx)
{
- g_currentCtx->format+=QCString().sprintf("$c%d",g_currentCtxId);
- if (g_braceCount==0 && YY_START==ObjCCall)
+ yyextra->currentCtx->format+=QCString().sprintf("$c%d",yyextra->currentCtxId);
+ if (yyextra->braceCount==0 && YY_START==ObjCCall)
{
- g_currentCtx->objectTypeOrName=g_currentCtx->format.mid(1);
- //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data());
+ yyextra->currentCtx->objectTypeOrName=yyextra->currentCtx->format.mid(1);
+ //printf("new type=%s\n",yyextra->currentCtx->objectTypeOrName.data());
}
- g_contextStack.push(g_currentCtx);
+ yyextra->contextStack.push(yyextra->currentCtx);
}
else
{
//printf("Trying to save NULL context!\n");
}
ObjCCallCtx *newCtx = new ObjCCallCtx;
- newCtx->id = g_currentCtxId;
+ newCtx->id = yyextra->currentCtxId;
newCtx->lexState = YY_START;
- newCtx->braceCount = g_braceCount;
+ newCtx->braceCount = yyextra->braceCount;
newCtx->objectType = 0;
newCtx->objectVar = 0;
newCtx->method = 0;
//printf("save state=%d\n",YY_START);
- g_contextDict.insert(g_currentCtxId,newCtx);
- g_currentCtx = newCtx;
- g_braceCount = 0;
- g_currentCtxId++;
+ yyextra->contextDict.insert(yyextra->currentCtxId,newCtx);
+ yyextra->currentCtx = newCtx;
+ yyextra->braceCount = 0;
+ yyextra->currentCtxId++;
}
-static void restoreObjCContext()
+static void restoreObjCContext(yyscan_t yyscanner)
{
- //printf("restore state=%d->%d\n",YY_START,g_currentCtx->lexState);
- BEGIN(g_currentCtx->lexState);
- g_braceCount = g_currentCtx->braceCount;
- if (!g_contextStack.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("restore state=%d->%d\n",YY_START,yyextra->currentCtx->lexState);
+ BEGIN(yyextra->currentCtx->lexState);
+ yyextra->braceCount = yyextra->currentCtx->braceCount;
+ if (!yyextra->contextStack.isEmpty())
{
- g_currentCtx = g_contextStack.pop();
+ yyextra->currentCtx = yyextra->contextStack.pop();
}
else
{
- g_currentCtx = 0;
- //printf("Trying to pop context while g_contextStack is empty!\n");
+ yyextra->currentCtx = 0;
+ //printf("Trying to pop context while yyextra->contextStack is empty!\n");
}
}
-void resetCCodeParserState()
+struct CCodeParser::Private
+{
+ yyscan_t yyscanner;
+ codeYY_state state;
+};
+
+CCodeParser::CCodeParser() : p(std::make_unique<CCodeParser::Private>())
+{
+ codeYYlex_init_extra(&p->state,&p->yyscanner);
+#ifdef FLEX_DEBUG
+ codeYYset_debug(1,p->yyscanner);
+#endif
+}
+
+CCodeParser::~CCodeParser()
{
- //printf("***initParseCodeContext()\n");
- g_forceTagReference.resize(0);
- g_theVarContext.clear();
- g_classScopeLengthStack.setAutoDelete(TRUE);
- g_classScopeLengthStack.clear();
- delete g_codeClassSDict;
- g_codeClassSDict = new ClassSDict(17);
- g_codeClassSDict->setAutoDelete(TRUE);
- g_codeClassSDict->clear();
- g_curClassBases.clear();
- g_anchorCount = 0;
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->classScopeLengthStack.clear();
+ delete yyextra->codeClassSDict;
+ yyextra->codeClassSDict=0;
+ codeYYlex_destroy(p->yyscanner);
}
-void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
+void CCodeParser::resetCodeParserState()
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ //printf("***CodeParser::reset()\n");
+ yyextra->forceTagReference.resize(0);
+ yyextra->theVarContext.clear();
+ yyextra->classScopeLengthStack.setAutoDelete(TRUE);
+ yyextra->classScopeLengthStack.clear();
+ delete yyextra->codeClassSDict;
+ yyextra->codeClassSDict = new ClassSDict(17);
+ yyextra->codeClassSDict->setAutoDelete(TRUE);
+ yyextra->codeClassSDict->clear();
+ yyextra->curClassBases.clear();
+ yyextra->anchorCount = 0;
+}
+
+void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const QCString &s,
SrcLangExt lang,bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
bool collectXRefs)
{
+ yyscan_t yyscanner = p->yyscanner;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("***parseCode() exBlock=%d exName=%s fd=%p className=%s searchCtx=%s\n",
// exBlock,exName,fd,className,searchCtx?searchCtx->name().data():"<none>");
@@ -3782,117 +3915,93 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
- if (g_codeClassSDict==0)
+ if (yyextra->codeClassSDict==0)
{
- resetCCodeParserState();
+ resetCodeParserState();
}
- g_code = &od;
- g_inputString = s;
- g_inputPosition = 0;
- g_currentFontClass = 0;
- g_needsTermination = FALSE;
- g_searchCtx = searchCtx;
- g_collectXRefs = collectXRefs;
- g_inFunctionTryBlock = FALSE;
+ yyextra->code = &od;
+ yyextra->inputString = s;
+ yyextra->inputPosition = 0;
+ codeYYrestart(0,yyscanner);
+ yyextra->currentFontClass = 0;
+ yyextra->needsTermination = FALSE;
+ yyextra->searchCtx = searchCtx;
+ yyextra->collectXRefs = collectXRefs;
+ yyextra->inFunctionTryBlock = FALSE;
if (startLine!=-1)
- g_yyLineNr = startLine;
+ yyextra->yyLineNr = startLine;
else
- g_yyLineNr = 1;
+ yyextra->yyLineNr = 1;
if (endLine!=-1)
- g_inputLines = endLine+1;
+ yyextra->inputLines = endLine+1;
else
- g_inputLines = g_yyLineNr + countLines() - 1;
-
- g_curlyCount = 0;
- g_bodyCurlyCount = 0;
- g_bracketCount = 0;
- g_sharpCount = 0;
- g_insideTemplate = FALSE;
- g_theCallContext.clear();
- g_scopeStack.clear();
- g_classScope = className;
+ yyextra->inputLines = yyextra->yyLineNr + countLines(yyscanner) - 1;
+
+ yyextra->curlyCount = 0;
+ yyextra->bodyCurlyCount = 0;
+ yyextra->bracketCount = 0;
+ yyextra->sharpCount = 0;
+ yyextra->insideTemplate = FALSE;
+ yyextra->theCallContext.clear();
+ yyextra->scopeStack.clear();
+ yyextra->classScope = className;
//printf("parseCCode %s\n",className);
- g_exampleBlock = exBlock;
- g_exampleName = exName;
- g_sourceFileDef = fd;
- g_lineNumbers = fd!=0 && showLineNumbers;
+ yyextra->exampleBlock = exBlock;
+ yyextra->exampleName = exName;
+ yyextra->sourceFileDef = fd;
+ yyextra->lineNumbers = fd!=0 && showLineNumbers;
bool cleanupSourceDef = FALSE;
if (fd==0)
{
// create a dummy filedef for the example
- g_sourceFileDef = createFileDef("",(exName?exName:"generated"));
+ yyextra->sourceFileDef = createFileDef("",(exName?exName:"generated"));
cleanupSourceDef = TRUE;
}
- g_insideObjC = lang==SrcLangExt_ObjC;
- g_insideJava = lang==SrcLangExt_Java;
- g_insideCS = lang==SrcLangExt_CSharp;
- g_insidePHP = lang==SrcLangExt_PHP;
- g_insideCpp = lang==SrcLangExt_Cpp;
- g_insideSlice = lang==SrcLangExt_Slice;
- if (g_sourceFileDef)
+ yyextra->lang = lang;
+ yyextra->insideObjC = lang==SrcLangExt_ObjC;
+ if (yyextra->sourceFileDef)
{
- setCurrentDoc("l00001");
+ setCurrentDoc(yyscanner,"l00001");
}
- g_currentDefinition = 0;
- g_currentMemberDef = 0;
- g_searchingForBody = exBlock;
- g_insideBody = FALSE;
- g_bracketCount = 0;
- if (!g_exampleName.isEmpty())
+ yyextra->currentDefinition = 0;
+ yyextra->currentMemberDef = 0;
+ yyextra->searchingForBody = exBlock;
+ yyextra->insideBody = FALSE;
+ yyextra->bracketCount = 0;
+ if (!yyextra->exampleName.isEmpty())
{
- g_exampleFile = convertNameToFile(g_exampleName+"-example",FALSE,TRUE);
- //printf("g_exampleFile=%s\n",g_exampleFile.data());
+ yyextra->exampleFile = convertNameToFile(yyextra->exampleName+"-example",FALSE,TRUE);
+ //printf("yyextra->exampleFile=%s\n",yyextra->exampleFile.data());
}
- g_includeCodeFragment = inlineFragment;
+ yyextra->includeCodeFragment = inlineFragment;
//printf("** exBlock=%d exName=%s include=%d\n",exBlock,exName,inlineFragment);
- startCodeLine();
- g_type.resize(0);
- g_name.resize(0);
- g_args.resize(0);
- g_parmName.resize(0);
- g_parmType.resize(0);
- if (memberDef) setParameterList(memberDef);
- codeYYrestart( codeYYin );
+ startCodeLine(yyscanner);
+ yyextra->type.resize(0);
+ yyextra->name.resize(0);
+ yyextra->args.resize(0);
+ yyextra->parmName.resize(0);
+ yyextra->parmType.resize(0);
+ if (memberDef) setParameterList(yyscanner,memberDef);
BEGIN( Body );
- codeYYlex();
- g_lexInit=TRUE;
- if (g_needsTermination)
+ codeYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
+ if (yyextra->needsTermination)
{
- endFontClass();
- DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
- g_code->endCodeLine();
+ endFontClass(yyscanner);
+ DBG_CTX((stderr,"endCodeLine(%d)\n",yyextra->yyLineNr));
+ yyextra->code->endCodeLine();
}
if (cleanupSourceDef)
{
// delete the temporary file definition used for this example
- delete g_sourceFileDef;
- g_sourceFileDef=0;
+ delete yyextra->sourceFileDef;
+ yyextra->sourceFileDef=0;
}
printlex(yy_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL);
return;
}
-void codeFreeScanner()
-{
-#if defined(YY_FLEX_SUBMINOR_VERSION)
- if (g_lexInit)
- {
- codeYYlex_destroy();
- }
-#endif
-}
-
-
-
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void codeYYdummy() { yy_flex_realloc(0,0); }
-}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
-#endif
-
#include "code.l.h"
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 3e5faba..f3367a4 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -16,6 +16,8 @@
*/
%option never-interactive
%option prefix="commentcnvYY"
+%option reentrant
+%option extra-type="struct commentcnvYY_state *"
%{
@@ -41,8 +43,8 @@
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-#define ADDCHAR(c) g_outBuf->addChar(c)
-#define ADDARRAY(a,s) g_outBuf->addArray(a,s)
+#define ADDCHAR(c) yyextra->outBuf->addChar(c)
+#define ADDARRAY(a,s) yyextra->outBuf->addArray(a,s)
struct CondCtx
{
@@ -60,185 +62,66 @@ struct CommentCtx
int lineNr;
};
-static BufStr * g_inBuf;
-static BufStr * g_outBuf;
-static int g_inBufPos;
-static int g_col;
-static int g_blockHeadCol;
-static bool g_mlBrief;
-static int g_readLineCtx;
-static bool g_skip;
-static QCString g_fileName;
-static int g_lineNr;
-static int g_condCtx;
-static QStack<CondCtx> g_condStack;
-static QStack<CommentCtx> g_commentStack;
-static QCString g_blockName;
-static int g_lastCommentContext;
-static bool g_inSpecialComment;
-static bool g_inRoseComment;
-static int g_stringContext;
-static int g_charContext;
-static int g_javaBlock;
-static bool g_specialComment;
+struct commentcnvYY_state
+{
+ BufStr * inBuf = 0;
+ BufStr * outBuf = 0;
+ int inBufPos = 0;
+ int col = 0;
+ int blockHeadCol = 0;
+ bool mlBrief = FALSE;
+ int readLineCtx = 0;
+ bool skip = FALSE;
+ QCString fileName;
+ int lineNr = 0;
+ int condCtx = 0;
+ QStack<CondCtx> condStack;
+ QStack<CommentCtx> commentStack;
+ QCString blockName;
+ int lastCommentContext = 0;
+ bool inSpecialComment = FALSE;
+ bool inRoseComment= FALSE;
+ int stringContext = 0;
+ int charContext = 0;
+ int javaBlock = 0;
+ bool specialComment = FALSE;
-static QCString g_aliasString;
-static int g_blockCount;
-static bool g_lastEscaped;
-static int g_lastBlockContext;
-static bool g_pythonDocString;
-static int g_nestingCount;
+ QCString aliasString;
+ int blockCount = 0;
+ bool lastEscaped = FALSE;
+ int lastBlockContext= 0;
+ bool pythonDocString = FALSE;
+ int nestingCount= 0;
-static bool g_vhdl; // for VHDL old style --! comment
+ bool vhdl = FALSE; // for VHDL old style --! comment
-static SrcLangExt g_lang;
-static bool isFixedForm; // For Fortran
+ SrcLangExt lang = SrcLangExt_Unknown;
+ bool isFixedForm = FALSE; // For Fortran
+};
static const char *stateToString(int state);
+static inline int computeIndent(const char *s);
-static void replaceCommentMarker(const char *s,int len)
-{
- const char *p=s;
- char c;
- // copy leading blanks
- while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
- {
- ADDCHAR(c);
- g_lineNr += c=='\n';
- p++;
- }
- // replace start of comment marker by blanks and the last character by a *
- int blanks=0;
- while ((c=*p) && (c=='/' || c=='!' || c=='#'))
- {
- blanks++;
- p++;
- if (*p=='<') // comment-after-item marker
- {
- blanks++;
- p++;
- }
- if (c=='!') // end after first !
- {
- break;
- }
- }
- if (blanks>0)
- {
- while (blanks>2)
- {
- ADDCHAR(' ');
- blanks--;
- }
- if (blanks>1) ADDCHAR('*');
- ADDCHAR(' ');
- }
- // copy comment line to output
- ADDARRAY(p,len-(int)(p-s));
-}
+static void replaceCommentMarker(yyscan_t yyscanner,const char *s,int len);
+static inline void copyToOutput(yyscan_t yyscanner,const char *s,int len);
+static void startCondSection(yyscan_t yyscanner,const char *sectId);
+static void endCondSection(yyscan_t yyscanner);
+static void handleCondSectionId(yyscan_t yyscanner,const char *expression);
+static void replaceAliases(yyscan_t yyscanner,const char *s);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
+static void replaceComment(yyscan_t yyscanner,int offset);
-static inline int computeIndent(const char *s)
-{
- int col=0;
- static int tabSize=Config_getInt(TAB_SIZE);
- const char *p=s;
- char c;
- while ((c=*p++))
- {
- if (c==' ') col++;
- else if (c=='\t') col+=tabSize-(col%tabSize);
- else break;
- }
- return col;
-}
-static inline void copyToOutput(const char *s,int len)
-{
- int i;
- if (g_skip) // only add newlines.
- {
- for (i=0;i<len;i++)
- {
- if (s[i]=='\n')
- {
- ADDCHAR('\n');
- //fprintf(stderr,"---> skip %d\n",g_lineNr);
- g_lineNr++;
- }
- }
- }
- else if (len>0)
- {
- ADDARRAY(s,len);
- static int tabSize=Config_getInt(TAB_SIZE);
- for (i=0;i<len;i++)
- {
- switch (s[i])
- {
- case '\n': g_col=0;
- //fprintf(stderr,"---> copy %d\n",g_lineNr);
- g_lineNr++; break;
- case '\t': g_col+=tabSize-(g_col%tabSize); break;
- default: g_col++; break;
- }
- }
- }
-}
-
-static void startCondSection(const char *sectId)
-{
- //printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
- CondParser prs;
- bool expResult = prs.parse(g_fileName,g_lineNr,sectId);
- g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip));
- if (!expResult) // not enabled
- {
- g_skip=TRUE;
- }
-}
-
-static void endCondSection()
-{
- if (g_condStack.isEmpty())
- {
- warn(g_fileName,g_lineNr,"Found \\endcond command without matching \\cond");
- g_skip=FALSE;
- }
- else
- {
- CondCtx *ctx = g_condStack.pop();
- g_skip=ctx->skip;
- }
- //printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
-}
-
-/** copies string \a s with length \a len to the output, while
- * replacing any alias commands found in the string.
- */
-static void replaceAliases(const char *s)
-{
- QCString result = resolveAliasCmd(s);
- //printf("replaceAliases(%s)->'%s'\n",s,result.data());
- copyToOutput(result,result.length());
-}
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-
-static int yyread(char *buf,int max_size)
-{
- int bytesInBuf = g_inBuf->curPos()-g_inBufPos;
- int bytesToCopy = QMIN(max_size,bytesInBuf);
- memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy);
- g_inBufPos+=bytesToCopy;
- return bytesToCopy;
-}
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
-void replaceComment(int offset);
%}
+MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
+
%option noyywrap
%x Scan
@@ -255,55 +138,55 @@ void replaceComment(int offset);
%%
<Scan>[^"'!\/\n\\#,\-]* { /* eat anything that is not " / , or \n */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Scan>[,] { /* eat , so we have a nice separator in long initialization lines */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Scan>"\"\"\""! { /* start of python long comment */
- if (g_lang!=SrcLangExt_Python)
+ if (yyextra->lang!=SrcLangExt_Python)
{
REJECT;
}
else
{
- g_pythonDocString = TRUE;
- g_nestingCount=1;
- g_commentStack.clear(); /* to be on the save side */
- copyToOutput(yytext,(int)yyleng);
+ yyextra->pythonDocString = TRUE;
+ yyextra->nestingCount=1;
+ yyextra->commentStack.clear(); /* to be on the save side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
<Scan>![><!]/.*\n {
- if (g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Fortran)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0; // Fortran doesn't have an end comment
- g_commentStack.clear(); /* to be on the save side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount=0; // Fortran doesn't have an end comment
+ yyextra->commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
<Scan>[Cc\*][><!]/.*\n {
- if (g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Fortran)
{
REJECT;
}
else
{
/* check for fixed format; we might have some conditional as part of multiline if like C<5 .and. & */
- if (isFixedForm && (g_col == 0))
+ if (yyextra->isFixedForm && (yyextra->col == 0))
{
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0; // Fortran doesn't have an end comment
- g_commentStack.clear(); /* to be on the safe side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount=0; // Fortran doesn't have an end comment
+ yyextra->commentStack.clear(); /* to be on the safe side */
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
else
{
@@ -312,25 +195,25 @@ void replaceComment(int offset);
}
}
<Scan>!.*\n {
- if (g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Fortran)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
}
<Scan>[Cc\*].*\n {
- if (g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Fortran)
{
REJECT;
}
else
{
- if (g_col == 0)
+ if (yyextra->col == 0)
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
else
{
@@ -339,24 +222,24 @@ void replaceComment(int offset);
}
}
<Scan>"\"" { /* start of a string */
- copyToOutput(yytext,(int)yyleng);
- g_stringContext = YY_START;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->stringContext = YY_START;
BEGIN(SkipString);
}
<Scan>' {
- copyToOutput(yytext,(int)yyleng);
- g_charContext = YY_START;
- if (g_lang!=SrcLangExt_VHDL)
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->charContext = YY_START;
+ if (yyextra->lang!=SrcLangExt_VHDL)
{
BEGIN(SkipChar);
}
}
<Scan>\n { /* new line */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Scan>"//!"/.*\n[ \t]*"//"[\/!][^\/] | /* start C++ style special comment block */
<Scan>("///"[/]*)/[^/].*\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */
- if (g_mlBrief)
+ if (yyextra->mlBrief)
{
REJECT; // bail out if we do not need to convert
}
@@ -367,190 +250,194 @@ void replaceComment(int offset);
{
while (i<(int)yyleng && yytext[i]=='/') i++;
}
- g_blockHeadCol=g_col;
- copyToOutput("/**",3);
- replaceAliases(yytext+i);
- g_inSpecialComment=TRUE;
+ yyextra->blockHeadCol=yyextra->col;
+ copyToOutput(yyscanner,"/**",3);
+ replaceAliases(yyscanner,yytext+i);
+ yyextra->inSpecialComment=TRUE;
//BEGIN(SComment);
- g_readLineCtx=SComment;
+ yyextra->readLineCtx=SComment;
BEGIN(ReadLine);
}
}
<Scan>"//##Documentation".*/\n { /* Start of Rational Rose ANSI C++ comment block */
- if (g_mlBrief) REJECT;
+ if (yyextra->mlBrief) REJECT;
int i=17; //=strlen("//##Documentation");
- g_blockHeadCol=g_col;
- copyToOutput("/**",3);
- replaceAliases(yytext+i);
- g_inRoseComment=TRUE;
+ yyextra->blockHeadCol=yyextra->col;
+ copyToOutput(yyscanner,"/**",3);
+ replaceAliases(yyscanner,yytext+i);
+ yyextra->inRoseComment=TRUE;
BEGIN(SComment);
}
<Scan>"//"[!\/]/.*\n[ \t]*"//"[|\/][ \t]*[@\\]"}" { // next line contains an end marker, see bug 752712
- g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
- copyToOutput(yytext,(int)yyleng);
- g_readLineCtx=YY_START;
+ yyextra->inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<Scan>"//"/.*\n { /* one line C++ comment */
- g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
- copyToOutput(yytext,(int)yyleng);
- g_readLineCtx=YY_START;
+ yyextra->inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<Scan>"/**/" { /* avoid matching next rule for empty C comment, see bug 711723 */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Scan>"/*"[*!]? { /* start of a C comment */
- if ((g_lang==SrcLangExt_Python) || (g_lang==SrcLangExt_Tcl))
+ if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
{
REJECT;
}
- g_specialComment=(int)yyleng==3;
- g_nestingCount=1;
- g_commentStack.clear(); /* to be on the save side */
- copyToOutput(yytext,(int)yyleng);
+ yyextra->specialComment=(int)yyleng==3;
+ yyextra->nestingCount=1;
+ yyextra->commentStack.clear(); /* to be on the save side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
<Scan>"#"("#")? {
- if (g_lang!=SrcLangExt_Python)
+ if (yyextra->lang!=SrcLangExt_Python)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0; // Python doesn't have an end comment for #
- g_commentStack.clear(); /* to be on the save side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount=0; // Python doesn't have an end comment for #
+ yyextra->commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
<Scan>"--!" {
- if (g_lang!=SrcLangExt_VHDL)
+ if (yyextra->lang!=SrcLangExt_VHDL)
{
REJECT;
}
else
{
- g_vhdl = TRUE;
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0; // VHDL doesn't have an end comment
- g_commentStack.clear(); /* to be on the save side */
+ yyextra->vhdl = TRUE;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount=0; // VHDL doesn't have an end comment
+ yyextra->commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
<Scan>![><!] {
- if (g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Fortran)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0; // Fortran doesn't have an end comment
- g_commentStack.clear(); /* to be on the save side */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount=0; // Fortran doesn't have an end comment
+ yyextra->commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
+<CComment,ReadLine>{MAILADR} |
+<CComment,ReadLine>"<"{MAILADR}">" { // Mail address, to prevent seeing e.g x@code-factory.org as start of a code block
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ }
<CComment>"{@code"/[ \t\n] {
- copyToOutput("@code",5);
- g_lastCommentContext = YY_START;
- g_javaBlock=1;
- g_blockName=&yytext[1];
+ copyToOutput(yyscanner,"@code",5);
+ yyextra->lastCommentContext = YY_START;
+ yyextra->javaBlock=1;
+ yyextra->blockName=&yytext[1];
BEGIN(VerbatimCode);
}
<CComment,ReadLine>[\\@]("dot"|"code"|"msc"|"startuml")/[^a-z_A-Z0-9] { /* start of a verbatim block */
- copyToOutput(yytext,(int)yyleng);
- g_lastCommentContext = YY_START;
- g_javaBlock=0;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->lastCommentContext = YY_START;
+ yyextra->javaBlock=0;
if (qstrcmp(&yytext[1],"startuml")==0)
{
- g_blockName="uml";
+ yyextra->blockName="uml";
}
else
{
- g_blockName=&yytext[1];
+ yyextra->blockName=&yytext[1];
}
BEGIN(VerbatimCode);
}
<CComment,ReadLine>[\\@]("f$"|"f["|"f{") {
- copyToOutput(yytext,(int)yyleng);
- g_blockName=&yytext[1];
- if (g_blockName.at(1)=='[')
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->blockName=&yytext[1];
+ if (yyextra->blockName.at(1)=='[')
{
- g_blockName.at(1)=']';
+ yyextra->blockName.at(1)=']';
}
- else if (g_blockName.at(1)=='{')
+ else if (yyextra->blockName.at(1)=='{')
{
- g_blockName.at(1)='}';
+ yyextra->blockName.at(1)='}';
}
- g_lastCommentContext = YY_START;
+ yyextra->lastCommentContext = YY_START;
BEGIN(Verbatim);
}
<CComment,ReadLine>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly")/[^a-z_A-Z0-9] { /* start of a verbatim block */
- copyToOutput(yytext,(int)yyleng);
- g_blockName=&yytext[1];
- g_lastCommentContext = YY_START;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->blockName=&yytext[1];
+ yyextra->lastCommentContext = YY_START;
BEGIN(Verbatim);
}
<Scan>. { /* any other character */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
- copyToOutput(yytext,(int)yyleng);
- if (&yytext[1]==g_blockName) // end of formula
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ if (&yytext[1]==yyextra->blockName) // end of formula
{
- BEGIN(g_lastCommentContext);
+ BEGIN(yyextra->lastCommentContext);
}
- else if (&yytext[4]==g_blockName)
+ else if (&yytext[4]==yyextra->blockName)
{
- BEGIN(g_lastCommentContext);
+ BEGIN(yyextra->lastCommentContext);
}
}
<VerbatimCode>"{" {
- if (g_javaBlock==0)
+ if (yyextra->javaBlock==0)
{
REJECT;
}
else
{
- g_javaBlock++;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->javaBlock++;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
}
<VerbatimCode>"}" {
- if (g_javaBlock==0)
+ if (yyextra->javaBlock==0)
{
REJECT;
}
else
{
- g_javaBlock--;
- if (g_javaBlock==0)
+ yyextra->javaBlock--;
+ if (yyextra->javaBlock==0)
{
- copyToOutput(" @endcode ",10);
- BEGIN(g_lastCommentContext);
+ copyToOutput(yyscanner," @endcode ",10);
+ BEGIN(yyextra->lastCommentContext);
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
}
}
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc"|"enduml") { /* end of verbatim block */
- copyToOutput(yytext,(int)yyleng);
- if (&yytext[4]==g_blockName)
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ if (&yytext[4]==yyextra->blockName)
{
- BEGIN(g_lastCommentContext);
+ BEGIN(yyextra->lastCommentContext);
}
}
<VerbatimCode>^[ \t]*"//"[\!\/]? { /* skip leading comments */
- if (!g_inSpecialComment)
+ if (!yyextra->inSpecialComment)
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
else
{
@@ -559,25 +446,25 @@ void replaceComment(int offset);
{
l++;
}
- copyToOutput(yytext,l);
+ copyToOutput(yyscanner,yytext,l);
if (yyleng-l==3) // ends with //! or ///
{
- copyToOutput(" * ",3);
+ copyToOutput(yyscanner," * ",3);
}
else // ends with //
{
- copyToOutput("//",2);
+ copyToOutput(yyscanner,"//",2);
}
}
}
<Verbatim,VerbatimCode>[^@\/\\\n{}]* { /* any character not a backslash or new line or } */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Verbatim>^[ \t]*"///" {
- if (g_blockName=="dot" || g_blockName=="msc" || g_blockName=="uml" || g_blockName.at(0)=='f')
+ if (yyextra->blockName=="dot" || yyextra->blockName=="msc" || yyextra->blockName=="uml" || yyextra->blockName.at(0)=='f')
{
// see bug 487871, strip /// from dot images and formulas.
int l=0;
@@ -585,8 +472,8 @@ void replaceComment(int offset);
{
l++;
}
- copyToOutput(yytext,l);
- copyToOutput(" ",3);
+ copyToOutput(yyscanner,yytext,l);
+ copyToOutput(yyscanner," ",3);
}
else // even slashes are verbatim (e.g. \verbatim, \code)
{
@@ -594,119 +481,119 @@ void replaceComment(int offset);
}
}
<Verbatim,VerbatimCode>. { /* any other character */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SkipString>\\. { /* escaped character in string */
- if (g_lang==SrcLangExt_Fortran)
+ if (yyextra->lang==SrcLangExt_Fortran)
{
unput(yytext[1]);
- copyToOutput(yytext,1);
+ copyToOutput(yyscanner,yytext,1);
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
}
<SkipString>"\"" { /* end of string */
- copyToOutput(yytext,(int)yyleng);
- BEGIN(g_stringContext);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ BEGIN(yyextra->stringContext);
}
<SkipString>. { /* any other string character */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SkipString>\n { /* new line inside string (illegal for some compilers) */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SkipChar>\\. { /* escaped character */
- if (g_lang==SrcLangExt_Fortran)
+ if (yyextra->lang==SrcLangExt_Fortran)
{
unput(yytext[1]);
- copyToOutput(yytext,1);
+ copyToOutput(yyscanner,yytext,1);
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
}
<SkipChar>' { /* end of character literal */
- copyToOutput(yytext,(int)yyleng);
- BEGIN(g_charContext);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ BEGIN(yyextra->charContext);
}
<SkipChar>. { /* any other string character */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SkipChar>\n { /* new line character */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>[^\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
- copyToOutput(yytext,(int)yyleng);
+<CComment>[^ <\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+[^*/\\@\n{\"]* { /* stars without slashes */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"\"\"\"" { /* end of Python docstring */
- if (g_lang!=SrcLangExt_Python)
+ if (yyextra->lang!=SrcLangExt_Python)
{
REJECT;
}
else
{
- g_nestingCount--;
- g_pythonDocString = FALSE;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->nestingCount--;
+ yyextra->pythonDocString = FALSE;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
}
<CComment>\n { /* new line in comment */
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
/* in case of Fortran always end of comment */
- if (g_lang==SrcLangExt_Fortran)
+ if (yyextra->lang==SrcLangExt_Fortran)
{
BEGIN(Scan);
}
}
<CComment>"/"+"*" { /* nested C comment */
- if ((g_lang==SrcLangExt_Python) || (g_lang==SrcLangExt_Tcl))
+ if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
{
REJECT;
}
- g_nestingCount++;
- g_commentStack.push(new CommentCtx(g_lineNr));
- copyToOutput(yytext,(int)yyleng);
+ yyextra->nestingCount++;
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+"/" { /* end of C comment */
- if ((g_lang==SrcLangExt_Python) || (g_lang==SrcLangExt_Tcl))
+ if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
- g_nestingCount--;
- if (g_nestingCount<=0)
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->nestingCount--;
+ if (yyextra->nestingCount<=0)
{
BEGIN(Scan);
}
else
{
- //g_nestingCount--;
- delete g_commentStack.pop();
+ //yyextra->nestingCount--;
+ delete yyextra->commentStack.pop();
}
}
}
/* Python an VHDL share CComment, so special attention for ending comments is required */
<CComment>"\n"/[ \t]*"#" {
- if (g_lang!=SrcLangExt_VHDL)
+ if (yyextra->lang!=SrcLangExt_VHDL)
{
REJECT;
}
else
{
- if (g_vhdl) // inside --! comment
+ if (yyextra->vhdl) // inside --! comment
{
- g_vhdl = FALSE;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->vhdl = FALSE;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
else // C-type comment
@@ -716,35 +603,35 @@ void replaceComment(int offset);
}
}
<CComment>"\n"/[ \t]*"-" {
- if (g_lang!=SrcLangExt_Python || g_pythonDocString)
+ if (yyextra->lang!=SrcLangExt_Python || yyextra->pythonDocString)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
}
<CComment>"\n"/[ \t]*[^ \t#\-] {
- if (g_lang==SrcLangExt_Python)
+ if (yyextra->lang==SrcLangExt_Python)
{
- if (g_pythonDocString)
+ if (yyextra->pythonDocString)
{
REJECT;
}
else
{
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
}
- else if (g_lang==SrcLangExt_VHDL)
+ else if (yyextra->lang==SrcLangExt_VHDL)
{
- if (g_vhdl) // inside --! comment
+ if (yyextra->vhdl) // inside --! comment
{
- g_vhdl = FALSE;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->vhdl = FALSE;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
else // C-type comment
@@ -759,122 +646,125 @@ void replaceComment(int offset);
}
/* removed for bug 674842 (bug was introduced in rev 768)
<CComment>"'" {
- g_charContext = YY_START;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->charContext = YY_START;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(SkipChar);
}
<CComment>"\"" {
- g_stringContext = YY_START;
- copyToOutput(yytext,(int)yyleng);
+ yyextra->stringContext = YY_START;
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(SkipString);
}
*/
<CComment>. {
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SComment>^[ \t]*"///"[\/]*/\n {
- replaceComment(0);
+ replaceComment(yyscanner,0);
}
<SComment>\n[ \t]*"///"[\/]*/\n {
- replaceComment(1);
+ replaceComment(yyscanner,1);
}
<SComment>^[ \t]*"///"[^\/\n]/.*\n {
- replaceComment(0);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,0);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<SComment>\n[ \t]*"//"[\/!]("<")?[ \t]*[\\@]"}".*\n {
/* See Bug 752712: end the multiline comment when finding a @} or \} command */
- copyToOutput(" */",3);
- copyToOutput(yytext,(int)yyleng);
- g_inSpecialComment=FALSE;
- g_inRoseComment=FALSE;
+ copyToOutput(yyscanner," */",3);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->inSpecialComment=FALSE;
+ yyextra->inRoseComment=FALSE;
BEGIN(Scan);
}
<SComment>\n[ \t]*"///"[^\/\n]/.*\n {
- replaceComment(1);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,1);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<SComment>^[ \t]*"//!" | // just //!
<SComment>^[ \t]*"//!<"/.*\n | // or //!< something
<SComment>^[ \t]*"//!"[^<]/.*\n { // or //!something
- replaceComment(0);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,0);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<SComment>\n[ \t]*"//!" |
<SComment>\n[ \t]*"//!<"/.*\n |
<SComment>\n[ \t]*"//!"[^<\n]/.*\n {
- replaceComment(1);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,1);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
<SComment>^[ \t]*"//##"/.*\n {
- if (!g_inRoseComment)
+ if (!yyextra->inRoseComment)
{
REJECT;
}
else
{
- replaceComment(0);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,0);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
}
<SComment>\n[ \t]*"//##"/.*\n {
- if (!g_inRoseComment)
+ if (!yyextra->inRoseComment)
{
REJECT;
}
else
{
- replaceComment(1);
- g_readLineCtx=YY_START;
+ replaceComment(yyscanner,1);
+ yyextra->readLineCtx=YY_START;
BEGIN(ReadLine);
}
}
<SComment>\n { /* end of special comment */
- copyToOutput(" */",3);
- copyToOutput(yytext,(int)yyleng);
- g_inSpecialComment=FALSE;
- g_inRoseComment=FALSE;
+ copyToOutput(yyscanner," */",3);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->inSpecialComment=FALSE;
+ yyextra->inRoseComment=FALSE;
BEGIN(Scan);
}
+<ReadLine>"/**" {
+ copyToOutput(yyscanner,"/&zwj;**",8);
+ }
<ReadLine>"*/" {
- copyToOutput("*&zwj;/",7);
+ copyToOutput(yyscanner,"*&zwj;/",7);
}
<ReadLine>"*" {
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<ReadLine>[^\\@\n\*]* {
- copyToOutput(yytext,(int)yyleng);
+<ReadLine>[^\\@\n\*/]* {
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<ReadLine>[^\\@\n\*]*/\n {
- copyToOutput(yytext,(int)yyleng);
- BEGIN(g_readLineCtx);
+<ReadLine>[^\\@\n\*/]*/\n {
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ BEGIN(yyextra->readLineCtx);
}
<CComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment,ReadLine>[\\@]"cond"/[^a-z_A-Z0-9] { // conditional section
- g_condCtx = YY_START;
+ yyextra->condCtx = YY_START;
BEGIN(CondLine);
}
<CComment,ReadLine>[\\@]"endcond"/[^a-z_A-Z0-9] { // end of conditional section
- bool oldSkip=g_skip;
- endCondSection();
- if (YY_START==CComment && oldSkip && !g_skip)
+ bool oldSkip=yyextra->skip;
+ endCondSection(yyscanner);
+ if (YY_START==CComment && oldSkip && !yyextra->skip)
{
//printf("** Adding start of comment!\n");
- if (g_lang!=SrcLangExt_Python &&
- g_lang!=SrcLangExt_VHDL &&
- g_lang!=SrcLangExt_Markdown &&
- g_lang!=SrcLangExt_Fortran)
+ if (yyextra->lang!=SrcLangExt_Python &&
+ yyextra->lang!=SrcLangExt_VHDL &&
+ yyextra->lang!=SrcLangExt_Markdown &&
+ yyextra->lang!=SrcLangExt_Fortran)
{
ADDCHAR('/');
ADDCHAR('*');
- if (g_specialComment)
+ if (yyextra->specialComment)
{
ADDCHAR('*');
}
@@ -882,142 +772,277 @@ void replaceComment(int offset);
}
}
<CondLine>[!()&| \ta-z_A-Z0-9.\-]+ {
- bool oldSkip=g_skip;
- startCondSection(yytext);
- if ((g_condCtx==CComment || g_readLineCtx==SComment) &&
- !oldSkip && g_skip)
- {
- if (g_lang!=SrcLangExt_Python &&
- g_lang!=SrcLangExt_VHDL &&
- g_lang!=SrcLangExt_Markdown &&
- g_lang!=SrcLangExt_Fortran)
- {
- ADDCHAR('*');
- ADDCHAR('/');
- }
- }
- if (g_readLineCtx==SComment)
- {
- BEGIN(SComment);
- }
- else
- {
- BEGIN(g_condCtx);
- }
+ handleCondSectionId(yyscanner,yytext);
}
-<CondLine>[ \t]*
-<CComment,ReadLine>[\\@]"cond"[ \t\r]*/\n |
+<CComment,ReadLine>[\\@]"cond"[ \t\r]*/\n {
+ yyextra->condCtx=YY_START;
+ handleCondSectionId(yyscanner," "); // fake section id causing the section to be hidden unconditionally
+ }
<CondLine>. { // forgot section id?
- if (YY_START!=CondLine) g_condCtx=YY_START;
- bool oldSkip=g_skip;
- startCondSection(" "); // fake section id causing the section to be hidden unconditionally
- if ((g_condCtx==CComment || g_readLineCtx==SComment) &&
- !oldSkip && g_skip)
- {
- //printf("** Adding terminator for comment!\n");
- if (g_lang!=SrcLangExt_Python &&
- g_lang!=SrcLangExt_VHDL &&
- g_lang!=SrcLangExt_Markdown &&
- g_lang!=SrcLangExt_Fortran)
- {
- ADDCHAR('*');
- ADDCHAR('/');
- }
- }
- if (*yytext=='\n') g_lineNr++;
- if (g_readLineCtx==SComment)
- {
- BEGIN(SComment);
- }
- else
- {
- BEGIN(g_condCtx);
- }
+ handleCondSectionId(yyscanner," "); // fake section id causing the section to be hidden unconditionally
+ if (*yytext=='\n') yyextra->lineNr++;
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]* { // expand alias without arguments
- replaceAliases(yytext);
+ replaceAliases(yyscanner,yytext);
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]*"{" { // expand alias with arguments
- g_lastBlockContext=YY_START;
- g_blockCount=1;
- g_aliasString=yytext;
- g_lastEscaped=0;
+ yyextra->lastBlockContext=YY_START;
+ yyextra->blockCount=1;
+ yyextra->aliasString=yytext;
+ yyextra->lastEscaped=0;
BEGIN( ReadAliasArgs );
}
<ReadAliasArgs>^[ \t]*"//"[/!]/[^\n]+ { // skip leading special comments (see bug 618079)
}
<ReadAliasArgs>"*/" { // oops, end of comment in the middle of an alias?
- if (g_lang==SrcLangExt_Python)
+ if (yyextra->lang==SrcLangExt_Python)
{
REJECT;
}
else // abort the alias, restart scanning
{
- copyToOutput(g_aliasString,g_aliasString.length());
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yyextra->aliasString,yyextra->aliasString.length());
+ copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
}
<ReadAliasArgs>[^{}\n\\\*]+ {
- g_aliasString+=yytext;
- g_lastEscaped=FALSE;
+ yyextra->aliasString+=yytext;
+ yyextra->lastEscaped=FALSE;
}
<ReadAliasArgs>"\\" {
- if (g_lastEscaped) g_lastEscaped=FALSE;
- else g_lastEscaped=TRUE;
- g_aliasString+=yytext;
+ if (yyextra->lastEscaped) yyextra->lastEscaped=FALSE;
+ else yyextra->lastEscaped=TRUE;
+ yyextra->aliasString+=yytext;
}
<ReadAliasArgs>\n {
- g_aliasString+=yytext;
- g_lineNr++;
- g_lastEscaped=FALSE;
+ yyextra->aliasString+=yytext;
+ yyextra->lineNr++;
+ yyextra->lastEscaped=FALSE;
}
<ReadAliasArgs>"{" {
- g_aliasString+=yytext;
- if (!g_lastEscaped) g_blockCount++;
- g_lastEscaped=FALSE;
+ yyextra->aliasString+=yytext;
+ if (!yyextra->lastEscaped) yyextra->blockCount++;
+ yyextra->lastEscaped=FALSE;
}
<ReadAliasArgs>"}" {
- g_aliasString+=yytext;
- if (!g_lastEscaped) g_blockCount--;
- if (g_blockCount==0)
+ yyextra->aliasString+=yytext;
+ if (!yyextra->lastEscaped) yyextra->blockCount--;
+ if (yyextra->blockCount==0)
{
- replaceAliases(g_aliasString);
- BEGIN( g_lastBlockContext );
+ replaceAliases(yyscanner,yyextra->aliasString);
+ BEGIN( yyextra->lastBlockContext );
}
- g_lastEscaped=FALSE;
+ yyextra->lastEscaped=FALSE;
}
<ReadAliasArgs>. {
- g_aliasString+=yytext;
- g_lastEscaped=FALSE;
+ yyextra->aliasString+=yytext;
+ yyextra->lastEscaped=FALSE;
}
<ReadLine>. {
- copyToOutput(yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
%%
-void replaceComment(int offset)
+static void replaceCommentMarker(yyscan_t yyscanner,const char *s,int len)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ const char *p=s;
+ char c;
+ // copy leading blanks
+ while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
+ {
+ ADDCHAR(c);
+ yyextra->lineNr += c=='\n';
+ p++;
+ }
+ // replace start of comment marker by blanks and the last character by a *
+ int blanks=0;
+ while ((c=*p) && (c=='/' || c=='!' || c=='#'))
+ {
+ blanks++;
+ p++;
+ if (*p=='<') // comment-after-item marker
+ {
+ blanks++;
+ p++;
+ }
+ if (c=='!') // end after first !
+ {
+ break;
+ }
+ }
+ if (blanks>0)
+ {
+ while (blanks>2)
+ {
+ ADDCHAR(' ');
+ blanks--;
+ }
+ if (blanks>1) ADDCHAR('*');
+ ADDCHAR(' ');
+ }
+ // copy comment line to output
+ ADDARRAY(p,len-(int)(p-s));
+}
+
+static inline int computeIndent(const char *s)
+{
+ int col=0;
+ static int tabSize=Config_getInt(TAB_SIZE);
+ const char *p=s;
+ char c;
+ while ((c=*p++))
+ {
+ if (c==' ') col++;
+ else if (c=='\t') col+=tabSize-(col%tabSize);
+ else break;
+ }
+ return col;
+}
+
+static inline void copyToOutput(yyscan_t yyscanner,const char *s,int len)
+{
+ int tabSize=Config_getInt(TAB_SIZE);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int i;
+ if (yyextra->skip) // only add newlines.
+ {
+ for (i=0;i<len;i++)
+ {
+ switch(s[i])
+ {
+ case '\n':
+ ADDCHAR('\n');
+ yyextra->lineNr++;
+ yyextra->col=0;
+ break;
+ case '\t':
+ yyextra->col+=tabSize-(yyextra->col%tabSize);
+ break;
+ default:
+ yyextra->col++;
+ break;
+ }
+ }
+ }
+ else if (len>0)
+ {
+ ADDARRAY(s,len);
+ for (i=0;i<len;i++)
+ {
+ switch (s[i])
+ {
+ case '\n': yyextra->col=0;
+ //fprintf(stderr,"---> copy %d\n",g_lineNr);
+ yyextra->lineNr++; break;
+ case '\t': yyextra->col+=tabSize-(yyextra->col%tabSize); break;
+ default: yyextra->col++; break;
+ }
+ }
+ }
+}
+
+static void startCondSection(yyscan_t yyscanner,const char *sectId)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
+ CondParser prs;
+ bool expResult = prs.parse(yyextra->fileName,yyextra->lineNr,sectId);
+ yyextra->condStack.push(new CondCtx(yyextra->lineNr,sectId,yyextra->skip));
+ if (!expResult) // not enabled
+ {
+ yyextra->skip=TRUE;
+ }
+}
+
+static void endCondSection(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->condStack.isEmpty())
+ {
+ warn(yyextra->fileName,yyextra->lineNr,"Found \\endcond command without matching \\cond");
+ yyextra->skip=FALSE;
+ }
+ else
+ {
+ CondCtx *ctx = yyextra->condStack.pop();
+ yyextra->skip=ctx->skip;
+ }
+ //printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
+}
+
+static void handleCondSectionId(yyscan_t yyscanner,const char *expression)
{
- if (g_mlBrief || g_skip)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool oldSkip=yyextra->skip;
+ startCondSection(yyscanner,expression);
+ if ((yyextra->condCtx==CComment || yyextra->readLineCtx==SComment) &&
+ !oldSkip && yyextra->skip)
+ {
+ if (yyextra->lang!=SrcLangExt_Python &&
+ yyextra->lang!=SrcLangExt_VHDL &&
+ yyextra->lang!=SrcLangExt_Markdown &&
+ yyextra->lang!=SrcLangExt_Fortran)
+ {
+ ADDCHAR('*');
+ ADDCHAR('/');
+ }
+ }
+ if (yyextra->readLineCtx==SComment)
{
- copyToOutput(yytext,(int)yyleng);
+ BEGIN(SComment);
+ }
+ else
+ {
+ BEGIN(yyextra->condCtx);
+ }
+}
+
+/** copies string \a s with length \a len to the output, while
+ * replacing any alias commands found in the string.
+ */
+static void replaceAliases(yyscan_t yyscanner,const char *s)
+{
+ QCString result = resolveAliasCmd(s);
+ //printf("replaceAliases(%s)->'%s'\n",s,result.data());
+ copyToOutput(yyscanner,result,result.length());
+}
+
+
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int bytesInBuf = yyextra->inBuf->curPos()-yyextra->inBufPos;
+ int bytesToCopy = QMIN(max_size,bytesInBuf);
+ memcpy(buf,yyextra->inBuf->data()+yyextra->inBufPos,bytesToCopy);
+ yyextra->inBufPos+=bytesToCopy;
+ return bytesToCopy;
+}
+
+static void replaceComment(yyscan_t yyscanner,int offset)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->mlBrief || yyextra->skip)
+ {
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
else
{
//printf("replaceComment(%s)\n",yytext);
int i=computeIndent(&yytext[offset]);
- if (i==g_blockHeadCol)
+ if (i==yyextra->blockHeadCol)
{
- replaceCommentMarker(yytext,(int)yyleng);
+ replaceCommentMarker(yyscanner,yytext,(int)yyleng);
}
else
{
- copyToOutput(" */",3);
+ copyToOutput(yyscanner," */",3);
int i;for (i=(int)yyleng-1;i>=0;i--) unput(yytext[i]);
- g_inSpecialComment=FALSE;
- BEGIN(Scan);
- }
+ yyextra->inSpecialComment=FALSE;
+ BEGIN(Scan);
+ }
}
}
@@ -1068,83 +1093,86 @@ static bool recognizeFixedForm(const char* contents)
*/
void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
{
+ yyscan_t yyscanner;
+ commentcnvYY_state extra;
+ commentcnvYYlex_init_extra(&extra,&yyscanner);
+#ifdef FLEX_DEBUG
+ commentcnvYYset_debug(1,yyscanner);
+#endif
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("convertCppComments(%s)\n",fileName);
- g_inBuf = inBuf;
- g_outBuf = outBuf;
- g_inBufPos = 0;
- g_col = 0;
- g_mlBrief = Config_getBool(MULTILINE_CPP_IS_BRIEF);
- g_skip = FALSE;
- g_fileName = fileName;
- g_lang = getLanguageFromFileName(fileName);
- g_pythonDocString = FALSE;
- g_lineNr = 1;
- g_condStack.clear();
- g_condStack.setAutoDelete(TRUE);
- g_commentStack.clear();
- g_commentStack.setAutoDelete(TRUE);
- g_vhdl = FALSE;
+ yyextra->inBuf = inBuf;
+ yyextra->outBuf = outBuf;
+ yyextra->inBufPos = 0;
+ yyextra->col = 0;
+ yyextra->mlBrief = Config_getBool(MULTILINE_CPP_IS_BRIEF);
+ yyextra->skip = FALSE;
+ yyextra->fileName = fileName;
+ yyextra->lang = getLanguageFromFileName(fileName);
+ yyextra->pythonDocString = FALSE;
+ yyextra->lineNr = 1;
+ yyextra->condStack.clear();
+ yyextra->condStack.setAutoDelete(TRUE);
+ yyextra->commentStack.clear();
+ yyextra->commentStack.setAutoDelete(TRUE);
+ yyextra->vhdl = FALSE;
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- isFixedForm = FALSE;
- if (g_lang==SrcLangExt_Fortran)
+ yyextra->isFixedForm = FALSE;
+ if (yyextra->lang==SrcLangExt_Fortran)
{
- isFixedForm = recognizeFixedForm(inBuf->data());
+ yyextra->isFixedForm = recognizeFixedForm(inBuf->data());
}
- if (g_lang==SrcLangExt_Markdown)
+ if (yyextra->lang==SrcLangExt_Markdown)
{
- g_nestingCount=0;
+ yyextra->nestingCount=0;
BEGIN(CComment);
- g_commentStack.push(new CommentCtx(g_lineNr));
+ yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
else
{
BEGIN(Scan);
}
- yylex();
- while (!g_condStack.isEmpty())
+ yylex(yyscanner);
+ while (!yyextra->condStack.isEmpty())
{
- CondCtx *ctx = g_condStack.pop();
+ CondCtx *ctx = yyextra->condStack.pop();
QCString sectionInfo = " ";
if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data());
- warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have "
+ warn(yyextra->fileName,ctx->lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
}
- if (g_nestingCount>0 && g_lang!=SrcLangExt_Markdown)
+ if (yyextra->nestingCount>0 && yyextra->lang!=SrcLangExt_Markdown)
{
QCString tmp= "(probable line reference: ";
bool first = TRUE;
- while (!g_commentStack.isEmpty())
+ while (!yyextra->commentStack.isEmpty())
{
- CommentCtx *ctx = g_commentStack.pop();
+ CommentCtx *ctx = yyextra->commentStack.pop();
if (!first) tmp += ", ";
tmp += QCString().setNum(ctx->lineNr);
first = FALSE;
delete ctx;
}
tmp += ")";
- warn(g_fileName,g_lineNr,"Reached end of file while still inside a (nested) comment. "
- "Nesting level %d %s",g_nestingCount,tmp.data());
+ warn(yyextra->fileName,yyextra->lineNr,"Reached end of file while still inside a (nested) comment. "
+ "Nesting level %d %s",yyextra->nestingCount,tmp.data());
}
- g_commentStack.clear();
- g_nestingCount = 0;
+ yyextra->commentStack.clear();
+ yyextra->nestingCount = 0;
if (Debug::isFlagSet(Debug::CommentCnv))
{
- g_outBuf->at(g_outBuf->curPos())='\0';
+ yyextra->outBuf->at(yyextra->outBuf->curPos())='\0';
Debug::print(Debug::CommentCnv,0,"-----------\nCommentCnv: %s\n"
- "output=[\n%s]\n-----------\n",fileName,g_outBuf->data()
+ "output=[\n%s]\n-----------\n",fileName,yyextra->outBuf->data()
);
}
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ commentcnvYYlex_destroy(yyscanner);
}
//----------------------------------------------------------------------------
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void commentcnvYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
#include "commentcnv.l.h"
diff --git a/src/commentscan.h b/src/commentscan.h
index 7d2189f..f471890 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -19,7 +19,7 @@
#include "types.h"
class Entry;
-class ParserInterface;
+class OutlineParserInterface;
/** @file
* @brief Interface for the comment block parser */
@@ -72,7 +72,7 @@ QCString preprocessCommentBlock(const QCString &comment,
* where to proceed parsing. FALSE indicates no further processing is
* needed.
*/
-bool parseCommentBlock(ParserInterface *parser,
+bool parseCommentBlock(OutlineParserInterface *parser,
Entry *curEntry,
const QCString &comment,
const QCString &fileName,
diff --git a/src/commentscan.l b/src/commentscan.l
index a1ce096..35001c3 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -327,8 +327,7 @@ class DocCmdMapper
{
if (m_map.find(p->cmdName)!=0)
{
- err("DocCmdMapper: command %s already added\n",p->cmdName);
- exit(1);
+ term("DocCmdMapper: command %s already added\n",p->cmdName);
}
Cmd *cmd = new Cmd;
cmd->func = p->handler;
@@ -395,7 +394,7 @@ class GuardedSection
* statics
*/
-static ParserInterface *langParser; // the language parser that is calling us
+static OutlineParserInterface *langParser; // the language parser that is calling us
static QCString inputString; // input string
static int inputPosition; // read pointer
static QCString yyFileName; // file name that is read from
@@ -3127,7 +3126,7 @@ QCString preprocessCommentBlock(const QCString &comment,
}
}
-bool parseCommentBlock(/* in */ ParserInterface *parser,
+bool parseCommentBlock(/* in */ OutlineParserInterface *parser,
/* in */ Entry *curEntry,
/* in */ const QCString &comment,
/* in */ const QCString &fileName,
@@ -3281,13 +3280,4 @@ static void handleGuard(const QCString &expr)
}
}
-
-
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void commentscanYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "commentscan.l.h"
diff --git a/src/condparser.cpp b/src/condparser.cpp
index 74e26bc..9d7ac45 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -257,7 +257,7 @@ bool CondParser::parseLevel3()
bool CondParser::parseVar()
{
- bool ans = 0;
+ bool ans = false;
switch (m_tokenType)
{
case VARIABLE:
diff --git a/src/config.xml b/src/config.xml
index 2bd1769..7dc95b4 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -927,7 +927,7 @@ Go to the <a href="commands.html">next</a> section or return to the
<docs>
<![CDATA[
If the \c HIDE_FRIEND_COMPOUNDS tag is set to \c YES, doxygen will hide all
- friend (class|struct|union) declarations.
+ friend declarations.
If set to \c NO, these declarations will be included in the
documentation.
]]>
@@ -953,7 +953,7 @@ Go to the <a href="commands.html">next</a> section or return to the
]]>
</docs>
</option>
- <option type='bool' id='CASE_SENSE_NAMES' defval='0' altdefval='portable_fileSystemIsCaseSensitive()'>
+ <option type='bool' id='CASE_SENSE_NAMES' defval='0' altdefval='Portable::fileSystemIsCaseSensitive()'>
<docs>
<![CDATA[
If the \c CASE_SENSE_NAMES tag is set to \c NO then doxygen
diff --git a/src/configimpl.l b/src/configimpl.l
index 0cc5c88..4da1634 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -56,6 +56,16 @@ void config_err(const char *fmt, ...)
vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
va_end(args);
}
+void config_term(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
+ va_end(args);
+ fprintf(stderr, "%s\n", "Exiting...");
+ exit(1);
+}
+
void config_warn(const char *fmt, ...)
{
va_list args;
@@ -213,13 +223,11 @@ QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) c
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
- config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
}
else if (opt->kind()!=ConfigOption::O_String)
{
- config_err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
}
return *((ConfigString *)opt)->valueRef();
}
@@ -229,13 +237,11 @@ QStrList &ConfigImpl::getList(const char *fileName,int num,const char *name) con
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
- config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
}
else if (opt->kind()!=ConfigOption::O_List)
{
- config_err("%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
}
return *((ConfigList *)opt)->valueRef();
}
@@ -245,13 +251,11 @@ QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) con
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
- config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
}
else if (opt->kind()!=ConfigOption::O_Enum)
{
- config_err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
}
return *((ConfigEnum *)opt)->valueRef();
}
@@ -261,13 +265,11 @@ int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
- config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
}
else if (opt->kind()!=ConfigOption::O_Int)
{
- config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
}
return *((ConfigInt *)opt)->valueRef();
}
@@ -277,13 +279,11 @@ bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
- config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
}
else if (opt->kind()!=ConfigOption::O_Bool)
{
- config_err("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name);
- exit(1);
+ config_term("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name);
}
return *((ConfigBool *)opt)->valueRef();
}
@@ -566,9 +566,8 @@ static QCString configStringRecode(
void *cd = portable_iconv_open(outputEncoding,inputEncoding);
if (cd==(void *)(-1))
{
- fprintf(stderr,"Error: unsupported character conversion: '%s'->'%s'\n",
+ config_term("Error: unsupported character conversion: '%s'->'%s'\n",
inputEncoding.data(),outputEncoding.data());
- exit(1);
}
size_t iLeft=(size_t)inputSize;
size_t oLeft=(size_t)outputSize;
@@ -583,9 +582,8 @@ static QCString configStringRecode(
}
else
{
- fprintf(stderr,"Error: failed to translate characters from %s to %s: %s\n",
+ config_term("Error: failed to translate characters from %s to %s: %s\n",
inputEncoding.data(),outputEncoding.data(),strerror(errno));
- exit(1);
}
portable_iconv_close(cd);
return output;
@@ -603,7 +601,7 @@ static FILE *tryPath(const char *path,const char *fileName)
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
- FILE *f=portable_fopen(absName,"r");
+ FILE *f=Portable::fopen(absName,"r");
if (!f) config_err("could not open file %s for reading\n",absName.data());
return f;
}
@@ -619,7 +617,7 @@ static FILE *findFile(const char *fileName)
{
return 0;
}
- if (portable_isAbsolutePath(fileName))
+ if (Portable::isAbsolutePath(fileName))
{
return tryPath(NULL, fileName);
}
@@ -638,9 +636,8 @@ static FILE *findFile(const char *fileName)
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
- config_err("maximum include depth (%d) reached, %s is not included. Aborting...\n",
+ config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
- exit(1);
}
QCString inc = incName;
@@ -678,8 +675,7 @@ static void readIncludeFile(const char *incName)
}
else
{
- config_err("@INCLUDE = %s: not found!\n",inc.data());
- exit(1);
+ config_term("@INCLUDE = %s: not found!\n",inc.data());
}
}
@@ -1012,7 +1008,7 @@ static void substEnvVarsInString(QCString &s)
while ((i=re.match(s,p,&l))!=-1 || (i=re2.match(s,p,&l))!=-1)
{
//printf("Found environment var s.mid(%d,%d)='%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
- QCString env=portable_getenv(s.mid(i+2,l-3));
+ QCString env=Portable::getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string
@@ -1161,9 +1157,8 @@ void ConfigImpl::init()
ConfigOption * opt = ConfigImpl::instance()->get(depName);
if (opt==0)
{
- config_warn("Config option '%s' has invalid depends relation on unknown option '%s'\n",
+ config_term("Config option '%s' has invalid depends relation on unknown option '%s'\n",
option->name().data(),depName.data());
- exit(1);
}
}
}
@@ -1229,8 +1224,7 @@ static QCString configFileToString(const char *name)
}
if (!fileOpened)
{
- config_err("cannot open file '%s' for reading\n",name);
- exit(1);
+ config_term("cannot open file '%s' for reading\n",name);
}
return "";
}
@@ -1321,6 +1315,38 @@ void Config::init()
ConfigImpl::instance()->init();
}
+static void checkList(QStrList &list,const char *name, bool equalRequired,bool valueRequired)
+{
+ const char *s=list.first();
+ while (s)
+ {
+ QCString item=s;
+ item=item.stripWhiteSpace();
+ int i=item.find('=');
+ if (i==-1 && equalRequired)
+ {
+ err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,item.data());
+ }
+ if (i!=-1)
+ {
+ QCString myName=item.left(i).stripWhiteSpace();
+ if (myName.isEmpty())
+ {
+ err("Illegal format for option %s, no name specified for item '%s'\n",name,item.data());
+ }
+ else if (valueRequired)
+ {
+ QCString myValue=item.right(item.length()-i-1).stripWhiteSpace();
+ if (myValue.isEmpty())
+ {
+ err("Illegal format for option %s, no value specified for item '%s'\n",name,item.data());
+ }
+ }
+ }
+ s=list.next();
+ }
+}
+
void Config::checkAndCorrect()
{
ConfigValues::instance().init();
@@ -1408,9 +1434,8 @@ void Config::checkAndCorrect()
QFileInfo fi(headerFile);
if (!fi.exists())
{
- err("tag HTML_HEADER: header file '%s' "
+ config_term("tag HTML_HEADER: header file '%s' "
"does not exist\n",headerFile.data());
- exit(1);
}
}
// Test to see if HTML footer is valid
@@ -1420,9 +1445,8 @@ void Config::checkAndCorrect()
QFileInfo fi(footerFile);
if (!fi.exists())
{
- err("tag HTML_FOOTER: footer file '%s' "
+ config_term("tag HTML_FOOTER: footer file '%s' "
"does not exist\n",footerFile.data());
- exit(1);
}
}
@@ -1435,9 +1459,8 @@ void Config::checkAndCorrect()
QFileInfo fi(MathJaxCodefile);
if (!fi.exists())
{
- err("tag MATHJAX_CODEFILE file '%s' "
+ config_term("tag MATHJAX_CODEFILE file '%s' "
"does not exist\n",MathJaxCodefile.data());
- exit(1);
}
}
QCString &path = Config_getString(MATHJAX_RELPATH);
@@ -1455,9 +1478,8 @@ void Config::checkAndCorrect()
QFileInfo fi(latexHeaderFile);
if (!fi.exists())
{
- err("tag LATEX_HEADER: header file '%s' "
+ config_term("tag LATEX_HEADER: header file '%s' "
"does not exist\n",latexHeaderFile.data());
- exit(1);
}
}
// Test to see if LaTeX footer is valid
@@ -1467,9 +1489,8 @@ void Config::checkAndCorrect()
QFileInfo fi(latexFooterFile);
if (!fi.exists())
{
- err("tag LATEX_FOOTER: footer file '%s' "
+ config_term("tag LATEX_FOOTER: footer file '%s' "
"does not exist\n",latexFooterFile.data());
- exit(1);
}
}
@@ -1484,23 +1505,60 @@ void Config::checkAndCorrect()
s=includePath.next();
}
- // check aliases
+ // check PREDEFINED
+ if (Config_getBool(ENABLE_PREPROCESSING))
+ {
+ QStrList &predefList = Config_getList(PREDEFINED);
+ s=predefList.first();
+ while (s)
+ {
+ QCString predef=s;
+ predef=predef.stripWhiteSpace();
+ int i_equals=predef.find('=');
+ int i_obrace=predef.find('(');
+ if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.at(i_equals-1)==':'))
+ {
+ err("Illegal PREDEFINED format '%s', no define name specified\n",predef.data());
+ }
+ s=predefList.next();
+ }
+ }
+
+ // check ALIASES
QStrList &aliasList = Config_getList(ALIASES);
s=aliasList.first();
while (s)
{
QRegExp re1("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*="); // alias without argument
- QRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]*}[ \t]*="); // alias with argument
+ QRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]+}[ \t]*="); // alias with argument
QCString alias=s;
alias=alias.stripWhiteSpace();
if (alias.find(re1)!=0 && alias.find(re2)!=0)
{
- err("Illegal alias format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n",
+ err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n",
alias.data());
}
s=aliasList.next();
}
+ // check FILTER_PATTERNS
+ checkList(Config_getList(FILTER_PATTERNS),"FILTER_PATTERNS",TRUE,TRUE);
+
+ // check FILTER_SOURCE_PATTERNS
+ checkList(Config_getList(FILTER_SOURCE_PATTERNS),"FILTER_SOURCE_PATTERNS",FALSE,FALSE);
+
+ // check TAGFILES
+ checkList(Config_getList(TAGFILES),"TAGFILES",FALSE,TRUE);
+
+ // check EXTRA_SEARCH_MAPPINGS
+ if (Config_getBool(SEARCHENGINE) && Config_getBool(GENERATE_HTML))
+ {
+ checkList(Config_getList(EXTRA_SEARCH_MAPPINGS),"EXTRA_SEARCH_MAPPING",TRUE,TRUE);
+ }
+
+ // check TCL_SUBST
+ checkList(Config_getList(TCL_SUBST),"TCL_SUBST",TRUE,TRUE);
+
// check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled
if (Config_getBool(GENERATE_TREEVIEW) && Config_getBool(GENERATE_HTMLHELP))
{
@@ -1579,7 +1637,7 @@ void Config::checkAndCorrect()
}
else
{
- QFileInfo dp(dotPath+"/dot"+portable_commandExtension());
+ QFileInfo dp(dotPath+"/dot"+Portable::commandExtension());
if (!dp.exists() || !dp.isFile())
{
warn_uncond("the dot tool could not be found at %s\n",dotPath.data());
@@ -1607,10 +1665,10 @@ void Config::checkAndCorrect()
QFileInfo pu(plantumlJarPath);
if (pu.exists() && pu.isDir()) // PLANTUML_JAR_PATH is directory
{
- QFileInfo jar(plantumlJarPath+portable_pathSeparator()+"plantuml.jar");
+ QFileInfo jar(plantumlJarPath+Portable::pathSeparator()+"plantuml.jar");
if (jar.exists() && jar.isFile())
{
- plantumlJarPath = jar.dirPath(TRUE).utf8()+portable_pathSeparator();
+ plantumlJarPath = jar.dirPath(TRUE).utf8()+Portable::pathSeparator();
}
else
{
@@ -1621,7 +1679,7 @@ void Config::checkAndCorrect()
}
else if (pu.exists() && pu.isFile() && plantumlJarPath.right(4)==".jar") // PLANTUML_JAR_PATH is file
{
- plantumlJarPath = pu.dirPath(TRUE).utf8()+portable_pathSeparator();
+ plantumlJarPath = pu.dirPath(TRUE).utf8()+Portable::pathSeparator();
}
else
{
@@ -1635,7 +1693,7 @@ void Config::checkAndCorrect()
QCString &diaPath = Config_getString(DIA_PATH);
if (!diaPath.isEmpty())
{
- QFileInfo dp(diaPath+"/dia"+portable_commandExtension());
+ QFileInfo dp(diaPath+"/dia"+Portable::commandExtension());
if (!dp.exists() || !dp.isFile())
{
warn_uncond("dia could not be found at %s\n",diaPath.data());
diff --git a/src/context.cpp b/src/context.cpp
index ebe6857..5ee89cd 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -1302,8 +1302,8 @@ static TemplateVariant parseDoc(const Definition *def,const QCString &file,int l
static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const QCString &relPath,
const QCString &code,int startLine=-1,int endLine=-1,bool showLineNumbers=FALSE)
{
- ParserInterface *pIntf = Doxygen::parserManager->getParser(md->getDefFileExtension());
- pIntf->resetCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(md->getDefFileExtension());
+ intf.resetCodeParserState();
QGString s;
FTextStream t(&s);
switch (g_globals.outputFormat)
@@ -1311,14 +1311,14 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- pIntf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf.parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,md->docFile());
- pIntf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf.parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
@@ -1333,8 +1333,8 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
{
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
- ParserInterface *pIntf = Doxygen::parserManager->getParser(fd->getDefFileExtension());
- pIntf->resetCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
+ intf.resetCodeParserState();
QGString s;
FTextStream t(&s);
switch (g_globals.outputFormat)
@@ -1342,7 +1342,7 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- pIntf->parseCode(codeGen,0,
+ intf.parseCode(codeGen,0,
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
@@ -1361,7 +1361,7 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,fd->docFile());
- pIntf->parseCode(codeGen,0,
+ intf.parseCode(codeGen,0,
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
@@ -1978,7 +1978,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
);
}
@@ -1987,7 +1987,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_classDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
);
}
@@ -2077,7 +2077,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
);
}
@@ -2086,7 +2086,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_classDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
);
}
@@ -3123,7 +3123,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -3132,7 +3132,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -3175,7 +3175,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -3184,7 +3184,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -3613,7 +3613,7 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
graph->writeGraph(t,GOF_BITMAP,
EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_dirDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_dirDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),
TRUE,
g_globals.dynSectionId,
@@ -3625,7 +3625,7 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
graph->writeGraph(t,GOF_EPS,
EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_dirDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_dirDef->getOutputFileBase()+".tex",
relPathAsString(),
TRUE,
g_globals.dynSectionId,
@@ -5026,7 +5026,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -5035,7 +5035,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -5098,7 +5098,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
cg->writeGraph(t,GOF_BITMAP,EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -5107,7 +5107,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
cg->writeGraph(t,GOF_EPS,EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
relPathAsString(),TRUE,g_globals.dynSectionId
);
}
@@ -5368,7 +5368,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
graph->writeGraph(t,GOF_BITMAP,
EOF_Html,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_groupDef->getOutputFileBase()+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+m_groupDef->getOutputFileBase()+Doxygen::htmlFileExtension,
relPathAsString(),
TRUE,
g_globals.dynSectionId);
@@ -5379,7 +5379,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
graph->writeGraph(t,GOF_EPS,
EOF_LaTeX,
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+m_groupDef->getOutputFileBase()+".tex",
+ g_globals.outputDir+Portable::pathSeparator()+m_groupDef->getOutputFileBase()+".tex",
relPathAsString(),
TRUE,
g_globals.dynSectionId);
@@ -8461,7 +8461,7 @@ class InheritanceGraphContext::Private
/*GOF_BITMAP,
EOF_Html,*/
g_globals.outputDir,
- g_globals.outputDir+portable_pathSeparator()+"inherits"+Doxygen::htmlFileExtension,
+ g_globals.outputDir+Portable::pathSeparator()+"inherits"+Doxygen::htmlFileExtension,
m_id);
}
return TemplateVariant(result.data(),TRUE);
diff --git a/src/declinfo.l b/src/declinfo.l
index c27af39..af94569 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -262,7 +262,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
struct yyguts_t *yyg = (struct yyguts_t*)g_yyscanner;
#ifdef FLEX_DEBUG
- yyset_debug(1,g_yyscanner);
+ declinfoYYset_debug(1,g_yyscanner);
#endif
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
@@ -347,11 +347,6 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
return;
}
-//extern "C" { // some bogus code to keep the compiler happy
-// int declinfoYYwrap() { return 1 ; }
-// void declinfoYYdummy() { yy_flex_realloc(0,0); }
-//}
-
#if 0
void dumpDecl(const char *s)
{
@@ -385,11 +380,5 @@ int main()
}
#endif
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void declinfoYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
#include "declinfo.l.h"
diff --git a/src/defargs.h b/src/defargs.h
index 1b08671..4a38723 100644
--- a/src/defargs.h
+++ b/src/defargs.h
@@ -18,10 +18,12 @@
#ifndef DEFARGS_H
#define DEFARGS_H
+#include "types.h"
+
class ArgumentList;
class QCString;
-extern void stringToArgumentList(const char *argsString,ArgumentList& argList,
+extern void stringToArgumentList(SrcLangExt lang, const char *argsString,ArgumentList& argList,
QCString *extraTypeChars=0);
#endif
diff --git a/src/defargs.l b/src/defargs.l
index a213688..9745f44 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -86,6 +86,7 @@ static int g_lastDocContext;
static int g_lastDocChar;
static int g_lastExtendsContext;
static QCString g_delimiter;
+static SrcLangExt g_lang;
static const char *stateToString(int state);
/* -----------------------------------------------------------------
@@ -481,9 +482,16 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<ReadFuncArgType,ReadFuncArgPtr>"extends" {
- g_curTypeConstraint.resize(0);
- g_lastExtendsContext=YY_START;
- BEGIN(ReadTypeConstraint);
+ if (g_lang!=SrcLangExt_Java)
+ {
+ REJECT;
+ }
+ else
+ {
+ g_curTypeConstraint.resize(0);
+ g_lastExtendsContext=YY_START;
+ BEGIN(ReadTypeConstraint);
+ }
}
<ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} {
QCString name=yytext; //resolveDefines(yytext);
@@ -601,7 +609,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
* for complex types are written to
*/
-void stringToArgumentList(const char *argsString,ArgumentList& al,QCString *extraTypeChars)
+void stringToArgumentList(SrcLangExt lang, const char *argsString,ArgumentList& al,QCString *extraTypeChars)
{
if (argsString==0) return;
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
@@ -623,6 +631,7 @@ void stringToArgumentList(const char *argsString,ArgumentList& al,QCString *extr
g_curArgDefValue.resize(0);
g_curArgName.resize(0);
g_argList = &al;
+ g_lang = lang;
defargsYYrestart( defargsYYin );
BEGIN( Start );
defargsYYlex();
@@ -635,10 +644,4 @@ void stringToArgumentList(const char *argsString,ArgumentList& al,QCString *extr
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void defargsYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "defargs.l.h"
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 5e3e511..cc3d5af 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -146,7 +146,7 @@ void generateDEFForMember(MemberDef *md,
{
const ArgumentList &defAl = md->argumentList();
ArgumentList declAl;
- stringToArgumentList(md->argsString(),declAl);
+ stringToArgumentList(md->getLanguage(),md->argsString(),declAl);
QCString fcnPrefix = " " + memPrefix + "param-";
auto defIt = defAl.begin();
@@ -572,9 +572,8 @@ void generateDEF()
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
- err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
+ term("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDirectory.data());
- exit(1);
}
else
{
diff --git a/src/definition.cpp b/src/definition.cpp
index f2b9018..e18932e 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -528,7 +528,7 @@ void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
- if (!si->generated && si->ref.isEmpty())
+ if (!si->generated && si->ref.isEmpty() && !si->label.startsWith("autotoc_md"))
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) tagFile << " ";
@@ -744,12 +744,12 @@ class FilterCache
// file already processed, get the results after filtering from the tmp file
Debug::print(Debug::FilterOutput,0,"Reusing filter result for %s from %s at offset=%d size=%d\n",
qPrint(fileName),qPrint(Doxygen::filterDBFileName),(int)item->filePos,(int)item->fileSize);
- f = portable_fopen(Doxygen::filterDBFileName,"rb");
+ f = Portable::fopen(Doxygen::filterDBFileName,"rb");
if (f)
{
bool success=TRUE;
str.resize(item->fileSize+1);
- if (portable_fseek(f,item->filePos,SEEK_SET)==-1)
+ if (Portable::fseek(f,item->filePos,SEEK_SET)==-1)
{
err("Failed to seek to position %d in filter database file %s\n",(int)item->filePos,qPrint(Doxygen::filterDBFileName));
success=FALSE;
@@ -780,8 +780,8 @@ class FilterCache
// filter file
QCString cmd=filter+" \""+fileName+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
- f = portable_popen(cmd,"r");
- FILE *bf = portable_fopen(Doxygen::filterDBFileName,"a+b");
+ f = Portable::popen(cmd,"r");
+ FILE *bf = Portable::fopen(Doxygen::filterDBFileName,"a+b");
FilterCacheItem *item = new FilterCacheItem;
item->filePos = m_endPos;
if (bf==0)
@@ -790,7 +790,7 @@ class FilterCache
err("Error opening filter database file %s\n",qPrint(Doxygen::filterDBFileName));
str.addChar('\0');
delete item;
- portable_pclose(f);
+ Portable::pclose(f);
return FALSE;
}
// append the filtered output to the database file
@@ -806,7 +806,7 @@ class FilterCache
qPrint(Doxygen::filterDBFileName),bytesWritten,bytesRead);
str.addChar('\0');
delete item;
- portable_pclose(f);
+ Portable::pclose(f);
fclose(bf);
return FALSE;
}
@@ -821,14 +821,14 @@ class FilterCache
qPrint(fileName),qPrint(Doxygen::filterDBFileName),(int)item->filePos,(int)item->fileSize);
// update end of file position
m_endPos += size;
- portable_pclose(f);
+ Portable::pclose(f);
fclose(bf);
}
else // no filtering
{
// normal file
//printf("getFileContents(%s): no filter\n",qPrint(fileName));
- f = portable_fopen(fileName,"r");
+ f = Portable::fopen(fileName,"r");
while (!feof(f))
{
int bytesRead = fread(buf,1,blockSize,f);
@@ -1262,26 +1262,26 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
{
//printf("Adding code fragment '%s' ext='%s'\n",
// codeFragment.data(),m_impl->defFileExt.data());
- ParserInterface *pIntf = Doxygen::parserManager->getParser(m_impl->defFileExt);
- pIntf->resetCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(m_impl->defFileExt);
+ intf.resetCodeParserState();
//printf("Read:\n'%s'\n\n",codeFragment.data());
const MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = dynamic_cast <const MemberDef*>(this);
ol.startCodeFragment();
- pIntf->parseCode(ol, // codeOutIntf
- scopeName, // scope
- codeFragment, // input
- m_impl->lang, // lang
- FALSE, // isExample
- 0, // exampleName
- m_impl->body->fileDef, // fileDef
- actualStart, // startLine
- actualEnd, // endLine
- TRUE, // inlineFragment
- thisMd, // memberDef
- TRUE // show line numbers
- );
+ intf.parseCode(ol, // codeOutIntf
+ scopeName, // scope
+ codeFragment, // input
+ m_impl->lang, // lang
+ FALSE, // isExample
+ 0, // exampleName
+ m_impl->body->fileDef, // fileDef
+ actualStart, // startLine
+ actualEnd, // endLine
+ TRUE, // inlineFragment
+ thisMd, // memberDef
+ TRUE // show line numbers
+ );
ol.endCodeFragment();
}
}
@@ -1606,7 +1606,7 @@ void DefinitionImpl::makePartOfGroup(GroupDef *gd)
void DefinitionImpl::setRefItems(const std::vector<ListItemInfo> &sli)
{
- m_impl->xrefListItems = sli;
+ m_impl->xrefListItems.insert(m_impl->xrefListItems.end(), sli.cbegin(), sli.cend());
}
void DefinitionImpl::mergeRefItems(Definition *d)
diff --git a/src/dia.cpp b/src/dia.cpp
index 8dab5b0..4a00a17 100644
--- a/src/dia.cpp
+++ b/src/dia.cpp
@@ -29,7 +29,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,DiaOutputFormat format)
{
QCString absOutFile = outDir;
- absOutFile+=portable_pathSeparator();
+ absOutFile+=Portable::pathSeparator();
absOutFile+=outFile;
// chdir to the output dir, so dot can find the font file.
@@ -37,7 +37,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
// go to the html output directory (i.e. path)
QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
- QCString diaExe = Config_getString(DIA_PATH)+"dia"+portable_commandExtension();
+ QCString diaExe = Config_getString(DIA_PATH)+"dia"+Portable::commandExtension();
QCString diaArgs;
QCString extension;
diaArgs+="-n ";
@@ -62,26 +62,26 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
int exitCode;
//printf("*** running: %s %s outDir:%s %s\n",diaExe.data(),diaArgs.data(),outDir,outFile);
- portable_sysTimerStart();
- if ((exitCode=portable_system(diaExe,diaArgs,FALSE))!=0)
+ Portable::sysTimerStart();
+ if ((exitCode=Portable::system(diaExe,diaArgs,FALSE))!=0)
{
err("Problems running %s. Check your installation or look typos in you dia file %s\n",
diaExe.data(),inFile);
- portable_sysTimerStop();
+ Portable::sysTimerStop();
goto error;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
if ( (format==DIA_EPS) && (Config_getBool(USE_PDFLATEX)) )
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
outFile,outFile);
- portable_sysTimerStart();
- if (portable_system("epstopdf",epstopdfArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
err("Problems running epstopdf. Check your TeX installation!\n");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
}
error:
diff --git a/src/diagram.cpp b/src/diagram.cpp
index edc895d..18817e9 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -1101,8 +1101,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
f1.setName(epsName.data());
if (!f1.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",f1.name().data());
- exit(1);
+ term("Could not open file %s for writing\n",f1.name().data());
}
FTextStream t(&f1);
@@ -1338,14 +1337,14 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
epsBaseName.data(),epsBaseName.data());
//printf("Converting eps using '%s'\n",epstopdfArgs.data());
- portable_sysTimerStart();
- if (portable_system("epstopdf",epstopdfArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
err("Problems running epstopdf. Check your TeX installation!\n");
- portable_sysTimerStop();
+ Portable::sysTimerStop();
return;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
}
}
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index 083aac3..51f37db 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -289,8 +289,7 @@ void DocbookGenerator::init()
QDir d(dir);
if (!d.exists() && !d.mkdir(dir))
{
- err("Could not create output directory %s\n",dir.data());
- exit(1);
+ term("Could not create output directory %s\n",dir.data());
}
createSubDirs(d);
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index ce3a845..43673de 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -36,6 +36,7 @@
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
+#include "growbuf.h"
#if 0
#define DB_VIS_C DB_VIS_C1(m_t)
@@ -49,6 +50,25 @@
#define DB_VIS_C2a(x,y)
#endif
+static QCString filterId(const char *s)
+{
+ static GrowBuf growBuf;
+ growBuf.clear();
+ if (s==0) return "";
+ const unsigned char *p=(const unsigned char *)s;
+ char c;
+ while ((c=*p++))
+ {
+ switch (c)
+ {
+ case ':': growBuf.addStr("_1"); break;
+ default: growBuf.addChar(c); break;
+ }
+ }
+ growBuf.addChar(0);
+ return growBuf.get();
+}
+
void DocbookDocVisitor::visitCaption(const QList<DocNode> &children)
{
QListIterator<DocNode> cli(children);
@@ -280,8 +300,8 @@ DB_VIS_C
{
case DocVerbatim::Code: // fall though
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,s->context(),s->text(),langExt,
+ Doxygen::parserManager->getCodeParser(m_langExt)
+ .parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
m_t << "</computeroutput></literallayout>";
break;
@@ -374,7 +394,7 @@ void DocbookDocVisitor::visit(DocAnchor *anc)
{
DB_VIS_C
if (m_hide) return;
- m_t << "<anchor xml:id=\"_" << stripPath(anc->file()) << "_1" << anc->anchor() << "\"/>";
+ m_t << "<anchor xml:id=\"_" << stripPath(anc->file()) << "_1" << filterId(anc->anchor()) << "\"/>";
}
void DocbookDocVisitor::visit(DocInclude *inc)
@@ -389,8 +409,8 @@ DB_VIS_C
m_t << "<literallayout><computeroutput>";
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -401,8 +421,8 @@ DB_VIS_C
break;
case DocInclude::Include:
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -421,8 +441,8 @@ DB_VIS_C
break;
case DocInclude::Snippet:
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -436,8 +456,8 @@ DB_VIS_C
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -489,8 +509,8 @@ DB_VIS_C
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(m_ci,op->context(),
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(m_ci,op->context(),
op->text(),langExt,op->isExample(),
op->exampleFile(),
fd, // fileDef
@@ -550,7 +570,7 @@ void DocbookDocVisitor::visit(DocCite *cite)
{
DB_VIS_C
if (m_hide) return;
- if (!cite->file().isEmpty()) startLink(cite->file(),cite->anchor());
+ if (!cite->file().isEmpty()) startLink(cite->file(),filterId(cite->anchor()));
filter(cite->text());
if (!cite->file().isEmpty()) endLink();
}
diff --git a/src/docgroup.h b/src/docgroup.h
index 47a0a3e..3ccef0d 100644
--- a/src/docgroup.h
+++ b/src/docgroup.h
@@ -42,9 +42,9 @@ class DocGroup
private:
int findExistingGroup(int &groupId,const MemberGroupInfo *info);
- int m_openCount;
+ int m_openCount = 0;
QCString m_memberGroupHeader;
- int m_memberGroupId;
+ int m_memberGroupId = 0;
QCString m_memberGroupRelates;
QCString m_memberGroupDocs;
std::vector<Grouping> m_autoGroupStack;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 9856efa..a8d13d9 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -287,8 +287,17 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
bool ambig;
FileDef *fd;
//printf("Search for %s\n",fileName);
- if ((fd=findFileDef(Doxygen::imageNameDict,fileName,ambig)) && !ambig)
+ if (fd=findFileDef(Doxygen::imageNameDict,fileName,ambig))
{
+ if (ambig & dowarn)
+ {
+ QCString text;
+ text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
+ text+="Possible candidates:\n";
+ text+=showFileDefMatches(Doxygen::imageNameDict,fileName);
+ warn_doc_error(g_fileName,doctokenizerYYlineno,text);
+ }
+
QCString inputFile = fd->absFilePath();
QFile inImage(inputFile);
if (inImage.open(IO_ReadOnly))
@@ -369,26 +378,15 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
outputDir.data(), baseName.data(),
outputDir.data(), baseName.data());
- portable_sysTimerStart();
- if (portable_system("epstopdf",epstopdfArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
err("Problems running epstopdf. Check your TeX installation!\n");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
return baseName;
}
}
- else if (ambig)
- {
- if (dowarn)
- {
- QCString text;
- text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
- text+="Possible candidates:\n";
- text+=showFileDefMatches(Doxygen::imageNameDict,fileName);
- warn_doc_error(g_fileName,doctokenizerYYlineno,text);
- }
- }
else
{
result=fileName;
@@ -1818,7 +1816,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
static void readTextFileByName(const QCString &file,QCString &text)
{
- if (portable_isAbsolutePath(file.data()))
+ if (Portable::isAbsolutePath(file.data()))
{
QFileInfo fi(file);
if (fi.exists())
@@ -1831,7 +1829,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
char *s=examplePathList.first();
while (s)
{
- QCString absFileName = QCString(s)+portable_pathSeparator()+file;
+ QCString absFileName = QCString(s)+Portable::pathSeparator()+file;
QFileInfo fi(absFileName);
if (fi.exists())
{
@@ -1844,16 +1842,16 @@ static void readTextFileByName(const QCString &file,QCString &text)
// as a fallback we also look in the exampleNameDict
bool ambig;
FileDef *fd;
- if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)) && !ambig)
+ if (fd=findFileDef(Doxygen::exampleNameDict,file,ambig))
{
text = fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES));
- }
- else if (ambig)
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"included file name %s is ambiguous"
+ if (ambig)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"included file name %s is ambiguous"
"Possible candidates:\n%s",qPrint(file),
qPrint(showFileDefMatches(Doxygen::exampleNameDict,file))
);
+ }
}
else
{
@@ -2749,17 +2747,17 @@ bool DocDotFile::parse()
{
fd = findFileDef(Doxygen::dotFileNameDict,m_name+".dot",ambig);
}
- if (fd && !ambig)
+ if (fd)
{
m_file = fd->absFilePath();
ok = true;
- }
- else if (ambig)
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"included dot file name %s is ambiguous.\n"
+ if (ambig)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"included dot file name %s is ambiguous.\n"
"Possible candidates:\n%s",qPrint(m_name),
qPrint(showFileDefMatches(Doxygen::dotFileNameDict,m_name))
);
+ }
}
else
{
@@ -2786,17 +2784,17 @@ bool DocMscFile::parse()
{
fd = findFileDef(Doxygen::mscFileNameDict,m_name+".msc",ambig);
}
- if (fd && !ambig)
+ if (fd)
{
m_file = fd->absFilePath();
ok = true;
- }
- else if (ambig)
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"included msc file name %s is ambiguous.\n"
+ if (ambig)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"included msc file name %s is ambiguous.\n"
"Possible candidates:\n%s",qPrint(m_name),
qPrint(showFileDefMatches(Doxygen::mscFileNameDict,m_name))
);
+ }
}
else
{
@@ -2825,17 +2823,17 @@ bool DocDiaFile::parse()
{
fd = findFileDef(Doxygen::diaFileNameDict,m_name+".dia",ambig);
}
- if (fd && !ambig)
+ if (fd)
{
m_file = fd->absFilePath();
ok = true;
- }
- else if (ambig)
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"included dia file name %s is ambiguous.\n"
+ if (ambig)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"included dia file name %s is ambiguous.\n"
"Possible candidates:\n%s",qPrint(m_name),
qPrint(showFileDefMatches(Doxygen::diaFileNameDict,m_name))
);
+ }
}
else
{
@@ -2894,7 +2892,7 @@ bool DocImage::isSVG() const
QCString locName = m_url.isEmpty() ? m_name : m_url;
int len = locName.length();
int fnd = locName.find('?'); // ignore part from ? until end
- if (fnd!=-1) fnd=len;
+ if (fnd==-1) fnd=len;
return fnd>=4 && locName.mid(fnd-4,4)==".svg";
}
@@ -6292,7 +6290,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
break;
case HTML_UNKNOWN:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported xml/html tag <%s> found", qPrint(tagName));
- m_children.append(new DocWord(this, "<"+tagName+tagHtmlAttribs.toString()+">"));
+ m_children.append(new DocWord(this, "<"+tagName+g_token->attribsStr+">"));
break;
case XML_INHERITDOC:
handleInheritDoc();
diff --git a/src/docparser.h b/src/docparser.h
index 151f95e..2d53429 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -173,10 +173,10 @@ class DocNode
protected:
/*! Sets whether or not this item is inside a preformatted section */
void setInsidePreformatted(bool p) { m_insidePre = p; }
- DocNode *m_parent;
+ DocNode *m_parent = 0;
private:
- bool m_insidePre;
+ bool m_insidePre = false;
};
/** Default accept implementation for compound nodes in the abstract
@@ -294,7 +294,7 @@ class DocURL : public DocNode
private:
QCString m_url;
- bool m_isEmail;
+ bool m_isEmail = false;
};
/** Node representing a line break */
@@ -401,9 +401,9 @@ class DocStyleChange : public DocNode
const HtmlAttribList &attribs() const { return m_attribs; }
private:
- uint m_position;
- Style m_style;
- bool m_enable;
+ uint m_position = 0;
+ Style m_style = Bold;
+ bool m_enable = false;
HtmlAttribList m_attribs;
};
@@ -488,7 +488,7 @@ class DocSymbol : public DocNode
static SymType decodeSymbol(const QCString &symName);
private:
- SymType m_symbol;
+ SymType m_symbol = Sym_Unknown;
};
/** Node representing a n emoji */
@@ -503,7 +503,7 @@ class DocEmoji : public DocNode
private:
QCString m_symName;
- int m_index;
+ int m_index = 0;
};
/** Node representing some amount of white space */
@@ -562,12 +562,12 @@ class DocVerbatim : public DocNode
private:
QCString m_context;
QCString m_text;
- Type m_type;
- bool m_isExample;
+ Type m_type = Code;
+ bool m_isExample = false;
QCString m_exampleFile;
QCString m_relPath;
QCString m_lang;
- bool m_isBlock;
+ bool m_isBlock = false;
QCString m_width;
QCString m_height;
QList<DocNode> m_children;
@@ -610,9 +610,9 @@ class DocInclude : public DocNode
QCString m_file;
QCString m_context;
QCString m_text;
- Type m_type;
- bool m_isExample;
- bool m_isBlock;
+ Type m_type = Include;
+ bool m_isExample = false;
+ bool m_isBlock = false;
QCString m_exampleFile;
QCString m_blockId;
};
@@ -656,15 +656,15 @@ class DocIncOperator : public DocNode
void parse();
private:
- Type m_type;
- int m_line;
- bool m_showLineNo;
+ Type m_type = Line;
+ int m_line = 0;
+ bool m_showLineNo = false;
QCString m_text;
QCString m_pattern;
QCString m_context;
- bool m_isFirst;
- bool m_isLast;
- bool m_isExample;
+ bool m_isFirst = false;
+ bool m_isLast = false;
+ bool m_isExample = false;
QCString m_exampleFile;
QCString m_includeFileName;
};
@@ -686,7 +686,7 @@ class DocFormula : public DocNode
QCString m_name;
QCString m_text;
QCString m_relPath;
- int m_id;
+ int m_id = 0;
};
/** Node representing an entry in the index. */
@@ -704,8 +704,8 @@ class DocIndexEntry : public DocNode
private:
QCString m_entry;
- const Definition *m_scope;
- const MemberDef *m_member;
+ const Definition *m_scope = 0;
+ const MemberDef *m_member = 0;
};
//-----------------------------------------------------------------------
@@ -722,9 +722,9 @@ class DocAutoList : public CompAccept<DocAutoList>
int parse();
private:
- int m_indent;
- bool m_isEnumList;
- int m_depth;
+ int m_indent = 0;
+ bool m_isEnumList = false;
+ int m_depth = 0;
};
/** Node representing an item of a auto list */
@@ -737,8 +737,8 @@ class DocAutoListItem : public CompAccept<DocAutoListItem>
int parse();
private:
- int m_indent;
- int m_itemNum;
+ int m_indent = 0;
+ int m_itemNum = 0;
};
@@ -770,7 +770,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>
bool parse();
private:
- int m_id;
+ int m_id = 0;
QCString m_key;
QCString m_file;
QCString m_anchor;
@@ -801,12 +801,12 @@ class DocImage : public CompAccept<DocImage>
private:
HtmlAttribList m_attribs;
QCString m_name;
- Type m_type;
+ Type m_type = Html;
QCString m_width;
QCString m_height;
QCString m_relPath;
QCString m_url;
- bool m_inlineImage;
+ bool m_inlineImage = false;
};
/** Node representing a dot file */
@@ -929,8 +929,8 @@ class DocRef : public CompAccept<DocRef>
private:
enum RefType { Unknown, Anchor, Section, Table };
- RefType m_refType;
- bool m_isSubPage;
+ RefType m_refType = Unknown;
+ bool m_isSubPage = false;
QCString m_file;
QCString m_relPath;
QCString m_ref;
@@ -986,7 +986,7 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader>
int parse();
private:
- int m_level;
+ int m_level = 0;
HtmlAttribList m_attribs;
};
@@ -1033,7 +1033,7 @@ class DocSection : public CompAccept<DocSection>
int parse();
private:
- int m_level;
+ int m_level = 0;
QCString m_id;
QCString m_title;
QCString m_anchor;
@@ -1117,7 +1117,7 @@ class DocHtmlList : public CompAccept<DocHtmlList>
int parseXml();
private:
- Type m_type;
+ Type m_type = Unordered;
HtmlAttribList m_attribs;
};
@@ -1143,8 +1143,8 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>
bool hasTitle() const { return m_title->hasTitle(); }
private:
- Type m_type;
- DocTitle * m_title;
+ Type m_type = Unknown;
+ DocTitle * m_title = 0;
};
/** Node representing a separator between two simple sections of the
@@ -1183,9 +1183,9 @@ class DocParamSect : public CompAccept<DocParamSect>
bool hasTypeSpecifier() const { return m_hasTypeSpecifier; }
private:
- Type m_type;
- bool m_hasInOutSpecifier;
- bool m_hasTypeSpecifier;
+ Type m_type = Unknown;
+ bool m_hasInOutSpecifier = false;
+ bool m_hasTypeSpecifier = false;
};
/** Node representing a paragraph in the documentation tree */
@@ -1230,8 +1230,8 @@ class DocPara : public CompAccept<DocPara>
private:
QCString m_sectionId;
- bool m_isFirst;
- bool m_isLast;
+ bool m_isFirst = false;
+ bool m_isLast = false;
HtmlAttribList m_attribs;
};
@@ -1271,10 +1271,10 @@ class DocParamList : public DocNode
QList<DocPara> m_paragraphs;
QList<DocNode> m_params;
QList<DocNode> m_paramTypes;
- DocParamSect::Type m_type;
- DocParamSect::Direction m_dir;
- bool m_isFirst;
- bool m_isLast;
+ DocParamSect::Type m_type = DocParamSect::Unknown;
+ DocParamSect::Direction m_dir = DocParamSect::Unspecified;
+ bool m_isFirst = false;
+ bool m_isLast = false;
};
/** Node representing a simple list item */
@@ -1294,7 +1294,7 @@ class DocSimpleListItem : public DocNode
}
private:
- DocPara *m_paragraph;
+ DocPara *m_paragraph = 0;
};
/** Node representing a HTML list item */
@@ -1311,7 +1311,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>
private:
HtmlAttribList m_attribs;
- int m_itemNum;
+ int m_itemNum = 0;
};
/** Node representing a HTML description data */
@@ -1355,12 +1355,12 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>
private:
void setRowIndex(int idx) { m_rowIdx = idx; }
void setColumnIndex(int idx) { m_colIdx = idx; }
- bool m_isHeading;
- bool m_isFirst;
- bool m_isLast;
+ bool m_isHeading = false;
+ bool m_isFirst = false;
+ bool m_isLast = false;
HtmlAttribList m_attribs;
- int m_rowIdx;
- int m_colIdx;
+ int m_rowIdx = -1;
+ int m_colIdx = -1;
};
/** Node representing a HTML table caption */
@@ -1377,7 +1377,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>
private:
HtmlAttribList m_attribs;
- bool m_hasCaptionId;
+ bool m_hasCaptionId = false;
QCString m_file;
QCString m_anchor;
};
@@ -1414,8 +1414,8 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>
private:
void setRowIndex(int idx) { m_rowIdx = idx; }
HtmlAttribList m_attribs;
- int m_visibleCells;
- int m_rowIdx;
+ int m_visibleCells = -1;
+ int m_rowIdx = -1;
};
/** Node representing a HTML table */
@@ -1442,9 +1442,9 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>
private:
void computeTableGrid();
- DocHtmlCaption *m_caption;
+ DocHtmlCaption *m_caption = 0;
HtmlAttribList m_attribs;
- int m_numCols;
+ int m_numCols = 0;
};
/** Node representing an HTML blockquote */
@@ -1483,8 +1483,8 @@ class DocRoot : public CompAccept<DocRoot>
bool isEmpty() const { return m_children.isEmpty(); }
private:
- bool m_indent;
- bool m_singleLine;
+ bool m_indent = false;
+ bool m_singleLine = false;
};
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 7024b34..a838923 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -62,8 +62,7 @@ void DocSets::initialize()
QFile makefile(mfName);
if (!makefile.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",mfName.data());
- exit(1);
+ term("Could not open file %s for writing\n",mfName.data());
}
FTextStream ts(&makefile);
@@ -113,8 +112,7 @@ void DocSets::initialize()
QFile plist(plName);
if (!plist.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",plName.data());
- exit(1);
+ term("Could not open file %s for writing\n",plName.data());
}
FTextStream ts(&plist);
@@ -149,8 +147,7 @@ void DocSets::initialize()
m_nf = new QFile(notes);
if (!m_nf->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",notes.data());
- exit(1);
+ term("Could not open file %s for writing\n",notes.data());
}
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
@@ -170,8 +167,7 @@ void DocSets::initialize()
m_tf = new QFile(tokens);
if (!m_tf->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",tokens.data());
- exit(1);
+ term("Could not open file %s for writing\n",tokens.data());
}
m_tts.setDevice(m_tf);
m_tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index f89069c..e01f045 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -80,8 +80,8 @@ struct TokenInfo
// comment blocks
// list token info
- bool isEnumList;
- int indent;
+ bool isEnumList = false;
+ int indent = 0;
// sections
QCString sectionId;
@@ -94,22 +94,23 @@ struct TokenInfo
QCString verb;
// xrefitem
- int id;
+ int id = -1;
// html tag
HtmlAttribList attribs;
- bool endTag;
- bool emptyTag;
+ bool endTag = false;
+ bool emptyTag = false;
+ QCString attribsStr;
// whitespace
QCString chars;
// url
- bool isEMailAddr;
+ bool isEMailAddr = false;
// param attributes
enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 };
- ParamDir paramDir;
+ ParamDir paramDir = Unspecified;
};
// globals
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index cd5e242..640df34 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -203,6 +203,7 @@ static void handleHtmlTag()
// Parse the attributes. Each attribute is a name, value pair
// The result is stored in g_token->attribs.
int startName,endName,startAttrib,endAttrib;
+ int startAttribList = i;
while (i<(int)yyleng)
{
char c=tagText.at(i);
@@ -237,7 +238,7 @@ static void handleHtmlTag()
// search for matching quote
while (i<(int)yyleng && c!='\'') { c=tagText.at(++i); }
endAttrib=i;
- if (i<(int)yyleng) c=tagText.at(++i);
+ if (i<(int)yyleng) { c=tagText.at(++i);}
}
else if (tagText.at(i)=='"') // option "..."
{
@@ -246,7 +247,7 @@ static void handleHtmlTag()
// search for matching quote
while (i<(int)yyleng && c!='"') { c=tagText.at(++i); }
endAttrib=i;
- if (i<(int)yyleng) c=tagText.at(++i);
+ if (i<(int)yyleng) { c=tagText.at(++i);}
}
else // value without any quotes
{
@@ -254,7 +255,7 @@ static void handleHtmlTag()
// search for separator or end symbol
while (i<(int)yyleng && !isspace((uchar)c) && c!='>') { c=tagText.at(++i); }
endAttrib=i;
- if (i<(int)yyleng) c=tagText.at(++i);
+ if (i<(int)yyleng) { c=tagText.at(++i);}
}
opt.value = tagText.mid(startAttrib,endAttrib-startAttrib);
if (opt.name == "align") opt.value = opt.value.lower();
@@ -271,6 +272,7 @@ static void handleHtmlTag()
// opt.name.data(),opt.value.data());
g_token->attribs.append(&opt);
}
+ g_token->attribsStr = tagText.mid(startAttribList,i-startAttribList);
}
static QCString stripEmptyLines(const QCString &s)
@@ -344,7 +346,9 @@ PHPTYPE [\\:a-z_A-Z0-9\x80-\xFF\-]+
CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
-MAILTOADDR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
+MAILADDR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
+MAILWS [\t a-z_A-Z0-9+-]
+MAILADDR2 {MAILWS}+{BLANK}+("at"|"AT"|"_at_"|"_AT_"){BLANK}+{MAILWS}+("dot"|"DOT"|"_dot_"|"_DOT_"){BLANK}+{MAILWS}+
OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*[-]("#")?{WS}
MLISTITEM {BLANK}*[+*]{WS}
@@ -642,19 +646,23 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->isEMailAddr=FALSE;
return TK_URL;
}
-<St_Para>{MAILTOADDR} { // Mail address
+<St_Para>{MAILADDR} { // Mail address
g_token->name=yytext;
g_token->name.stripPrefix("mailto:");
g_token->isEMailAddr=TRUE;
return TK_URL;
}
-<St_Para>"<"{MAILTOADDR}">" { // Mail address
+<St_Para>"<"{MAILADDR}">" { // Mail address
g_token->name=yytext;
g_token->name = g_token->name.mid(1,g_token->name.length()-2);
g_token->name.stripPrefix("mailto:");
g_token->isEMailAddr=TRUE;
return TK_URL;
}
+<St_Para>"<"{MAILADDR2}">" { // anti spam mail address
+ g_token->name=yytext;
+ return TK_WORD;
+ }
<St_Para>"$"{ID}":"[^:\n$][^\n$]*"$" { /* RCS tag */
QCString tagName(yytext+1);
int index=tagName.find(':');
@@ -674,7 +682,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" { /* environment variable */
QCString name = &yytext[2];
name = name.left(name.length()-1);
- QCString value = portable_getenv(name);
+ QCString value = Portable::getenv(name);
for (int i=value.length()-1;i>=0;i--) unput(value.at(i));
}
<St_Para>{HTMLTAG} { /* html tag */
@@ -1611,10 +1619,5 @@ void doctokenizerYYendAutoList()
// printlex(yy_flex_debug, FALSE, __FILE__, g_fileName);
// return retval;
//}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
#include "doctokenizer.l.h"
diff --git a/src/dot.cpp b/src/dot.cpp
index 5ad3916..f26bee4 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -38,12 +38,12 @@ static QCString g_dotFontPath;
static void setDotFontPath(const char *path)
{
ASSERT(g_dotFontPath.isEmpty());
- g_dotFontPath = portable_getenv("DOTFONTPATH");
+ g_dotFontPath = Portable::getenv("DOTFONTPATH");
QCString newFontPath = Config_getString(DOT_FONTPATH);
QCString spath = path;
if (!newFontPath.isEmpty() && !spath.isEmpty())
{
- newFontPath.prepend(spath+portable_pathListSeparator());
+ newFontPath.prepend(spath+Portable::pathListSeparator());
}
else if (newFontPath.isEmpty() && !spath.isEmpty())
{
@@ -51,21 +51,21 @@ static void setDotFontPath(const char *path)
}
else
{
- portable_unsetenv("DOTFONTPATH");
+ Portable::unsetenv("DOTFONTPATH");
return;
}
- portable_setenv("DOTFONTPATH",newFontPath);
+ Portable::setenv("DOTFONTPATH",newFontPath);
}
static void unsetDotFontPath()
{
if (g_dotFontPath.isEmpty())
{
- portable_unsetenv("DOTFONTPATH");
+ Portable::unsetenv("DOTFONTPATH");
}
else
{
- portable_setenv("DOTFONTPATH",g_dotFontPath);
+ Portable::setenv("DOTFONTPATH",g_dotFontPath);
}
g_dotFontPath="";
}
@@ -183,7 +183,7 @@ bool DotManager::run() const
setDotFontPath(Config_getString(DOCBOOK_OUTPUT));
setPath=TRUE;
}
- portable_sysTimerStart();
+ Portable::sysTimerStart();
// fill work queue with dot operations
DotRunner *dr;
int prev=1;
@@ -211,7 +211,7 @@ bool DotManager::run() const
msg("Running dot for graph %d/%d\n",prev,numDotRuns);
prev++;
}
- portable_sleep(100);
+ Portable::sleep(100);
}
while ((int)numDotRuns>=prev)
{
@@ -229,7 +229,7 @@ bool DotManager::run() const
m_workers.at(i)->wait();
}
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
if (setPath)
{
unsetDotFontPath();
@@ -272,7 +272,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
QDir d(outDir);
if (!d.exists())
{
- err("Output dir %s does not exist!\n",outDir); exit(1);
+ term("Output dir %s does not exist!\n",outDir);
}
QCString imgExt = getDotImageExtension();
@@ -325,7 +325,7 @@ void writeDotImageMapFromFile(FTextStream &t,
QDir d(outDir);
if (!d.exists())
{
- err("Output dir %s does not exist!\n",outDir.data()); exit(1);
+ term("Output dir %s does not exist!\n",outDir.data());
}
QCString mapName = baseName+".map";
diff --git a/src/dotcallgraph.cpp b/src/dotcallgraph.cpp
index 15d408a..b024f09 100644
--- a/src/dotcallgraph.cpp
+++ b/src/dotcallgraph.cpp
@@ -212,6 +212,11 @@ bool DotCallGraph::isTrivial() const
bool DotCallGraph::isTooBig() const
{
- int numNodes = m_startNode->children() ? m_startNode->children()->count() : 0;
- return numNodes>=DOT_GRAPH_MAX_NODES;
+ return numNodes()>=DOT_GRAPH_MAX_NODES;
}
+
+int DotCallGraph::numNodes() const
+{
+ return m_startNode->children() ? m_startNode->children()->count() : 0;
+}
+
diff --git a/src/dotcallgraph.h b/src/dotcallgraph.h
index c96b9cf..bba976c 100644
--- a/src/dotcallgraph.h
+++ b/src/dotcallgraph.h
@@ -28,6 +28,7 @@ class DotCallGraph : public DotGraph
~DotCallGraph();
bool isTrivial() const;
bool isTooBig() const;
+ int numNodes() const;
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
const char *path,const char *fileName,
const char *relPath,bool writeImageMap=TRUE,
diff --git a/src/dotclassgraph.cpp b/src/dotclassgraph.cpp
index 3f5d228..da272b4 100644
--- a/src/dotclassgraph.cpp
+++ b/src/dotclassgraph.cpp
@@ -420,13 +420,18 @@ bool DotClassGraph::isTrivial() const
bool DotClassGraph::isTooBig() const
{
+ return numNodes()>=DOT_GRAPH_MAX_NODES;
+}
+
+int DotClassGraph::numNodes() const
+{
int numNodes = 0;
numNodes+= m_startNode->children() ? m_startNode->children()->count() : 0;
if (m_graphType==Inheritance)
{
numNodes+= m_startNode->parents() ? m_startNode->parents()->count() : 0;
}
- return numNodes>=DOT_GRAPH_MAX_NODES;
+ return numNodes;
}
DotClassGraph::~DotClassGraph()
diff --git a/src/dotclassgraph.h b/src/dotclassgraph.h
index b3b9291..1874f54 100644
--- a/src/dotclassgraph.h
+++ b/src/dotclassgraph.h
@@ -28,6 +28,7 @@ public:
~DotClassGraph();
bool isTrivial() const;
bool isTooBig() const;
+ int numNodes() const;
QCString writeGraph(FTextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
const char *path, const char *fileName, const char *relPath,
bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1);
diff --git a/src/dotdirdeps.h b/src/dotdirdeps.h
index f5eef65..a71e8f1 100644
--- a/src/dotdirdeps.h
+++ b/src/dotdirdeps.h
@@ -43,9 +43,9 @@ class DotDirDeps : public DotGraph
virtual QCString getImgAltText() const;
private:
- const DirDef *m_dir;
+ const DirDef *m_dir = 0;
- bool m_linkRelations;
+ bool m_linkRelations = false;
};
#endif
diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp
index 0a7942f..3d56de8 100644
--- a/src/dotgfxhierarchytable.cpp
+++ b/src/dotgfxhierarchytable.cpp
@@ -86,7 +86,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,
// store the original directory
if (!d.exists())
{
- err("Output dir %s does not exist!\n",path); exit(1);
+ term("Output dir %s does not exist!\n",path);
}
// put each connected subgraph of the hierarchy in a row of the HTML output
diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp
index 9b7ddb7..0bfa712 100644
--- a/src/dotgraph.cpp
+++ b/src/dotgraph.cpp
@@ -147,7 +147,7 @@ bool DotGraph::prepareDotFile()
{
if (!m_dir.exists())
{
- err("Output dir %s does not exist!\n", m_dir.path().data()); exit(1);
+ term("Output dir %s does not exist!\n", m_dir.path().data());
}
QCString sigStr(33);
diff --git a/src/dotgraph.h b/src/dotgraph.h
index 0eda3a8..edba009 100644
--- a/src/dotgraph.h
+++ b/src/dotgraph.h
@@ -74,22 +74,22 @@ class DotGraph
QCString relImgName() const { return m_relPath + imgName(); }
// the following variables are used while writing the graph to a .dot file
- GraphOutputFormat m_graphFormat;
- EmbeddedOutputFormat m_textFormat;
+ GraphOutputFormat m_graphFormat = GOF_BITMAP;
+ EmbeddedOutputFormat m_textFormat = EOF_Html;
QDir m_dir;
QCString m_fileName;
QCString m_relPath;
- bool m_generateImageMap;
- int m_graphId;
+ bool m_generateImageMap = false;
+ int m_graphId = 0;
QCString m_absPath;
QCString m_baseName;
QGString m_theGraph;
- bool m_regenerate;
- bool m_doNotAddImageToIndex;
- bool m_noDivTag;
- bool m_zoomable;
- bool m_urlOnly;
+ bool m_regenerate = false;
+ bool m_doNotAddImageToIndex = false;
+ bool m_noDivTag = false;
+ bool m_zoomable = true;
+ bool m_urlOnly = false;
private:
DotGraph(const DotGraph &);
diff --git a/src/dotgroupcollaboration.cpp b/src/dotgroupcollaboration.cpp
index f9a11e7..0a56460 100644
--- a/src/dotgroupcollaboration.cpp
+++ b/src/dotgroupcollaboration.cpp
@@ -42,6 +42,16 @@ DotGroupCollaboration::DotGroupCollaboration(const GroupDef* gd)
DotGroupCollaboration::~DotGroupCollaboration()
{
+ // delete all created Nodes saved in m_usedNodes:QDict
+ if(m_usedNodes != NULL)
+ {
+ QDictIterator<DotNode> it(*m_usedNodes);
+ for(;it.current(); ++it)
+ {
+ delete it.current();
+ }
+ }
+
delete m_usedNodes;
}
diff --git a/src/dotincldepgraph.cpp b/src/dotincldepgraph.cpp
index 23588db..05a96d9 100644
--- a/src/dotincldepgraph.cpp
+++ b/src/dotincldepgraph.cpp
@@ -213,8 +213,12 @@ bool DotInclDepGraph::isTrivial() const
bool DotInclDepGraph::isTooBig() const
{
- int numNodes = m_startNode->children() ? m_startNode->children()->count() : 0;
- return numNodes>=Config_getInt(DOT_GRAPH_MAX_NODES);
+ return numNodes()>=Config_getInt(DOT_GRAPH_MAX_NODES);
+}
+
+int DotInclDepGraph::numNodes() const
+{
+ return m_startNode->children() ? m_startNode->children()->count() : 0;
}
void DotInclDepGraph::writeXML(FTextStream &t)
diff --git a/src/dotincldepgraph.h b/src/dotincldepgraph.h
index b664ccb..5807ce8 100644
--- a/src/dotincldepgraph.h
+++ b/src/dotincldepgraph.h
@@ -32,6 +32,7 @@ class DotInclDepGraph : public DotGraph
bool writeImageMap=TRUE,int graphId=-1);
bool isTrivial() const;
bool isTooBig() const;
+ int numNodes() const;
void writeXML(FTextStream &t);
void writeDocbook(FTextStream &t);
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index a97d8af..fbfeaca 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -34,7 +34,7 @@
// support the PNG format, we need to check the result.
static void checkPngResult(const char *imgName)
{
- FILE *f = portable_fopen(imgName,"rb");
+ FILE *f = Portable::fopen(imgName,"rb");
if (f)
{
char data[4];
@@ -115,7 +115,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
{
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
int bblen = strlen(bb);
- FILE *f = portable_fopen(fileName,"rb");
+ FILE *f = Portable::fopen(fileName,"rb");
if (!f)
{
//printf("readBoundingBox: could not open %s\n",fileName);
@@ -191,14 +191,14 @@ bool DotRunner::run()
dotArgs+=' ';
dotArgs+=s->args.data();
}
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
}
else
{
for (li.toFirst();(s=li.current());++li)
{
dotArgs=QCString("\"")+m_file.data()+"\" "+s->args.data();
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
}
}
@@ -214,7 +214,7 @@ bool DotRunner::run()
{
if (!resetPDFSize(width,height,getBaseNameOfOutput(s->output.data()))) goto error;
dotArgs=QCString("\"")+m_file.data()+"\" "+s->args.data();
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
}
}
@@ -228,14 +228,14 @@ bool DotRunner::run()
if (m_cleanUp)
{
//printf("removing dot file %s\n",m_file.data());
- portable_unlink(m_file.data());
+ Portable::unlink(m_file.data());
}
// create checksum file
if (!m_md5Hash.isEmpty())
{
QCString md5Name = getBaseNameOfOutput(m_file.data()) + ".md5";
- FILE *f = portable_fopen(md5Name,"w");
+ FILE *f = Portable::fopen(md5Name,"w");
if (f)
{
fwrite(m_md5Hash.data(),1,32,f);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 02764d1..d760678 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -75,10 +75,12 @@
#include "searchindex.h"
#include "parserintf.h"
#include "htags.h"
+#include "pycode.h"
#include "pyscanner.h"
+#include "fortrancode.h"
#include "fortranscanner.h"
-#include "xmlscanner.h"
-#include "sqlscanner.h"
+#include "xmlcode.h"
+#include "sqlcode.h"
#include "tclscanner.h"
#include "code.h"
#include "objcache.h"
@@ -104,6 +106,7 @@
#include "fileparser.h"
#include "emoji.h"
#include "plantuml.h"
+#include "stlsupport.h"
// provided by the generated file resources.cpp
extern void initResources();
@@ -323,225 +326,6 @@ static bool findClassRelation(
bool isArtificial
);
-/** A struct contained the data for an STL class */
-struct STLInfo
-{
- const char *className;
- const char *baseClass1;
- const char *baseClass2;
- const char *templType1;
- const char *templName1;
- const char *templType2;
- const char *templName2;
- bool virtualInheritance;
- bool iterators;
-};
-
-static STLInfo g_stlinfo[] =
-{
- // className baseClass1 baseClass2 templType1 templName1 templType2 templName2 virtInheritance // iterators
- { "allocator", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
- { "array", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, // C++11
- { "auto_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // deprecated
- { "smart_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
- { "unique_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
- { "shared_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++14
- { "weak_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
- { "ios_base", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "error_code", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "error_category", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "system_error", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "error_condition", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "thread", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
- { "basic_ios", "ios_base", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_istream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE },
- { "basic_ostream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE },
- { "basic_iostream", "basic_istream<Char>", "basic_ostream<Char>", "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_ifstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_ofstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_fstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_istringstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_ostringstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "basic_stringstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
- { "ios", "basic_ios<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wios", "basic_ios<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "istream", "basic_istream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wistream", "basic_istream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "ostream", "basic_ostream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wostream", "basic_ostream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "ifstream", "basic_ifstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wifstream", "basic_ifstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "ofstream", "basic_ofstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wofstream", "basic_ofstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "fstream", "basic_fstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wfstream", "basic_fstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "istringstream", "basic_istringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wistringstream", "basic_istringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "ostringstream", "basic_ostringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wostringstream", "basic_ostringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "stringstream", "basic_stringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wstringstream", "basic_stringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "basic_string", 0, 0, "Char", 0, 0, 0, FALSE, TRUE },
- { "string", "basic_string<char>", 0, 0, 0, 0, 0, FALSE, TRUE },
- { "wstring", "basic_string<wchar_t>", 0, 0, 0, 0, 0, FALSE, TRUE },
- { "complex", 0, 0, 0, 0, 0, 0, FALSE, FALSE },
- { "bitset", 0, 0, "Bits", 0, 0, 0, FALSE, FALSE },
- { "deque", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
- { "list", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
- { "forward_list", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, // C++11
- { "map", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE },
- { "unordered_map", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, // C++11
- { "multimap", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE },
- { "unordered_multimap", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, // C++11
- { "set", 0, 0, "K", "keys", 0, 0, FALSE, TRUE },
- { "unordered_set", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, // C++11
- { "multiset", 0, 0, "K", "keys", 0, 0, FALSE, TRUE },
- { "unordered_multiset", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, // C++11
- { "vector", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
- { "queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
- { "priority_queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
- { "stack", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
- { "valarray", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
- { "exception", 0, 0, 0, 0, 0, 0, FALSE, FALSE },
- { "bad_alloc", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "bad_cast", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "bad_typeid", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "logic_error", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "ios_base::failure", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "runtime_error", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "bad_exception", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "domain_error", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "invalid_argument", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "length_error", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "out_of_range", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "range_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "overflow_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "underflow_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
- { 0, 0, 0, 0, 0, 0, 0, FALSE, FALSE }
-};
-
-static void addSTLMember(const std::unique_ptr<Entry> &root,const char *type,const char *name)
-{
- std::unique_ptr<Entry> memEntry = std::make_unique<Entry>();
- memEntry->name = name;
- memEntry->type = type;
- memEntry->protection = Public;
- memEntry->section = Entry::VARIABLE_SEC;
- memEntry->brief = "STL member";
- memEntry->hidden = FALSE;
- memEntry->artificial = TRUE;
- root->moveToSubEntryAndKeep(memEntry);
-}
-
-static void addSTLIterator(const std::unique_ptr<Entry> &classEntry,const char *name)
-{
- std::unique_ptr<Entry> iteratorClassEntry = std::make_unique<Entry>();
- iteratorClassEntry->fileName = "[STL]";
- iteratorClassEntry->startLine = 1;
- iteratorClassEntry->name = name;
- iteratorClassEntry->section = Entry::CLASS_SEC;
- iteratorClassEntry->brief = "STL iterator class";
- iteratorClassEntry->hidden = FALSE;
- iteratorClassEntry->artificial= TRUE;
- classEntry->moveToSubEntryAndKeep(iteratorClassEntry);
-}
-
-static void addSTLClass(const std::unique_ptr<Entry> &root,const STLInfo *info)
-{
- //printf("Adding STL class %s\n",info->className);
- QCString fullName = info->className;
- fullName.prepend("std::");
-
- // add fake Entry for the class
- std::unique_ptr<Entry> classEntry = std::make_unique<Entry>();
- classEntry->fileName = "[STL]";
- classEntry->startLine = 1;
- classEntry->name = fullName;
- classEntry->section = Entry::CLASS_SEC;
- classEntry->brief = "STL class";
- classEntry->hidden = FALSE;
- classEntry->artificial= TRUE;
-
- // add template arguments to class
- if (info->templType1)
- {
- ArgumentList al;
- Argument a;
- a.type="typename";
- a.name=info->templType1;
- al.push_back(a);
- if (info->templType2) // another template argument
- {
- a.type="typename";
- a.name=info->templType2;
- al.push_back(a);
- }
- classEntry->tArgLists.push_back(al);
- }
- // add member variables
- if (info->templName1)
- {
- addSTLMember(classEntry,info->templType1,info->templName1);
- }
- if (info->templName2)
- {
- addSTLMember(classEntry,info->templType2,info->templName2);
- }
- if (fullName=="std::auto_ptr" || fullName=="std::smart_ptr" || fullName=="std::shared_ptr" ||
- fullName=="std::unique_ptr" || fullName=="std::weak_ptr")
- {
- std::unique_ptr<Entry> memEntry = std::make_unique<Entry>();
- memEntry->name = "operator->";
- memEntry->args = "()";
- memEntry->type = "T*";
- memEntry->protection = Public;
- memEntry->section = Entry::FUNCTION_SEC;
- memEntry->brief = "STL member";
- memEntry->hidden = FALSE;
- memEntry->artificial = FALSE;
- classEntry->moveToSubEntryAndKeep(memEntry);
- }
- if (info->baseClass1)
- {
- classEntry->extends.push_back(BaseInfo(info->baseClass1,Public,info->virtualInheritance?Virtual:Normal));
- }
- if (info->baseClass2)
- {
- classEntry->extends.push_back(BaseInfo(info->baseClass2,Public,info->virtualInheritance?Virtual:Normal));
- }
- if (info->iterators)
- {
- // add iterator class
- addSTLIterator(classEntry,fullName+"::iterator");
- addSTLIterator(classEntry,fullName+"::const_iterator");
- addSTLIterator(classEntry,fullName+"::reverse_iterator");
- addSTLIterator(classEntry,fullName+"::const_reverse_iterator");
- }
- root->moveToSubEntryAndKeep(classEntry);
-}
-
-
-static void addSTLClasses(const std::unique_ptr<Entry> &root)
-{
- std::unique_ptr<Entry> namespaceEntry = std::make_unique<Entry>();
- namespaceEntry->fileName = "[STL]";
- namespaceEntry->startLine = 1;
- namespaceEntry->name = "std";
- namespaceEntry->section = Entry::NAMESPACE_SEC;
- namespaceEntry->brief = "STL namespace";
- namespaceEntry->hidden = FALSE;
- namespaceEntry->artificial= TRUE;
-
- STLInfo *info = g_stlinfo;
- while (info->className)
- {
- addSTLClass(namespaceEntry,info);
- info++;
- }
-
- root->moveToSubEntryAndKeep(namespaceEntry);
-}
-
//----------------------------------------------------------------------------
static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n,
@@ -1276,7 +1060,7 @@ static void addClassToContext(const Entry *root)
{
// a Java/C# generic class looks like a C++ specialization, so we need to split the
// name and template arguments here
- stringToArgumentList(fullName.mid(i),tArgList);
+ stringToArgumentList(root->lang,fullName.mid(i),tArgList);
fullName=fullName.left(i);
}
else
@@ -3604,7 +3388,7 @@ static void buildFunctionList(const Entry *root)
if (md->documentation().isEmpty() && !root->doc.isEmpty())
{
ArgumentList argList;
- stringToArgumentList(root->args,argList);
+ stringToArgumentList(root->lang,root->args,argList);
if (root->proto)
{
//printf("setDeclArgumentList to %p\n",argList);
@@ -4427,7 +4211,7 @@ static bool findTemplateInstanceRelation(const Entry *root,
Debug::print(Debug::Classes,0," template root found %s templSpec=%s!\n",
qPrint(templateRoot->name),qPrint(templSpec));
ArgumentList templArgs;
- stringToArgumentList(templSpec,templArgs);
+ stringToArgumentList(root->lang,templSpec,templArgs);
findBaseClassesForClass(templateRoot,context,templateClass,instanceClass,
TemplateInstances,isArtificial,templArgs,templateNames);
@@ -5041,7 +4825,7 @@ static void computeTemplateClassRelations()
Debug::print(Debug::Classes,0," Template instance %s : \n",qPrint(tcd->name()));
QCString templSpec = tdi.currentKey();
ArgumentList templArgs;
- stringToArgumentList(templSpec,templArgs);
+ stringToArgumentList(tcd->getLanguage(),templSpec,templArgs);
for (const BaseInfo &bi : root->extends)
{
// check if the base class is a template argument
@@ -8800,10 +8584,9 @@ static void computePageRelations(Entry *root)
PageDef *subPd = Doxygen::pageSDict->find(bi.name);
if (pd==subPd)
{
- err("page defined at line %d of file %s with label %s is a direct "
+ term("page defined at line %d of file %s with label %s is a direct "
"subpage of itself! Please remove this cyclic dependency.\n",
pd->docLine(),pd->docFile().data(),pd->name().data());
- exit(1);
}
else if (subPd)
{
@@ -8828,10 +8611,9 @@ static void checkPageRelations()
{
if (ppd==pd)
{
- err("page defined at line %d of file %s with label %s is a subpage "
+ term("page defined at line %d of file %s with label %s is a subpage "
"of itself! Please remove this cyclic dependency.\n",
pd->docLine(),pd->docFile().data(),pd->name().data());
- exit(1);
}
ppd=ppd->getOuterScope();
}
@@ -8992,7 +8774,8 @@ static void generateExampleDocs()
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
msg("Generating docs for example %s...\n",pd->name().data());
- resetCCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(".c"); // TODO: do this on code type
+ intf.resetCodeParserState();
QCString n=pd->getOutputFileBase();
startFile(*g_outputList,n,n,pd->name());
startTitle(*g_outputList,n);
@@ -9163,8 +8946,7 @@ static void generateConfigFile(const char *configFile,bool shortList,
}
else
{
- err("Cannot open file %s for writing\n",configFile);
- exit(1);
+ term("Cannot open file %s for writing\n",configFile);
}
}
static void compareDoxyfile()
@@ -9181,8 +8963,7 @@ static void compareDoxyfile()
}
else
{
- err("Cannot open file %s for writing\n",configFile);
- exit(1);
+ term("Cannot open file %s for writing\n",configFile);
}
}
//----------------------------------------------------------------------------
@@ -9198,7 +8979,7 @@ static void compareDoxyfile()
//----------------------------------------------------------------------------
-static void readTagFile(const std::unique_ptr<Entry> &root,const char *tl)
+static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
{
QCString tagLine = tl;
QCString fileName;
@@ -9208,6 +8989,7 @@ static void readTagFile(const std::unique_ptr<Entry> &root,const char *tl)
{
fileName = tagLine.left(eqPos).stripWhiteSpace();
destName = tagLine.right(tagLine.length()-eqPos-1).stripWhiteSpace();
+ if (fileName.isEmpty() || destName.isEmpty()) return;
QFileInfo fi(fileName);
Doxygen::tagDestinationDict.insert(fi.absFilePath().utf8(),new QCString(destName));
//printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data());
@@ -9348,7 +9130,7 @@ static void copyExtraFiles(QStrList files,const QCString &filesOption,const QCSt
//----------------------------------------------------------------------------
-static ParserInterface *getParserForFile(const char *fn)
+static OutlineParserInterface &getParserForFile(const char *fn)
{
QCString fileName=fn;
QCString extension;
@@ -9363,11 +9145,11 @@ static ParserInterface *getParserForFile(const char *fn)
extension = ".no_extension";
}
- return Doxygen::parserManager->getParser(extension);
+ return Doxygen::parserManager->getOutlineParser(extension);
}
-static void parseFile(ParserInterface *parser,
- const std::unique_ptr<Entry> &root,FileDef *fd,const char *fn,
+static void parseFile(OutlineParserInterface &parser,
+ const std::shared_ptr<Entry> &root,FileDef *fd,const char *fn,
bool sameTu,QStrList &filesInSameTu)
{
#if USE_LIBCLANG
@@ -9391,7 +9173,7 @@ static void parseFile(ParserInterface *parser,
BufStr preBuf(fi.size()+4096);
if (Config_getBool(ENABLE_PREPROCESSING) &&
- parser->needsPreprocessing(extension))
+ parser.needsPreprocessing(extension))
{
BufStr inBuf(fi.size()+4096);
msg("Preprocessing %s...\n",fn);
@@ -9420,15 +9202,15 @@ static void parseFile(ParserInterface *parser,
fd->getAllIncludeFilesRecursively(filesInSameTu);
}
- std::unique_ptr<Entry> fileRoot = std::make_unique<Entry>();
+ std::shared_ptr<Entry> fileRoot = std::make_shared<Entry>();
// use language parse to parse the file
- parser->parseInput(fileName,convBuf.data(),fileRoot,sameTu,filesInSameTu);
+ parser.parseInput(fileName,convBuf.data(),fileRoot,sameTu,filesInSameTu);
fileRoot->setFileDef(fd);
root->moveToSubEntryAndKeep(fileRoot);
}
//! parse the list of input files
-static void parseFiles(const std::unique_ptr<Entry> &root)
+static void parseFiles(const std::shared_ptr<Entry> &root)
{
#if USE_LIBCLANG
static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
@@ -9454,8 +9236,8 @@ static void parseFiles(const std::unique_ptr<Entry> &root)
if (fd->isSource() && !fd->isReference()) // this is a source file
{
QStrList filesInSameTu;
- ParserInterface * parser = getParserForFile(s->data());
- parser->startTranslationUnit(s->data());
+ OutlineParserInterface &parser = getParserForFile(s->data());
+ parser.startTranslationUnit(s->data());
parseFile(parser,root,fd,s->data(),FALSE,filesInSameTu);
//printf(" got %d extra files in tu\n",filesInSameTu.count());
@@ -9477,7 +9259,7 @@ static void parseFiles(const std::unique_ptr<Entry> &root)
}
incFile = filesInSameTu.next();
}
- parser->finishTranslationUnit();
+ parser.finishTranslationUnit();
g_processedFiles.insert(*s,(void*)0x8);
}
}
@@ -9490,10 +9272,10 @@ static void parseFiles(const std::unique_ptr<Entry> &root)
QStrList filesInSameTu;
FileDef *fd=findFileDef(Doxygen::inputNameDict,s->data(),ambig);
ASSERT(fd!=0);
- ParserInterface * parser = getParserForFile(s->data());
- parser->startTranslationUnit(s->data());
+ OutlineParserInterface &parser = getParserForFile(s->data());
+ parser.startTranslationUnit(s->data());
parseFile(parser,root,fd,s->data(),FALSE,filesInSameTu);
- parser->finishTranslationUnit();
+ parser.finishTranslationUnit();
g_processedFiles.insert(*s,(void*)0x8);
}
}
@@ -9509,8 +9291,8 @@ static void parseFiles(const std::unique_ptr<Entry> &root)
QStrList filesInSameTu;
FileDef *fd=findFileDef(Doxygen::inputNameDict,s->data(),ambig);
ASSERT(fd!=0);
- ParserInterface * parser = getParserForFile(s->data());
- parser->startTranslationUnit(s->data());
+ OutlineParserInterface &parser = getParserForFile(s->data());
+ parser.startTranslationUnit(s->data());
parseFile(parser,root,fd,s->data(),FALSE,filesInSameTu);
}
}
@@ -9820,17 +9602,15 @@ void readFormulaRepository(QCString dir, bool cmp)
{
if ((f=Doxygen::formulaDict->find(formText))==0)
{
- err("discrepancy between formula repositories! Remove "
+ term("discrepancy between formula repositories! Remove "
"formula.repository and from_* files from output directories.");
- exit(1);
}
QCString formLabel;
formLabel.sprintf("\\form#%d",f->getId());
if (formLabel != formName)
{
- err("discrepancy between formula repositories! Remove "
+ term("discrepancy between formula repositories! Remove "
"formula.repository and from_* files from output directories.");
- exit(1);
}
new_repository++;
}
@@ -9847,9 +9627,8 @@ void readFormulaRepository(QCString dir, bool cmp)
}
if (cmp && (current_repository != new_repository))
{
- err("size discrepancy between formula repositories! Remove "
+ term("size discrepancy between formula repositories! Remove "
"formula.repository and from_* files from output directories.");
- exit(1);
}
}
@@ -10067,32 +9846,55 @@ static const char *getArg(int argc,char **argv,int &optind)
//----------------------------------------------------------------------------
+/** @brief /dev/null outline parser */
+class NullOutlineParser : public OutlineParserInterface
+{
+ public:
+ void startTranslationUnit(const char *) {}
+ void finishTranslationUnit() {}
+ void parseInput(const char *, const char *,const std::shared_ptr<Entry> &, bool, QStrList &) {}
+ bool needsPreprocessing(const QCString &) const { return FALSE; }
+ void parsePrototype(const char *) {}
+};
+
+
+
void initDoxygen()
{
initResources();
- const char *lang = portable_getenv("LC_ALL");
- if (lang) portable_setenv("LANG",lang);
+ const char *lang = Portable::getenv("LC_ALL");
+ if (lang) Portable::setenv("LANG",lang);
setlocale(LC_ALL,"");
setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
setlocale(LC_NUMERIC,"C");
- portable_correct_path();
+ Portable::correct_path();
Doxygen::runningTime.start();
Doxygen::preprocessor = new Preprocessor();
- Doxygen::parserManager = new ParserManager;
- Doxygen::parserManager->registerDefaultParser( new FileParser);
- Doxygen::parserManager->registerParser("c", new CLanguageScanner);
- Doxygen::parserManager->registerParser("python", new PythonLanguageScanner);
- Doxygen::parserManager->registerParser("fortran", new FortranLanguageScanner);
- Doxygen::parserManager->registerParser("fortranfree", new FortranLanguageScannerFree);
- Doxygen::parserManager->registerParser("fortranfixed", new FortranLanguageScannerFixed);
- Doxygen::parserManager->registerParser("vhdl", new VHDLLanguageScanner);
- Doxygen::parserManager->registerParser("xml", new XMLScanner);
- Doxygen::parserManager->registerParser("sql", new SQLScanner);
- Doxygen::parserManager->registerParser("tcl", new TclLanguageScanner);
- Doxygen::parserManager->registerParser("md", new MarkdownFileParser);
+ Doxygen::parserManager = new ParserManager( std::make_unique<NullOutlineParser>(),
+ std::make_unique<FileCodeParser>());
+ Doxygen::parserManager->registerParser("c", std::make_unique<COutlineParser>(),
+ std::make_unique<CCodeParser>());
+ Doxygen::parserManager->registerParser("python", std::make_unique<PythonOutlineParser>(),
+ std::make_unique<PythonCodeParser>());
+ Doxygen::parserManager->registerParser("fortran", std::make_unique<FortranOutlineParser>(),
+ std::make_unique<FortranCodeParser>());
+ Doxygen::parserManager->registerParser("fortranfree", std::make_unique<FortranOutlineParserFree>(),
+ std::make_unique<FortranCodeParserFree>());
+ Doxygen::parserManager->registerParser("fortranfixed", std::make_unique<FortranOutlineParserFixed>(),
+ std::make_unique<FortranCodeParserFixed>());
+ Doxygen::parserManager->registerParser("vhdl", std::make_unique<VHDLOutlineParser>(),
+ std::make_unique<VHDLCodeParser>());
+ Doxygen::parserManager->registerParser("xml", std::make_unique<NullOutlineParser>(),
+ std::make_unique<XMLCodeParser>());
+ Doxygen::parserManager->registerParser("sql", std::make_unique<NullOutlineParser>(),
+ std::make_unique<SQLCodeParser>());
+ Doxygen::parserManager->registerParser("tcl", std::make_unique<TclOutlineParser>(),
+ std::make_unique<TclCodeParser>());
+ Doxygen::parserManager->registerParser("md", std::make_unique<MarkdownOutlineParser>(),
+ std::make_unique<FileCodeParser>());
// register any additional parsers here...
@@ -10187,7 +9989,6 @@ void cleanUpDoxygen()
delete theTranslator;
delete g_outputList;
Mappers::freeMappers();
- codeFreeScanner();
if (Doxygen::symbolMap)
{
@@ -10689,11 +10490,22 @@ void adjustConfiguration()
while (mapping)
{
QCString mapStr = mapping;
- int i;
- if ((i=mapStr.find('='))!=-1)
+ int i=mapStr.find('=');
+ if (i==-1)
+ {
+ mapping = extMaps.next();
+ continue;
+ }
+ else
{
- QCString ext=mapStr.left(i).stripWhiteSpace().lower();
- QCString language=mapStr.mid(i+1).stripWhiteSpace().lower();
+ QCString ext = mapStr.left(i).stripWhiteSpace().lower();
+ QCString language = mapStr.mid(i+1).stripWhiteSpace().lower();
+ if (ext.isEmpty() || language.isEmpty())
+ {
+ mapping = extMaps.next();
+ continue;
+ }
+
if (!updateLanguageMapping(ext,language))
{
err("Failed to map file extension '%s' to unsupported language '%s'.\n"
@@ -10709,7 +10521,6 @@ void adjustConfiguration()
mapping = extMaps.next();
}
-
// add predefined macro name to a dictionary
QStrList &expandAsDefinedList =Config_getList(EXPAND_AS_DEFINED);
s=expandAsDefinedList.first();
@@ -11103,7 +10914,7 @@ void parseInput()
signal(SIGINT, stopDoxygen);
#endif
- uint pid = portable_pid();
+ uint pid = Portable::pid();
Doxygen::objDBFileName.sprintf("doxygen_objdb_%d.tmp",pid);
Doxygen::objDBFileName.prepend(outputDirectory+"/");
Doxygen::entryDBFileName.sprintf("doxygen_entrydb_%d.tmp",pid);
@@ -11163,18 +10974,18 @@ void parseInput()
QCString curFontPath = Config_getString(DOT_FONTPATH);
if (curFontPath.isEmpty())
{
- portable_getenv("DOTFONTPATH");
+ Portable::getenv("DOTFONTPATH");
QCString newFontPath = ".";
if (!curFontPath.isEmpty())
{
- newFontPath+=portable_pathListSeparator();
+ newFontPath+=Portable::pathListSeparator();
newFontPath+=curFontPath;
}
- portable_setenv("DOTFONTPATH",newFontPath);
+ Portable::setenv("DOTFONTPATH",newFontPath);
}
else
{
- portable_setenv("DOTFONTPATH",curFontPath);
+ Portable::setenv("DOTFONTPATH",curFontPath);
}
}
@@ -11241,7 +11052,7 @@ void parseInput()
* Handle Tag Files *
**************************************************************************/
- std::unique_ptr<Entry> root = std::make_unique<Entry>();
+ std::shared_ptr<Entry> root = std::make_shared<Entry>();
msg("Reading and parsing tag files\n");
QStrList &tagFileList = Config_getList(TAGFILES);
@@ -11256,10 +11067,7 @@ void parseInput()
* Parse source files *
**************************************************************************/
- if (Config_getBool(BUILTIN_STL_SUPPORT))
- {
- addSTLClasses(root);
- }
+ addSTLSupport(root);
g_s.begin("Parsing files\n");
parseFiles(root);
@@ -11267,7 +11075,6 @@ void parseInput()
// we are done with input scanning now, so free up the buffers used by flex
// (can be around 4MB)
- scanFreeScanner();
pyscanFreeScanner();
/**************************************************************************
@@ -11661,9 +11468,8 @@ void generateOutput()
QDir searchDir(searchDirName);
if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
{
- err("Could not create search results directory '%s' $PWD='%s'\n",
+ term("Could not create search results directory '%s' $PWD='%s'\n",
searchDirName.data(),QDir::currentDirPath().data());
- exit(1);
}
HtmlGenerator::writeSearchData(searchDirName);
if (!serverBasedSearch) // client side search index
@@ -11800,7 +11606,7 @@ void generateOutput()
{
searchDataFile="searchdata.xml";
}
- if (!portable_isAbsolutePath(searchDataFile))
+ if (!Portable::isAbsolutePath(searchDataFile))
{
searchDataFile.prepend(Config_getString(OUTPUT_DIRECTORY)+"/");
}
@@ -11862,12 +11668,13 @@ void generateOutput()
g_s.begin("Running html help compiler...\n");
QString oldDir = QDir::currentDirPath();
QDir::setCurrent(Config_getString(HTML_OUTPUT));
- portable_sysTimerStart();
- if (portable_system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
+ Portable::setShortDir();
+ Portable::sysTimerStart();
+ if (Portable::system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
{
err("failed to run html help compiler on index.hhp\n");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
g_s.end();
}
@@ -11882,12 +11689,12 @@ void generateOutput()
QCString const args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data());
QString const oldDir = QDir::currentDirPath();
QDir::setCurrent(Config_getString(HTML_OUTPUT));
- portable_sysTimerStart();
- if (portable_system(Config_getString(QHG_LOCATION), args.data(), FALSE))
+ Portable::sysTimerStart();
+ if (Portable::system(Config_getString(QHG_LOCATION), args.data(), FALSE))
{
err("failed to run qhelpgenerator on index.qhp\n");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
g_s.end();
}
@@ -11908,7 +11715,7 @@ void generateOutput()
{
msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n",
((double)Doxygen::runningTime.elapsed())/1000.0,
- portable_getSysElapsedTime()
+ Portable::getSysElapsedTime()
);
g_s.print();
}
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index 2757308..bbb3b01 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -72,8 +72,7 @@ void EclipseHelp::initialize()
m_tocfile = new QFile(name);
if (!m_tocfile->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n", name.data());
- exit(1);
+ term("Could not open file %s for writing\n", name.data());
}
// -- initialize its text stream
diff --git a/src/entry.cpp b/src/entry.cpp
index 066c4a0..cc8cd1f 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -116,7 +116,7 @@ Entry::Entry(const Entry &e)
m_sublist.reserve(e.m_sublist.size());
for (const auto &cur : e.m_sublist)
{
- m_sublist.push_back(std::make_unique<Entry>(*cur));
+ m_sublist.push_back(std::make_shared<Entry>(*cur));
}
}
@@ -136,11 +136,11 @@ void Entry::moveToSubEntryAndRefresh(Entry *&current)
current = new Entry;
}
-void Entry::moveToSubEntryAndRefresh(std::unique_ptr<Entry> &current)
+void Entry::moveToSubEntryAndRefresh(std::shared_ptr<Entry> &current)
{
current->m_parent=this;
- m_sublist.push_back(std::move(current));
- current = std::make_unique<Entry>();
+ m_sublist.push_back(current);
+ current = std::make_shared<Entry>();
}
void Entry::moveToSubEntryAndKeep(Entry *current)
@@ -149,10 +149,10 @@ void Entry::moveToSubEntryAndKeep(Entry *current)
m_sublist.emplace_back(current);
}
-void Entry::moveToSubEntryAndKeep(std::unique_ptr<Entry> &current)
+void Entry::moveToSubEntryAndKeep(std::shared_ptr<Entry> &current)
{
current->m_parent=this;
- m_sublist.push_back(std::move(current));
+ m_sublist.push_back(current);
}
void Entry::copyToSubEntry(Entry *current)
@@ -162,20 +162,20 @@ void Entry::copyToSubEntry(Entry *current)
m_sublist.emplace_back(copy);
}
-void Entry::copyToSubEntry(const std::unique_ptr<Entry> &current)
+void Entry::copyToSubEntry(const std::shared_ptr<Entry> &current)
{
- std::unique_ptr<Entry> copy = std::make_unique<Entry>(*current);
+ std::shared_ptr<Entry> copy = std::make_shared<Entry>(*current);
copy->m_parent=this;
- m_sublist.push_back(std::move(copy));
+ m_sublist.push_back(copy);
}
-void Entry::moveFromSubEntry(const Entry *child,std::unique_ptr<Entry> &moveTo)
+void Entry::moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo)
{
auto it = std::find_if(m_sublist.begin(),m_sublist.end(),
- [child](const std::unique_ptr<Entry>&elem) { return elem.get()==child; });
+ [child](const std::shared_ptr<Entry>&elem) { return elem.get()==child; });
if (it!=m_sublist.end())
{
- moveTo = std::move(*it);
+ moveTo = *it;
m_sublist.erase(it);
}
else
@@ -187,7 +187,7 @@ void Entry::moveFromSubEntry(const Entry *child,std::unique_ptr<Entry> &moveTo)
void Entry::removeSubEntry(const Entry *e)
{
auto it = std::find_if(m_sublist.begin(),m_sublist.end(),
- [e](const std::unique_ptr<Entry>&elem) { return elem.get()==e; });
+ [e](const std::shared_ptr<Entry>&elem) { return elem.get()==e; });
if (it!=m_sublist.end())
{
m_sublist.erase(it);
diff --git a/src/entry.h b/src/entry.h
index 9d4ae9d..0391075 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -202,26 +202,26 @@ class Entry
/*! Returns the list of children for this Entry
* @see addSubEntry() and removeSubEntry()
*/
- const std::vector< std::unique_ptr<Entry> > &children() const { return m_sublist; }
+ const std::vector< std::shared_ptr<Entry> > &children() const { return m_sublist; }
/*! @name add entry as a child and pass ownership.
* @note This makes the entry passed invalid! (TODO: tclscanner.l still has use after move!)
* @{
*/
void moveToSubEntryAndKeep(Entry* e);
- void moveToSubEntryAndKeep(std::unique_ptr<Entry> &e);
+ void moveToSubEntryAndKeep(std::shared_ptr<Entry> &e);
/*! @} */
/*! @name add entry as a child, pass ownership and reinitialize entry */
void moveToSubEntryAndRefresh(Entry* &e);
- void moveToSubEntryAndRefresh(std::unique_ptr<Entry> &e);
+ void moveToSubEntryAndRefresh(std::shared_ptr<Entry> &e);
/*! take \a child of of to list of children and move it into \a moveTo */
- void moveFromSubEntry(const Entry *child,std::unique_ptr<Entry> &moveTo);
+ void moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo);
/*! make a copy of \a e and add it as a child to this entry */
void copyToSubEntry (Entry* e);
- void copyToSubEntry (const std::unique_ptr<Entry> &e);
+ void copyToSubEntry (const std::shared_ptr<Entry> &e);
/*! Removes entry \a e from the list of children.
* The entry will be deleted if found.
@@ -332,7 +332,7 @@ class Entry
private:
Entry *m_parent; //!< parent node in the tree
- std::vector< std::unique_ptr<Entry> > m_sublist;
+ std::vector< std::shared_ptr<Entry> > m_sublist;
Entry &operator=(const Entry &);
FileDef *m_fileDef;
};
diff --git a/src/filedef.cpp b/src/filedef.cpp
index f00c82b..e028bab 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -664,7 +664,8 @@ void FileDefImpl::writeIncludeGraph(OutputList &ol)
DotInclDepGraph incDepGraph(this,FALSE);
if (incDepGraph.isTooBig())
{
- warn_uncond("Include graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data());
+ warn_uncond("Include graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
+ name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -688,7 +689,8 @@ void FileDefImpl::writeIncludedByGraph(OutputList &ol)
DotInclDepGraph incDepGraph(this,TRUE);
if (incDepGraph.isTooBig())
{
- warn_uncond("Included by graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",name().data());
+ warn_uncond("Included by graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
+ name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -1231,8 +1233,8 @@ void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu
else
#endif
{
- ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
- pIntf->resetCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
+ intf.resetCodeParserState();
ol.startCodeFragment();
bool needs2PassParsing =
Doxygen::parseSourcesNeeded && // we need to parse (filtered) sources for cross-references
@@ -1242,13 +1244,13 @@ void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu
if (needs2PassParsing)
{
// parse code for cross-references only (see bug707641)
- pIntf->parseCode(devNullIntf,0,
+ intf.parseCode(devNullIntf,0,
fileToString(absFilePath(),TRUE,TRUE),
getLanguage(),
FALSE,0,this
);
}
- pIntf->parseCode(ol,0,
+ intf.parseCode(ol,0,
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(), // lang
FALSE, // isExampleBlock
@@ -1293,9 +1295,9 @@ void FileDefImpl::parseSource(bool sameTu,QStrList &filesInSameTu)
else
#endif
{
- ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
- pIntf->resetCodeParserState();
- pIntf->parseCode(
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
+ intf.resetCodeParserState();
+ intf.parseCode(
devNullIntf,0,
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(),
@@ -2013,7 +2015,7 @@ void FileDefImpl::acquireFileVersion()
msg("Version of %s : ",m_filePath.data());
QCString cmd = vercmd+" \""+m_filePath+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
- FILE *f=portable_popen(cmd,"r");
+ FILE *f=Portable::popen(cmd,"r");
if (!f)
{
err("could not execute %s\n",vercmd.data());
@@ -2022,7 +2024,7 @@ void FileDefImpl::acquireFileVersion()
const int bufSize=1024;
char buf[bufSize];
int numRead = (int)fread(buf,1,bufSize-1,f);
- portable_pclose(f);
+ Portable::pclose(f);
if (numRead>0 && numRead<bufSize)
{
buf[numRead]='\0';
diff --git a/src/fileparser.cpp b/src/fileparser.cpp
index 45bdc81..34085dc 100644
--- a/src/fileparser.cpp
+++ b/src/fileparser.cpp
@@ -16,7 +16,7 @@
#include "fileparser.h"
#include "outputgen.h"
-void FileParser::parseCode(CodeOutputInterface &codeOutIntf,
+void FileCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
const char *, // scopeName
const QCString & input,
SrcLangExt, // lang
diff --git a/src/fileparser.h b/src/fileparser.h
index 3132f92..3245878 100644
--- a/src/fileparser.h
+++ b/src/fileparser.h
@@ -18,15 +18,11 @@
#include "parserintf.h"
-/** @brief General file parser */
-class FileParser : public ParserInterface
+/** @brief Generic code parser */
+class FileCodeParser : public CodeParserInterface
{
public:
- virtual ~FileParser() {}
- void startTranslationUnit(const char *) {}
- void finishTranslationUnit() {}
- void parseInput(const char *, const char *,const std::unique_ptr<Entry> &, bool, QStrList &) {}
- bool needsPreprocessing(const QCString &) const { return FALSE; }
+ virtual ~FileCodeParser() {}
void parseCode(CodeOutputInterface &codeOutIntf,
const char *scopeName,
const QCString &input,
@@ -43,8 +39,6 @@ class FileParser : public ParserInterface
bool collectXRefs=TRUE
);
void resetCodeParserState() {}
- void parsePrototype(const char *) {}
};
-
#endif
diff --git a/src/formula.cpp b/src/formula.cpp
index 534f56a..77085f8 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -51,7 +51,10 @@ void FormulaList::generateBitmaps(const char *path)
int x1,y1,x2,y2;
QDir d(path);
// store the original directory
- if (!d.exists()) { err("Output dir %s does not exist!\n",path); exit(1); }
+ if (!d.exists())
+ {
+ term("Output dir %s does not exist!\n",path);
+ }
QCString oldDir = QDir::currentDirPath().utf8();
// go to the html output directory (i.e. path)
QDir::setCurrent(d.absPath());
@@ -100,15 +103,15 @@ void FormulaList::generateBitmaps(const char *path)
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
QCString latexCmd = "latex";
- portable_sysTimerStart();
- if (portable_system(latexCmd,"_formulas.tex")!=0)
+ Portable::sysTimerStart();
+ if (Portable::system(latexCmd,"_formulas.tex")!=0)
{
err("Problems running latex. Check your installation or look "
"for typos in _formulas.tex and check _formulas.log!\n");
formulaError=TRUE;
//return;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
//printf("Running dvips...\n");
QListIterator<int> pli(pagesToGenerate);
int *pagePtr;
@@ -125,27 +128,27 @@ void FormulaList::generateBitmaps(const char *path)
// postscript file.
sprintf(dviArgs,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
pageIndex,formBase.data());
- portable_sysTimerStart();
- if (portable_system("dvips",dviArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("dvips",dviArgs)!=0)
{
err("Problems running dvips. Check your installation!\n");
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
// run ps2epsi to convert to an encapsulated postscript file with
// boundingbox (dvips with -E has some problems here).
sprintf(psArgs,"%s_tmp.ps %s.eps",formBase.data(),formBase.data());
- portable_sysTimerStart();
- if (portable_system("ps2epsi",psArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("ps2epsi",psArgs)!=0)
{
err("Problems running ps2epsi. Check your installation!\n");
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
// now we read the generated postscript file to extract the bounding box
QFileInfo fi(formBase+".eps");
if (fi.exists())
@@ -193,20 +196,20 @@ void FormulaList::generateBitmaps(const char *path)
// used.
char gsArgs[4096];
- sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
- "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
+ sprintf(gsArgs,"-q -g%dx%d -r%dx%d -sDEVICE=ppmraw "
+ "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -dNOSAFER %s.ps",
gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
formBase.data(),formBase.data()
);
- portable_sysTimerStart();
- if (portable_system(portable_ghostScriptCommand(),gsArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system(Portable::ghostScriptCommand(),gsArgs)!=0)
{
- err("Problem running ghostscript %s %s. Check your installation!\n",portable_ghostScriptCommand(),gsArgs);
- portable_sysTimerStop();
+ err("Problem running ghostscript %s %s. Check your installation!\n",Portable::ghostScriptCommand(),gsArgs);
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
f.setName(formBase+".pnm");
uint imageX=0,imageY=0;
// we read the generated image again, to obtain the pixel data.
diff --git a/src/fortrancode.h b/src/fortrancode.h
index 4df20a9..8391a0b 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -18,7 +18,7 @@
#ifndef FORTRANCODE_H
#define FORTRANCODE_H
-#include "types.h"
+#include "parserintf.h"
class CodeOutputInterface;
class FileDef;
@@ -26,13 +26,45 @@ class MemberDef;
class QCString;
class Definition;
-void parseFortranCode(CodeOutputInterface &,const char *,const QCString &,
- bool ,const char *,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectRefs, FortranFormat format);
-void resetFortranCodeParserState();
void codeFreeScanner();
const int fixedCommentAfter = 72;
+
+class FortranCodeParser : public CodeParserInterface
+{
+ public:
+ FortranCodeParser(FortranFormat format=FortranFormat_Unknown) : m_format(format) { }
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt lang,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ );
+ void resetCodeParserState();
+
+ private:
+ FortranFormat m_format;
+};
+
+class FortranCodeParserFree : public FortranCodeParser
+{
+ public:
+ FortranCodeParserFree() : FortranCodeParser(FortranFormat_Free) { }
+};
+
+class FortranCodeParserFixed : public FortranCodeParser
+{
+ public:
+ FortranCodeParserFixed() : FortranCodeParser(FortranFormat_Fixed) { }
+};
+
#endif
diff --git a/src/fortrancode.l b/src/fortrancode.l
index f222d09..c4532f3 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -1395,16 +1395,34 @@ void parseFortranCode(CodeOutputInterface &od,const char *,const QCString &s,
return;
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
+//---------------------------------------------------------
+
+void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
+ const char * scopeName,
+ const QCString & input,
+ SrcLangExt /*lang*/,
+ bool isExampleBlock,
+ const char * exampleName,
+ FileDef * fileDef,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool showLineNumbers,
+ const Definition *searchCtx,
+ bool collectXRefs
+ )
+{
+ ::parseFortranCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs,m_format);
}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
-#else
-extern "C" { // some bogus code to keep the compiler happy
- void fortrancodeYYdummy() { yy_top_state(); }
+
+void FortranCodeParser::resetCodeParserState()
+{
+ ::resetFortranCodeParserState();
}
-#endif
+
+//---------------------------------------------------------
#include "fortrancode.l.h"
diff --git a/src/fortranscanner.h b/src/fortranscanner.h
index 6476c98..7a13f47 100644
--- a/src/fortranscanner.h
+++ b/src/fortranscanner.h
@@ -24,51 +24,35 @@
*
* This is the Fortran language parser for doxygen.
*/
-class FortranLanguageScanner : public ParserInterface
+class FortranOutlineParser : public OutlineParserInterface
{
public:
- FortranLanguageScanner(FortranFormat format=FortranFormat_Unknown) : m_format(format) { }
- virtual ~FortranLanguageScanner() {}
+ FortranOutlineParser(FortranFormat format=FortranFormat_Unknown) : m_format(format) { }
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &extension) const;
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- );
- void resetCodeParserState();
void parsePrototype(const char *text);
private:
FortranFormat m_format;
};
-class FortranLanguageScannerFree : public FortranLanguageScanner
+class FortranOutlineParserFree : public FortranOutlineParser
{
public:
- FortranLanguageScannerFree() : FortranLanguageScanner(FortranFormat_Free) { }
+ FortranOutlineParserFree() : FortranOutlineParser(FortranFormat_Free) { }
};
-class FortranLanguageScannerFixed : public FortranLanguageScanner
+class FortranOutlineParserFixed : public FortranOutlineParser
{
public:
- FortranLanguageScannerFixed() : FortranLanguageScanner(FortranFormat_Fixed) { }
+ FortranOutlineParserFixed() : FortranOutlineParser(FortranFormat_Fixed) { }
};
+
#endif
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 7e2e2cd..08c7a6a 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -136,7 +136,7 @@ static const char *directionParam[] =
*
* statics
*/
-static ParserInterface *g_thisParser;
+static OutlineParserInterface *g_thisParser;
static const char * inputString;
static int inputPosition;
static bool isFixedForm;
@@ -145,7 +145,7 @@ static QCString inputStringSemi; ///< Input string after command separat
static unsigned int inputPositionPrepass;
static int lineCountPrepass = 0;
-static QList<Entry> subrCurrent;
+static std::vector< std::shared_ptr<Entry> > subrCurrent;
struct CommentInPrepass {
int column;
@@ -162,14 +162,15 @@ static QFile inputFile;
static QCString yyFileName;
static int yyLineNr = 1 ;
static int yyColNr = 0 ;
-static Entry* current_root = 0 ;
-static Entry* global_root = 0 ;
-static Entry* file_root = 0 ;
-static Entry* last_entry = 0 ;
-static Entry* last_enum = 0 ;
-static std::unique_ptr<Entry> current;
+static Entry *current_root = 0;
+static Entry *global_scope = 0;
+static std::shared_ptr<Entry> global_root;
+static std::shared_ptr<Entry> file_root;
+static std::shared_ptr<Entry> last_entry;
+static std::shared_ptr<Entry> last_enum;
+static std::shared_ptr<Entry> current;
static ScanVar v_type = V_IGNORE; // type of parsed variable
-static std::vector<Entry*> moduleProcedures; // list of all interfaces which contain unresolved
+static std::vector<std::shared_ptr<Entry> > moduleProcedures; // list of all interfaces which contain unresolved
// module procedures
static QCString docBlock;
static bool docBlockInBody = FALSE;
@@ -202,7 +203,6 @@ static SymbolModifiers currentModifiers;
//! Holds program scope->symbol name->symbol modifiers.
static QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
-static Entry *global_scope = 0;
static int anonCount = 0 ;
//-----------------------------------------------------------------------------
@@ -491,13 +491,13 @@ SCOPENAME ({ID}{BS}"::"{BS})*
QCString name = QCString(yytext).stripWhiteSpace();
name = name.right(name.length() - 9).stripWhiteSpace().lower();
addInterface(name, ifType);
- startScope(last_entry);
+ startScope(last_entry.get());
}
}
<InterfaceBody>^{BS}end{BS}interface({BS_}{ID})? {
// end scope only if GENERIC interface
- if (ifType == IF_GENERIC)last_entry->parent()->endBodyLine = yyLineNr - 1;
+ if (ifType == IF_GENERIC) last_entry->parent()->endBodyLine = yyLineNr - 1;
if (ifType == IF_GENERIC && !endScope(current_root))
yyterminate();
@@ -510,12 +510,12 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<ModuleProcedure>{ID} { if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
{
addInterface(yytext, ifType);
- startScope(last_entry);
+ startScope(last_entry.get());
}
current->section = Entry::FUNCTION_SEC ;
current->name = yytext;
- moduleProcedures.push_back(current.get());
+ moduleProcedures.push_back(current);
addCurrentEntry(true);
}
<ModuleProcedure>"\n" { yyColNr -= 1;
@@ -639,7 +639,7 @@ private {
current->startLine = yyLineNr;
/* if type is part of a module, mod name is necessary for output */
- if ((current_root) &&
+ if (current_root &&
(current_root->section == Entry::CLASS_SEC
|| current_root->section == Entry::NAMESPACE_SEC))
{
@@ -647,7 +647,7 @@ private {
}
addCurrentEntry(true);
- startScope(last_entry);
+ startScope(last_entry.get());
BEGIN(TypedefBody);
}
}
@@ -727,7 +727,7 @@ private {
if (!endScope(current_root))
yyterminate();
- subrCurrent.remove(0u);
+ subrCurrent.pop_back();
yy_pop_state() ;
}
<BlockData>{
@@ -736,7 +736,7 @@ private {
}
<Start,ModuleBody,TypedefBody,SubprogBody,Enum>{
^{BS}{TYPE_SPEC}/{SEPARATE} {
- last_enum = 0;
+ last_enum.reset();
if (YY_START == Enum)
{
argType = "@"; // enum marker
@@ -867,7 +867,7 @@ private {
{
current_root->copyToSubEntry(current);
// add to the scope surrounding the enum (copy!)
- last_enum = current.get();
+ last_enum = current;
current_root->parent()->moveToSubEntryAndRefresh(current);
initEntry();
}
@@ -1066,7 +1066,7 @@ private {
}
addCurrentEntry(true);
- startScope(last_entry);
+ startScope(last_entry.get());
BEGIN( Enum ) ;
}
<Enum>"end"{BS}"enum" {
@@ -1083,7 +1083,7 @@ private {
if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
{
addInterface("$interface$", ifType);
- startScope(last_entry);
+ startScope(last_entry.get());
}
// TYPE_SPEC is for old function style function result
@@ -1109,7 +1109,7 @@ private {
if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
{
addInterface("$interface$", ifType);
- startScope(last_entry);
+ startScope(last_entry.get());
}
result = QCString(yytext).stripWhiteSpace();
@@ -1136,7 +1136,7 @@ private {
current->args += ")";
current->args = removeRedundantWhiteSpace(current->args);
addCurrentEntry(true);
- startScope(last_entry);
+ startScope(last_entry.get());
BEGIN(SubprogBody);
}
<Parameterlist>{COMMA}|{BS} { current->args += yytext;
@@ -1162,7 +1162,7 @@ private {
newLine();
//printf("3=========> without parameterlist \n");
addCurrentEntry(true);
- startScope(last_entry);
+ startScope(last_entry.get());
BEGIN(SubprogBody);
}
<SubprogBody>result{BS}\({BS}{ID} {
@@ -1214,20 +1214,19 @@ private {
unput(*yytext);
if (v_type == V_VARIABLE)
{
- std::unique_ptr<Entry> tmp_entry;
- current.swap(tmp_entry);
+ std::shared_ptr<Entry> tmp_entry = current;
// temporarily switch to the previous entry
if (last_enum)
{
- current.reset(last_enum);
+ current = last_enum;
}
else
{
- current.reset(last_entry);
+ current = last_entry;
}
handleCommentBlock(docBlock,TRUE);
// switch back
- tmp_entry.swap(current);
+ current = tmp_entry;
}
else if (v_type == V_PARAMETER)
{
@@ -1779,7 +1778,7 @@ static void popBuffer() {
}
/** used to copy entry to an interface module procedure */
-static void copyEntry(Entry *dest, const std::unique_ptr<Entry> &src)
+static void copyEntry(std::shared_ptr<Entry> dest, const std::shared_ptr<Entry> &src)
{
dest->type = src->type;
dest->fileName = src->fileName;
@@ -2306,7 +2305,7 @@ static int yyread(char *buf,int max_size)
static void initParser()
{
- last_entry = 0;
+ last_entry.reset();
}
static void initEntry()
@@ -2333,7 +2332,7 @@ static void addCurrentEntry(bool case_insens)
{
if (case_insens) current->name = current->name.lower();
//printf("===Adding entry %s to %s\n", current->name.data(), current_root->name.data());
- last_entry = current.get();
+ last_entry = current;
current_root->moveToSubEntryAndRefresh(current);
initEntry();
}
@@ -2367,14 +2366,14 @@ static void addModule(const char *name, bool isModule)
current->startLine = yyLineNr;
current->protection = Public ;
addCurrentEntry(true);
- startScope(last_entry);
+ startScope(last_entry.get());
}
static void addSubprogram(const char *text)
{
DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
- subrCurrent.prepend(current.get());
+ subrCurrent.push_back(current);
current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
functionLine = (subtype.find("function") != -1);
@@ -2487,7 +2486,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
QCString processedDoc = preprocessCommentBlock(doc,yyFileName,lineNr);
while (parseCommentBlock(
g_thisParser,
- docBlockInBody ? subrCurrent.getFirst() : current.get(),
+ docBlockInBody ? subrCurrent.back().get() : current.get(),
processedDoc, // text
yyFileName, // file
lineNr,
@@ -2515,9 +2514,8 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
QCString loc_doc;
loc_doc = doc.stripWhiteSpace();
- std::unique_ptr<Entry> tmp_entry;
- current.swap(tmp_entry);
- current.reset(subrCurrent.getFirst()); // temporarily switch to the entry of the subroutine / function
+ std::shared_ptr<Entry> tmp_entry = current;
+ current = subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
// Still in the specification section so no inbodyDocs yet, but parameter documentation
current->inbodyDocs = "";
@@ -2566,7 +2564,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
loc_doc.stripWhiteSpace();
if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
{
- tmp_entry.swap(current);
+ current = tmp_entry;
return;
}
handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " +
@@ -2610,7 +2608,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
}
// reset current back to the part inside the routine
- tmp_entry.swap(current);
+ current = tmp_entry;
}
//----------------------------------------------------------------------------
/// Handle result description as defined after the declaration of the parameter
@@ -2619,9 +2617,8 @@ static void subrHandleCommentBlockResult(const QCString &doc,bool brief)
QCString loc_doc;
loc_doc = doc.stripWhiteSpace();
- std::unique_ptr<Entry> tmp_entry;
- current.swap(tmp_entry);
- current.reset(subrCurrent.getFirst()); // temporarily switch to the entry of the subroutine / function
+ std::shared_ptr<Entry> tmp_entry = current;
+ current = subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
// Still in the specification section so no inbodyDocs yet, but parameter documentation
current->inbodyDocs = "";
@@ -2640,7 +2637,7 @@ static void subrHandleCommentBlockResult(const QCString &doc,bool brief)
}
// reset current back to the part inside the routine
- tmp_entry.swap(current);
+ current = tmp_entry;
}
//----------------------------------------------------------------------------
@@ -2661,7 +2658,7 @@ level--;
static void parseMain(const char *fileName,const char *fileBuf,
- const std::unique_ptr<Entry> &rt, FortranFormat format)
+ const std::shared_ptr<Entry> &rt, FortranFormat format)
{
char *tmpBuf = NULL;
initParser();
@@ -2677,7 +2674,7 @@ static void parseMain(const char *fileName,const char *fileBuf,
gstat = FALSE;
virt = Normal;
current_root = rt.get();
- global_root = rt.get();
+ global_root = rt;
inputFile.setName(fileName);
if (inputFile.open(IO_ReadOnly))
{
@@ -2719,11 +2716,11 @@ static void parseMain(const char *fileName,const char *fileBuf,
Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
// add entry for the file
- current = std::make_unique<Entry>();
+ current = std::make_shared<Entry>();
current->lang = SrcLangExt_Fortran;
current->name = yyFileName;
current->section = Entry::SOURCE_SEC;
- file_root = current.get();
+ file_root = current;
current_root->moveToSubEntryAndRefresh(current);
current->lang = SrcLangExt_Fortran;
@@ -2757,9 +2754,9 @@ static void parseMain(const char *fileName,const char *fileBuf,
//----------------------------------------------------------------------------
-void FortranLanguageScanner::parseInput(const char *fileName,
+void FortranOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
@@ -2772,37 +2769,11 @@ void FortranLanguageScanner::parseInput(const char *fileName,
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
-void FortranLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
- const char * scopeName,
- const QCString & input,
- SrcLangExt /*lang*/,
- bool isExampleBlock,
- const char * exampleName,
- FileDef * fileDef,
- int startLine,
- int endLine,
- bool inlineFragment,
- const MemberDef *memberDef,
- bool showLineNumbers,
- const Definition *searchCtx,
- bool collectXRefs
- )
-{
- ::parseFortranCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs,m_format);
-}
-
-bool FortranLanguageScanner::needsPreprocessing(const QCString &extension) const
+bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
{
return extension!=extension.lower(); // use preprocessor only for upper case extensions
}
-void FortranLanguageScanner::resetCodeParserState()
-{
- ::resetFortranCodeParserState();
-}
-
-void FortranLanguageScanner::parsePrototype(const char *text)
+void FortranOutlineParser::parsePrototype(const char *text)
{
QCString buffer = QCString(text);
pushBuffer(buffer);
@@ -2813,6 +2784,8 @@ void FortranLanguageScanner::parsePrototype(const char *text)
popBuffer();
}
+//----------------------------------------------------------------------------
+
static void scanner_abort()
{
fprintf(stderr,"********************************************************************\n");
@@ -2823,7 +2796,7 @@ static void scanner_abort()
for (const auto &ce : global_root->children())
{
- if (ce.get() == file_root) start=TRUE;
+ if (ce == file_root) start=TRUE;
if (start) ce->reset();
}
@@ -2836,11 +2809,4 @@ static void scanner_abort()
//----------------------------------------------------------------------------
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void fortranscannerYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "fortranscanner.l.h"
diff --git a/src/growbuf.h b/src/growbuf.h
index 4c49dce..bf6d74e 100644
--- a/src/growbuf.h
+++ b/src/growbuf.h
@@ -47,6 +47,7 @@ class GrowBuf
}
const char *get() { return str; }
int getPos() const { return pos; }
+ void setPos(const int newPos) { pos = newPos; }
char at(int i) const { return str[i]; }
private:
char *str;
diff --git a/src/htags.cpp b/src/htags.cpp
index 51cd6d9..1a240b1 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -89,13 +89,13 @@ bool Htags::execute(const QCString &htmldir)
QCString oldDir = QDir::currentDirPath().utf8();
QDir::setCurrent(g_inputDir.absPath());
//printf("CommandLine=[%s]\n",commandLine.data());
- portable_sysTimerStart();
- bool result=portable_system("htags",commandLine,FALSE)==0;
+ Portable::sysTimerStart();
+ bool result=Portable::system("htags",commandLine,FALSE)==0;
if (!result)
{
err("Problems running %s. Check your installation\n", "htags");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
QDir::setCurrent(oldDir);
return result;
}
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 05d572c..6312a65 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -518,8 +518,8 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::Code:
forceEndParagraph(s);
m_t << PREFRAG_START;
- Doxygen::parserManager->getParser(lang)
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(lang)
+ .parseCode(m_ci,
s->context(),
s->text(),
langExt,
@@ -666,8 +666,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
case DocInclude::Include:
forceEndParagraph(inc);
m_t << PREFRAG_START;
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
inc->text(),
langExt,
@@ -690,8 +690,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << PREFRAG_START;
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
inc->text(),
langExt,
@@ -732,8 +732,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{
forceEndParagraph(inc);
m_t << PREFRAG_START;
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -757,8 +757,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << PREFRAG_START;
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -810,8 +810,8 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
QFileInfo cfi( op->includeFileName() );
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(
m_ci,
op->context(),
op->text(),
@@ -1725,7 +1725,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
if (typeSVG)
{
- m_t << "<object type=\"image/svg+xml\" data=\"" << src
+ m_t << "<object type=\"image/svg+xml\" data=\"" << convertToHtml(src)
<< "\"" << sizeAttribs << attrs;
if (inlineImage)
{
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index c43fd20..52ffecc 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -300,12 +300,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
"<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n"
"<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
- "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
- "<script type=\"text/javascript\">\n"
- "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
- " $(document).ready(initResizable);\n"
- "/* @license-end */"
- "</script>";
+ "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n";
}
if (searchEngine)
@@ -733,8 +728,7 @@ void HtmlGenerator::init()
QDir d(dname);
if (!d.exists() && !d.mkdir(dname))
{
- err("Could not create output directory %s\n",dname.data());
- exit(1);
+ term("Could not create output directory %s\n",dname.data());
}
//writeLogo(dname);
if (!Config_getString(HTML_HEADER).isEmpty())
@@ -2372,7 +2366,7 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa
"$(document).ready(function(){initNavTree('") +
QCString(name) + Doxygen::htmlFileExtension +
QCString("','") + relpath +
- QCString("');});\n"
+ QCString("'); initResizable(); });\n"
"/* @license-end */\n"
"</script>\n"
"<div id=\"doc-content\">\n");
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index c514102..066e6f7 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -308,8 +308,7 @@ void HtmlHelp::initialize()
m_fromUtf8 = portable_iconv_open(str,"UTF-8");
if (m_fromUtf8==(void *)(-1))
{
- err("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str);
- exit(1);
+ term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str);
}
/* open the contents file */
@@ -317,8 +316,7 @@ void HtmlHelp::initialize()
cf = new QFile(fName);
if (!cf->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",fName.data());
- exit(1);
+ term("Could not open file %s for writing\n",fName.data());
}
/* Write the header of the contents file */
cts.setDevice(cf);
@@ -334,8 +332,7 @@ void HtmlHelp::initialize()
kf = new QFile(fName);
if (!kf->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",fName.data());
- exit(1);
+ term("Could not open file %s for writing\n",fName.data());
}
/* Write the header of the contents file */
kts.setDevice(kf);
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index a0bbf73..de2335b 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -280,7 +280,10 @@ void LatexDocVisitor::visit(DocLineBreak *)
void LatexDocVisitor::visit(DocHorRuler *)
{
if (m_hide) return;
- m_t << "\\DoxyHorRuler\n";
+ if (insideTable())
+ m_t << "\\DoxyHorRuler{1}\n";
+ else
+ m_t << "\\DoxyHorRuler{0}\n";
}
void LatexDocVisitor::visit(DocStyleChange *s)
@@ -349,8 +352,8 @@ void LatexDocVisitor::visit(DocVerbatim *s)
{
m_t << "\n\\begin{DoxyCode}{" << usedTableLevels() << "}\n";
LatexCodeGenerator::setDoxyCodeOpen(TRUE);
- Doxygen::parserManager->getParser(lang)
- ->parseCode(m_ci,s->context(),s->text(),langExt,
+ Doxygen::parserManager->getCodeParser(lang)
+ .parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
LatexCodeGenerator::setDoxyCodeOpen(FALSE);
m_t << "\\end{DoxyCode}\n";
@@ -461,8 +464,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
LatexCodeGenerator::setDoxyCodeOpen(TRUE);
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -482,8 +485,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
case DocInclude::Include:
m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
LatexCodeGenerator::setDoxyCodeOpen(TRUE);
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
inc->exampleFile(),
0, // fileDef
@@ -512,8 +515,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
{
m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
LatexCodeGenerator::setDoxyCodeOpen(TRUE);
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -530,8 +533,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
LatexCodeGenerator::setDoxyCodeOpen(TRUE);
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -583,8 +586,8 @@ void LatexDocVisitor::visit(DocIncOperator *op)
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(m_ci,op->context(),op->text(),langExt,
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(m_ci,op->context(),op->text(),langExt,
op->isExample(),op->exampleFile(),
fd, // fileDef
op->line(), // startLine
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index e70e4bf..7d54f7a 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -288,8 +288,7 @@ static void writeLatexMakefile()
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",fileName.data());
- exit(1);
+ term("Could not open file %s for writing\n",fileName.data());
}
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
QCString latex_command = theTranslator->latexCommandName();
@@ -387,8 +386,7 @@ static void writeMakeBat()
bool generateBib = !Doxygen::citeDict->isEmpty();
if (!file.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",fileName.data());
- exit(1);
+ term("Could not open file %s for writing\n",fileName.data());
}
FTextStream t(&file);
t << "set Dir_Old=%cd%\n";
@@ -468,8 +466,7 @@ void LatexGenerator::init()
QDir d(dir);
if (!d.exists() && !d.mkdir(dir))
{
- err("Could not create output directory %s\n",dir.data());
- exit(1);
+ term("Could not create output directory %s\n",dir.data());
}
writeLatexMakefile();
@@ -624,6 +621,11 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"}\n"
"\\makeatother\n"
"\n";
+ //
+ t << "\\makeatletter\n"
+ "\\newcommand\\hrulefilll{\\leavevmode\\leaders\\hrule\\hskip 0pt plus 1filll\\kern\\z@}\n"
+ "\\makeatother\n"
+ "\n";
// Headers & footers
QGString genString;
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index 21e7cb9..3db556d 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -204,8 +204,8 @@ void ManDocVisitor::visit(DocVerbatim *s)
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
- Doxygen::parserManager->getParser(lang)
- ->parseCode(m_ci,s->context(),s->text(),
+ Doxygen::parserManager->getCodeParser(lang)
+ .parseCode(m_ci,s->context(),s->text(),
langExt,
s->isExample(),s->exampleFile());
if (!m_firstCol) m_t << endl;
@@ -257,8 +257,8 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << ".nf" << endl;
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -281,8 +281,8 @@ void ManDocVisitor::visit(DocInclude *inc)
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -318,8 +318,8 @@ void ManDocVisitor::visit(DocInclude *inc)
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -338,8 +338,8 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << ".nf" << endl;
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -397,8 +397,8 @@ void ManDocVisitor::visit(DocIncOperator *op)
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(m_ci,op->context(),op->text(),langExt,
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(m_ci,op->context(),op->text(),langExt,
op->isExample(),op->exampleFile(),
fd, // fileDef
op->line(), // startLine
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 06d3c4a..832863e 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -112,14 +112,12 @@ void ManGenerator::init()
QDir d(manOutput);
if (!d.exists() && !d.mkdir(manOutput))
{
- err("Could not create output directory %s\n",manOutput.data());
- exit(1);
+ term("Could not create output directory %s\n",manOutput.data());
}
d.setPath(manOutput + "/" + getSubdir());
if (!d.exists() && !d.mkdir(manOutput + "/" + getSubdir()))
{
- err("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data());
- exit(1);
+ term("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data());
}
createSubDirs(d);
}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index f6720ea..8594a15 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -51,6 +51,7 @@
#include "config.h"
#include "section.h"
#include "message.h"
+#include "portable.h"
//-----------
@@ -108,7 +109,8 @@ static Entry *g_current;
static QCString g_fileName;
static int g_lineNr;
static int g_indentLevel=0; // 0 is outside markdown, -1=page level
-
+static const char g_utf8_nbsp[3] = {'\xc2', '\xa0', '\0'}; // UTF-8 nbsp
+static const char *g_doxy_nsbp = "&_doxy_nbsp;"; // doxygen escape command for UTF-8 nbsp
//----------
const int codeBlockIndent = 4;
@@ -1028,6 +1030,17 @@ static int processCodeSpan(GrowBuf &out, const char *data, int /*offset*/, int s
return end;
}
+static void addStrEscapeUtf8Nbsp(GrowBuf &out,const char *s,int len)
+{
+ if (Portable::strnstr(s,g_doxy_nsbp,len)==0) // no escape needed -> fast
+ {
+ out.addStr(s,len);
+ }
+ else // escape needed -> slow
+ {
+ out.addStr(substitute(QCString(s).left(len),g_doxy_nsbp,g_utf8_nbsp));
+ }
+}
static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int size)
{
@@ -1044,7 +1057,7 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
if (qstrncmp(&data[i+1],endBlockName,l)==0)
{
//printf("found end at %d\n",i);
- out.addStr(data,i+1+l);
+ addStrEscapeUtf8Nbsp(out,data,i+1+l);
return i+1+l;
}
}
@@ -1828,7 +1841,7 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
}
- out.addStr("<table class=\"markdownTable\">\n");
+ out.addStr("<table class=\"markdownTable\">");
QCString cellTag("th"), cellClass("class=\"markdownTableHead");
for (unsigned row = 0; row < tableContents.size(); row++)
{
@@ -1836,16 +1849,16 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
{
if (row % 2)
{
- out.addStr("<tr class=\"markdownTableRowOdd\">\n");
+ out.addStr("<tr class=\"markdownTableRowOdd\">");
}
else
{
- out.addStr("<tr class=\"markdownTableRowEven\">\n");
+ out.addStr("<tr class=\"markdownTableRowEven\">");
}
}
else
{
- out.addStr(" <tr class=\"markdownTableHead\">\n");
+ out.addStr(" <tr class=\"markdownTableHead\">");
}
for (int c = 0; c < columns; c++)
{
@@ -1900,7 +1913,7 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
}
// need at least one space on either side of the cell text in
// order for doxygen to do other formatting
- out.addStr("> " + cellText + "\n</" + cellTag + ">\n");
+ out.addStr("> " + cellText + "</" + cellTag + ">");
}
cellTag = "td";
cellClass = "class=\"markdownTableBody";
@@ -2174,9 +2187,9 @@ static void writeFencedCodeBlock(GrowBuf &out,const char *data,const char *lng,
{
out.addStr("{"+lang+"}");
}
- out.addStr(data+blockStart,blockEnd-blockStart);
+ addStrEscapeUtf8Nbsp(out,data+blockStart,blockEnd-blockStart);
out.addStr("\n");
- out.addStr("@endcode");
+ out.addStr("@endcode\n");
}
static QCString processQuotations(const QCString &s,int refIndent)
@@ -2484,7 +2497,7 @@ static QCString detab(const QCString &s,int &refIndent)
// special handling of the UTF-8 nbsp character 0xc2 0xa0
if (c == '\xc2' && data[i] == '\xa0')
{
- out.addStr("&nbsp;");
+ out.addStr(g_doxy_nsbp);
i++;
}
else
@@ -2561,7 +2574,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons
processInline(out,s,s.length());
out.addChar(0);
Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(out.get()));
- return out.get();
+ return substitute(out.get(),g_doxy_nsbp,"&nbsp;");
}
//---------------------------------------------------------------------------
@@ -2576,13 +2589,13 @@ QCString markdownFileNameToId(const QCString &fileName)
}
-void MarkdownFileParser::parseInput(const char *fileName,
+void MarkdownOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
- std::unique_ptr<Entry> current = std::make_unique<Entry>();
+ std::shared_ptr<Entry> current = std::make_shared<Entry>();
current->lang = SrcLangExt_Markdown;
current->fileName = fileName;
current->docFile = fileName;
@@ -2660,47 +2673,14 @@ void MarkdownFileParser::parseInput(const char *fileName,
g_indentLevel=0;
}
-void MarkdownFileParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName,
- FileDef *fileDef,
- int startLine,
- int endLine,
- bool inlineFragment,
- const MemberDef *memberDef,
- bool showLineNumbers,
- const Definition *searchCtx,
- bool collectXRefs
- )
+void MarkdownOutlineParser::parsePrototype(const char *text)
{
- ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp");
- if (pIntf!=this)
+ OutlineParserInterface &intf = Doxygen::parserManager->getOutlineParser("*.cpp");
+ if (&intf!=this)
{
- pIntf->parseCode(
- codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,showLineNumbers,
- searchCtx,collectXRefs);
+ intf.parsePrototype(text);
}
}
-void MarkdownFileParser::resetCodeParserState()
-{
- ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp");
- if (pIntf!=this)
- {
- pIntf->resetCodeParserState();
- }
-}
-
-void MarkdownFileParser::parsePrototype(const char *text)
-{
- ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp");
- if (pIntf!=this)
- {
- pIntf->parsePrototype(text);
- }
-}
+//------------------------------------------------------------------------
diff --git a/src/markdown.h b/src/markdown.h
index 2c9a496..3ffd155 100644
--- a/src/markdown.h
+++ b/src/markdown.h
@@ -25,38 +25,20 @@ class Entry;
QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,const QCString &s);
QCString markdownFileNameToId(const QCString &fileName);
-class MarkdownFileParser : public ParserInterface
+class MarkdownOutlineParser : public OutlineParserInterface
{
public:
- virtual ~MarkdownFileParser() {}
+ virtual ~MarkdownOutlineParser() {}
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &) const { return FALSE; }
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- );
- void resetCodeParserState();
void parsePrototype(const char *text);
};
-
-
#endif
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index a9e332e..e03d1df 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1300,32 +1300,32 @@ class MemberDefImpl::IMPL
const ArgumentList &al,const char *meta
);
- ClassDef *classDef; // member of or related to
- FileDef *fileDef; // member of file definition
- NamespaceDef *nspace; // the namespace this member is in.
+ ClassDef *classDef = 0; // member of or related to
+ FileDef *fileDef = 0; // member of file definition
+ NamespaceDef *nspace = 0; // the namespace this member is in.
- MemberDef *enumScope; // the enclosing scope, if this is an enum field
- bool livesInsideEnum;
- const MemberDef *annEnumType; // the anonymous enum that is the type of this member
- MemberList *enumFields; // enumeration fields
+ MemberDef *enumScope = 0; // the enclosing scope, if this is an enum field
+ bool livesInsideEnum = false;
+ const MemberDef *annEnumType = 0; // the anonymous enum that is the type of this member
+ MemberList *enumFields = 0; // enumeration fields
- MemberDef *redefines; // the members that this member redefines
- MemberList *redefinedBy; // the list of members that redefine this one
+ MemberDef *redefines = 0; // the members that this member redefines
+ MemberList *redefinedBy = 0; // the list of members that redefine this one
- MemberDef *memDef; // member definition for this declaration
- MemberDef *memDec; // member declaration for this definition
- ClassDef *relatedAlso; // points to class marked by relatedAlso
+ MemberDef *memDef = 0; // member definition for this declaration
+ MemberDef *memDec = 0; // member declaration for this definition
+ ClassDef *relatedAlso = 0; // points to class marked by relatedAlso
- ExampleSDict *exampleSDict; // a dictionary of all examples for quick access
+ ExampleSDict *exampleSDict = 0; // a dictionary of all examples for quick access
QCString type; // return actual type
QCString accessorType; // return type that tell how to get to this member
- ClassDef *accessorClass; // class that this member accesses (for anonymous types)
+ ClassDef *accessorClass = 0; // class that this member accesses (for anonymous types)
QCString args; // function arguments/variable array specifiers
QCString def; // member definition in code (fully qualified name)
QCString anc; // HTML anchor name
- Specifier virt; // normal/virtual/pure virtual
- Protection prot; // protection type [Public/Protected/Private]
+ Specifier virt = Normal; // normal/virtual/pure virtual
+ Protection prot = Public; // protection type [Public/Protected/Private]
QCString decl; // member declaration in class
QCString bitfields; // struct member bitfields
@@ -1335,13 +1335,13 @@ class MemberDefImpl::IMPL
QCString initializer; // initializer
QCString extraTypeChars; // extra type info found after the argument list
QCString enumBaseType; // base type of the enum (C++11)
- int initLines; // number of lines in the initializer
+ int initLines = 0; // number of lines in the initializer
- uint64 memSpec; // The specifiers present for this member
- MemberType mtype; // returns the kind of member
- int maxInitLines; // when the initializer will be displayed
- int userInitLines; // result of explicit \hideinitializer or \showinitializer
- MemberDef *annMemb;
+ uint64 memSpec = 0; // The specifiers present for this member
+ MemberType mtype = MemberType_Define; // returns the kind of member
+ int maxInitLines = 0; // when the initializer will be displayed
+ int userInitLines = 0; // result of explicit \hideinitializer or \showinitializer
+ MemberDef *annMemb = 0;
ArgumentList defArgList; // argument list of this member definition
ArgumentList declArgList; // argument list of this member declaration
@@ -1358,19 +1358,19 @@ class MemberDefImpl::IMPL
// as its type then this is computed by
// getClassDefOfAnonymousType() and
// cached here.
- SDict<MemberList> *classSectionSDict; // not accessible
+ SDict<MemberList> *classSectionSDict = 0; // not accessible
- const MemberDef *groupAlias; // Member containing the definition
- int grpId; // group id
- MemberGroup *memberGroup; // group's member definition
- GroupDef *group; // group in which this member is in
+ const MemberDef *groupAlias = 0; // Member containing the definition
+ int grpId = 0; // group id
+ MemberGroup *memberGroup = 0; // group's member definition
+ GroupDef *group = 0; // group in which this member is in
Grouping::GroupPri_t grouppri; // priority of this definition
QCString groupFileName; // file where this grouping was defined
- int groupStartLine; // line " " " " "
- MemberDef *groupMember;
+ int groupStartLine = 0; // line " " " " "
+ MemberDef *groupMember = 0;
- bool isTypedefValCached;
- const ClassDef *cachedTypedefValue;
+ bool isTypedefValCached = false;
+ const ClassDef *cachedTypedefValue = 0;
QCString cachedTypedefTemplSpec;
QCString cachedResolvedType;
@@ -1380,41 +1380,41 @@ class MemberDefImpl::IMPL
//QCString inbodyDocs;
// documentation inheritance
- MemberDef *docProvider;
+ MemberDef *docProvider = 0;
// to store the output file base from tag files
QCString explicitOutputFileBase;
// objective-c
- bool implOnly; // function found in implementation but not
- // in the interface
- mutable bool hasDocumentedParams;
- mutable bool hasDocumentedReturnType;
- bool isDMember;
- Relationship related; // relationship of this to the class
- bool stat; // is it a static function?
- bool proto; // is it a prototype;
- bool docEnumValues; // is an enum with documented enum values.
-
- mutable bool annScope; // member is part of an anonymous scope
- mutable bool annUsed; // ugly: needs to be mutable to allow setAnonymousUsed to act as a
- // const member.
- bool hasCallGraph;
- bool hasCallerGraph;
- bool hasReferencedByRelation;
- bool hasReferencesRelation;
- bool explExt; // member was explicitly declared external
- bool tspec; // member is a template specialization
- bool groupHasDocs; // true if the entry that caused the grouping was documented
- bool docsForDefinition; // TRUE => documentation block is put before
- // definition.
- // FALSE => block is put before declaration.
- ClassDef *category;
- MemberDef *categoryRelation;
+ bool implOnly = false; // function found in implementation but not
+ // in the interface
+ mutable bool hasDocumentedParams = false;
+ mutable bool hasDocumentedReturnType = false;
+ bool isDMember = false;
+ Relationship related = Member; // relationship of this to the class
+ bool stat = false; // is it a static function?
+ bool proto = false; // is it a prototype?
+ bool docEnumValues = false; // is an enum with documented enum values.
+
+ mutable bool annScope = false; // member is part of an anonymous scope
+ mutable bool annUsed = false; // ugly: needs to be mutable to allow setAnonymousUsed to act as a
+ // const member.
+ bool hasCallGraph = false;
+ bool hasCallerGraph = false;
+ bool hasReferencedByRelation = false;
+ bool hasReferencesRelation = false;
+ bool explExt = false; // member was explicitly declared external
+ bool tspec = false; // member is a template specialization
+ bool groupHasDocs = false; // true if the entry that caused the grouping was documented
+ bool docsForDefinition = false; // TRUE => documentation block is put before
+ // definition.
+ // FALSE => block is put before declaration.
+ ClassDef *category = 0;
+ MemberDef *categoryRelation = 0;
QCString declFileName;
- int declLine;
- int declColumn;
- int numberOfFlowKW;
+ int declLine = 0;
+ int declColumn = 0;
+ int numberOfFlowKW = 0;
};
MemberDefImpl::IMPL::IMPL() :
@@ -1503,7 +1503,7 @@ void MemberDefImpl::IMPL::init(Definition *def,
// convert function declaration arguments (if any)
if (!args.isEmpty())
{
- stringToArgumentList(args,declArgList,&extraTypeChars);
+ stringToArgumentList(def->getLanguage(),args,declArgList,&extraTypeChars);
//printf("setDeclArgList %s to %s const=%d\n",args.data(),
// argListToString(declArgList).data(),declArgList->constSpecifier);
}
@@ -2145,11 +2145,11 @@ bool MemberDefImpl::isBriefSectionVisible() const
// Hide friend (class|struct|union) declarations if HIDE_FRIEND_COMPOUNDS is true
bool visibleIfFriendCompound = !(hideFriendCompounds &&
- isFriend() &&
+ isFriend() /*&&
(m_impl->type=="friend class" ||
m_impl->type=="friend struct" ||
m_impl->type=="friend union"
- )
+ )*/
);
// only include members that are non-private unless EXTRACT_PRIVATE is
@@ -2719,11 +2719,11 @@ bool MemberDefImpl::isDetailedSectionLinkable() const
// hide friend (class|struct|union) member if HIDE_FRIEND_COMPOUNDS
// is true
bool friendCompoundFilter = !(Config_getBool(HIDE_FRIEND_COMPOUNDS) &&
- isFriend() &&
+ isFriend() /*&&
(m_impl->type=="friend class" ||
m_impl->type=="friend struct" ||
m_impl->type=="friend union"
- )
+ )*/
);
@@ -2877,7 +2877,8 @@ void MemberDefImpl::_writeCallGraph(OutputList &ol) const
DotCallGraph callGraph(this,FALSE);
if (callGraph.isTooBig())
{
- warn_uncond("Call graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(qualifiedName()));
+ warn_uncond("Call graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
+ qPrint(qualifiedName()), callGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!callGraph.isTrivial())
{
@@ -2900,7 +2901,8 @@ void MemberDefImpl::_writeCallerGraph(OutputList &ol) const
DotCallGraph callerGraph(this, TRUE);
if (callerGraph.isTooBig())
{
- warn_uncond("Caller graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(qualifiedName()));
+ warn_uncond("Caller graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
+ qPrint(qualifiedName()), callerGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!callerGraph.isTrivial())
{
@@ -3705,10 +3707,10 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
else
ol.parseText(theTranslator->trInitialValue());
ol.endBold();
- ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
- pIntf->resetCodeParserState();
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
+ intf.resetCodeParserState();
ol.startCodeFragment();
- pIntf->parseCode(ol,scopeName,m_impl->initializer,lang,FALSE,0,const_cast<FileDef*>(getFileDef()),
+ intf.parseCode(ol,scopeName,m_impl->initializer,lang,FALSE,0,const_cast<FileDef*>(getFileDef()),
-1,-1,TRUE,this,FALSE,this);
ol.endCodeFragment();
}
@@ -4168,6 +4170,7 @@ void MemberDefImpl::warnIfUndocumentedParams() const
!isReference() &&
!Doxygen::suppressDocWarnings)
{
+ QCString returnType = typeString();
if (!m_impl->hasDocumentedParams)
{
warn_doc_error(getDefFileName(),getDefLine(),
@@ -4175,7 +4178,7 @@ void MemberDefImpl::warnIfUndocumentedParams() const
qPrint(qualifiedName()));
}
if (!m_impl->hasDocumentedReturnType &&
- isFunction() && hasDocumentation())
+ isFunction() && hasDocumentation() && !returnType.isEmpty())
{
warn_doc_error(getDefFileName(),getDefLine(),
"return type of member %s is not documented",
@@ -4184,13 +4187,6 @@ void MemberDefImpl::warnIfUndocumentedParams() const
}
}
-bool MemberDefImpl::isFriendClass() const
-{
- return (isFriend() &&
- (m_impl->type=="friend class" || m_impl->type=="friend struct" ||
- m_impl->type=="friend union"));
-}
-
bool MemberDefImpl::isDocumentedFriendClass() const
{
ClassDef *fcd=0;
@@ -6007,7 +6003,7 @@ void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef)
if (mdefAl.hasParameters())
{
ArgumentList mdefAlComb;
- stringToArgumentList(mdef->argsString(),mdefAlComb);
+ stringToArgumentList(mdef->getLanguage(),mdef->argsString(),mdefAlComb);
transferArgumentDocumentation(mdefAl,mdefAlComb);
mdec->setArgumentList(mdefAlComb);
}
@@ -6020,7 +6016,7 @@ void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef)
if (mdecAl.hasParameters())
{
ArgumentList mdecAlComb;
- stringToArgumentList(mdec->argsString(),mdecAlComb);
+ stringToArgumentList(mdec->getLanguage(),mdec->argsString(),mdecAlComb);
transferArgumentDocumentation(mdecAl,mdecAlComb);
mdef->setDeclArgumentList(mdecAlComb);
}
@@ -6132,6 +6128,14 @@ bool MemberDefImpl::isFriendToHide() const
return isFriendToHide;
}
+bool MemberDefImpl::isFriendClass() const
+{
+ return (isFriend() &&
+ (m_impl->type=="friend class" || m_impl->type=="friend struct" ||
+ m_impl->type=="friend union"));
+}
+
+
bool MemberDefImpl::isNotFriend() const
{
return !(isFriend() && isFriendToHide());
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index da52d64..05c38c3 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -358,7 +358,7 @@ void MemberGroup::findSectionsInDocumentation(const Definition *d)
void MemberGroup::setRefItems(const std::vector<ListItemInfo> &sli)
{
- m_xrefListItems = sli;
+ m_xrefListItems.insert(m_xrefListItems.end(), sli.cbegin(), sli.cend());
}
void MemberGroup::writeTagFile(FTextStream &tagFile)
@@ -370,5 +370,5 @@ void MemberGroup::writeTagFile(FTextStream &tagFile)
void MemberGroupInfo::setRefItems(const std::vector<ListItemInfo> &sli)
{
- m_sli = sli;
+ m_sli.insert(m_sli.end(), sli.cbegin(), sli.cend());
}
diff --git a/src/membergroup.h b/src/membergroup.h
index 0fda3d7..aa30063 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -89,18 +89,18 @@ class MemberGroup
int docLine() const { return m_docLine; }
private:
- MemberList *memberList; // list of all members in the group
- MemberList *inDeclSection;
- int grpId;
+ MemberList *memberList = 0; // list of all members in the group
+ MemberList *inDeclSection = 0;
+ int grpId = 0;
QCString grpHeader;
QCString fileName; // base name of the generated file
QCString doc;
- bool inSameSection;
- int m_numDecMembers;
- int m_numDocMembers;
- const Definition *m_parent;
+ bool inSameSection = 0;
+ int m_numDecMembers = 0;
+ int m_numDocMembers = 0;
+ const Definition *m_parent = 0;
QCString m_docFile;
- int m_docLine;
+ int m_docLine = 0;
std::vector<ListItemInfo> m_xrefListItems;
};
diff --git a/src/message.cpp b/src/message.cpp
index ddf757a..d8f83ef 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -90,7 +90,7 @@ void initWarningFormat()
if (!Config_getString(WARN_LOGFILE).isEmpty())
{
- warnFile = portable_fopen(Config_getString(WARN_LOGFILE),"w");
+ warnFile = Portable::fopen(Config_getString(WARN_LOGFILE),"w");
}
if (!warnFile) // point it to something valid, because warn() relies on it
{
@@ -251,6 +251,20 @@ extern void err_full(const char *file,int line,const char *fmt, ...)
va_end(args);
}
+void term(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(warnFile, (QCString(error_str) + fmt).data(), args);
+ va_end(args);
+ if (warnFile != stderr)
+ {
+ for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " ");
+ fprintf(warnFile, "%s\n", "Exiting...");
+ }
+ exit(1);
+}
+
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
{
const char *enter_txt = "entering";
diff --git a/src/message.h b/src/message.h
index 3b1a294..7b12ba8 100644
--- a/src/message.h
+++ b/src/message.h
@@ -30,6 +30,7 @@ extern void warn_doc_error(const char *file,int line,const char *fmt, ...);
extern void warn_uncond(const char *fmt, ...);
extern void err(const char *fmt, ...);
extern void err_full(const char *file,int line,const char *fmt, ...);
+extern void term(const char *fmt, ...);
void initWarningFormat();
extern void printlex(int dbg, bool enter, const char *lexName, const char *fileName);
diff --git a/src/msc.cpp b/src/msc.cpp
index 51e23fa..29c9334 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -95,7 +95,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,MscOutputFormat format)
{
QCString absOutFile = outDir;
- absOutFile+=portable_pathSeparator();
+ absOutFile+=Portable::pathSeparator();
absOutFile+=outFile;
mscgen_format_t msc_format;
@@ -130,12 +130,12 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
absOutFile.data(),absOutFile.data());
- portable_sysTimerStart();
- if (portable_system("epstopdf",epstopdfArgs)!=0)
+ Portable::sysTimerStart();
+ if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
err("Problems running epstopdf. Check your TeX installation!\n");
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
}
Doxygen::indexList->addImageFile(imgName);
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index fa258a0..220f300 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -124,23 +124,23 @@ class NamespaceDefImpl : public DefinitionImpl, public NamespaceDef
QCString fileName;
FileList files;
- NamespaceSDict *usingDirList;
- SDict<Definition> *usingDeclList;
- SDict<Definition> *m_innerCompounds;
+ NamespaceSDict *usingDirList = 0;
+ SDict<Definition> *usingDeclList = 0;
+ SDict<Definition> *m_innerCompounds = 0;
- MemberSDict *m_allMembersDict;
+ MemberSDict *m_allMembersDict = 0;
QList<MemberList> m_memberLists;
- MemberGroupSDict *memberGroupSDict;
- ClassSDict *classSDict;
- ClassSDict *interfaceSDict;
- ClassSDict *structSDict;
- ClassSDict *exceptionSDict;
- NamespaceSDict *namespaceSDict;
- bool m_subGrouping;
+ MemberGroupSDict *memberGroupSDict = 0;
+ ClassSDict *classSDict = 0;
+ ClassSDict *interfaceSDict = 0;
+ ClassSDict *structSDict = 0;
+ ClassSDict *exceptionSDict = 0;
+ NamespaceSDict *namespaceSDict = 0;
+ bool m_subGrouping = false;
enum { NAMESPACE, MODULE, CONSTANT_GROUP, LIBRARY } m_type;
- bool m_isPublished;
+ bool m_isPublished = false;
QCString metaData;
- bool m_inline;
+ bool m_inline = false;
};
NamespaceDef *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
@@ -246,7 +246,7 @@ class NamespaceDefAliasImpl : public DefinitionAliasImpl, public NamespaceDef
bool isVisited() const { return m_visited; }
private:
- bool m_visited;
+ bool m_visited = false;
};
NamespaceDef *createNamespaceDefAlias(const Definition *newScope,const NamespaceDef *nd)
diff --git a/src/outputgen.cpp b/src/outputgen.cpp
index 53d2d7f..f54eaf1 100644
--- a/src/outputgen.cpp
+++ b/src/outputgen.cpp
@@ -46,8 +46,7 @@ void OutputGenerator::startPlainFile(const char *name)
file = new QFile(fileName);
if (!file->open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n",fileName.data());
- exit(1);
+ term("Could not open file %s for writing\n",fileName.data());
}
t.setDevice(file);
}
diff --git a/src/parserintf.h b/src/parserintf.h
index c0939c9..5095a1e 100644
--- a/src/parserintf.h
+++ b/src/parserintf.h
@@ -18,10 +18,11 @@
#ifndef PARSERINTF_H
#define PARSERINTF_H
-#include <qdict.h>
#include <qstrlist.h>
#include <memory>
+#include <map>
+#include <string>
#include "types.h"
@@ -31,16 +32,16 @@ class CodeOutputInterface;
class MemberDef;
class Definition;
-/** \brief Abstract interface for programming language parsers.
+/** \brief Abstract interface for outline parsers.
*
* By implementing the methods of this interface one can add
- * a new language parser to doxygen. The parser can make use of the
+ * a new language parser to doxygen. The parser implementation can make use of the
* comment block parser to parse the contents of special comment blocks.
*/
-class ParserInterface
+class OutlineParserInterface
{
public:
- virtual ~ParserInterface() {}
+ virtual ~OutlineParserInterface() {}
/** Starts processing a translation unit (source files + headers).
* After this call parseInput() is called with sameTranslationUnit
@@ -69,7 +70,7 @@ class ParserInterface
*/
virtual void parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit) = 0;
@@ -80,6 +81,27 @@ class ParserInterface
*/
virtual bool needsPreprocessing(const QCString &extension) const = 0;
+ /** Callback function called by the comment block scanner.
+ * It provides a string \a text containing the prototype of a function
+ * or variable. The parser should parse this and store the information
+ * in the Entry node that corresponds with the node for which the
+ * comment block parser was invoked.
+ */
+ virtual void parsePrototype(const char *text) = 0;
+
+};
+
+/** \brief Abstract interface for code parsers.
+ *
+ * By implementing the methods of this interface one can add
+ * a new language parser to doxygen. This interface is used for
+ * syntax highlighting, but also to extract cross references and call graphs.
+ */
+class CodeParserInterface
+{
+ public:
+ virtual ~CodeParserInterface() {}
+
/** Parses a source file or fragment with the goal to produce
* highlighted and cross-referenced output.
* @param[in] codeOutIntf Abstract interface for writing the result.
@@ -125,14 +147,6 @@ class ParserInterface
*/
virtual void resetCodeParserState() = 0;
- /** Callback function called by the comment block scanner.
- * It provides a string \a text containing the prototype of a function
- * or variable. The parser should parse this and store the information
- * in the Entry node that corresponds with the node for which the
- * comment block parser was invoked.
- */
- virtual void parsePrototype(const char *text) = 0;
-
};
//-----------------------------------------------------------------------------
@@ -145,18 +159,22 @@ class ParserInterface
class ParserManager
{
public:
- /** Creates the parser manager object.
- */
- ParserManager()
- : m_defaultParser(0) { m_parsers.setAutoDelete(TRUE); }
- ~ParserManager()
+ struct ParserPair
{
- delete m_defaultParser;
- }
+ ParserPair(std::unique_ptr<OutlineParserInterface> oli,
+ std::unique_ptr<CodeParserInterface> cpi)
+ : outlineParser(std::move(oli)), codeParser(std::move(cpi))
+ {
+ }
- void registerDefaultParser(ParserInterface *parser)
+ std::unique_ptr<OutlineParserInterface> outlineParser;
+ std::unique_ptr<CodeParserInterface> codeParser;
+ };
+
+ ParserManager(std::unique_ptr<OutlineParserInterface> outlineParser,
+ std::unique_ptr<CodeParserInterface> codeParser)
+ : m_defaultParsers(std::move(outlineParser),std::move(codeParser))
{
- m_defaultParser = parser;
}
/** Registers an additional parser.
@@ -165,9 +183,11 @@ class ParserManager
* @param[in] parser The parser that is to be used for the
* given name.
*/
- void registerParser(const char *name,ParserInterface *parser)
+ void registerParser(const char *name,std::unique_ptr<OutlineParserInterface> outlineParser,
+ std::unique_ptr<CodeParserInterface> codeParser)
{
- m_parsers.insert(name,parser);
+ m_parsers.emplace(std::string(name),
+ ParserPair(std::move(outlineParser),std::move(codeParser)));
}
/** Registers a file \a extension with a parser with name \a parserName.
@@ -176,13 +196,16 @@ class ParserManager
bool registerExtension(const char *extension, const char *parserName)
{
if (parserName==0 || extension==0) return FALSE;
- ParserInterface *intf = m_parsers.find(parserName);
- if (intf==0) return FALSE;
- if (m_extensions.find(extension)!=0) // extension already exists
+
+ const auto &parserIt = m_parsers.find(parserName);
+ if (parserIt == m_parsers.end()) return FALSE;
+
+ auto extensionIt = m_extensions.find(extension);
+ if (extensionIt != m_extensions.end()) // extension already exists
{
- m_extensions.remove(extension); // remove it
+ m_extensions.erase(extensionIt); // remove it (e.g. user specified extension overrules built in one)
}
- m_extensions.insert(extension,intf); // add new mapping
+ m_extensions.emplace(std::string(extension),parserIt->second); // add new mapping
return TRUE;
}
@@ -190,22 +213,36 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* the interface to the default parser will be returned.
*/
- ParserInterface *getParser(const char *extension)
+ OutlineParserInterface &getOutlineParser(const char *extension)
{
- QCString ext = QCString(extension).lower();
+ return *getParsers(extension).outlineParser;
+ }
+
+ /** Gets the interface to the parser associated with given \a extension.
+ * If there is no parser explicitly registered for the supplied extension,
+ * the interface to the default parser will be returned.
+ */
+ CodeParserInterface &getCodeParser(const char *extension)
+ {
+ return *getParsers(extension).codeParser;
+ }
+
+ private:
+ ParserPair &getParsers(const char *extension)
+ {
+ QCString ext = QCString(extension).lower().data();
if (ext.isEmpty()) ext=".no_extension";
- ParserInterface *intf = m_extensions.find(ext);
- if (intf==0 && ext.length()>4)
+ auto it = m_extensions.find(ext.data());
+ if (it==m_extensions.end() && ext.length()>4)
{
- intf = m_extensions.find(ext.left(4));
+ it = m_extensions.find(ext.left(4).data());
}
- return intf ? intf : m_defaultParser;
+ return it!=m_extensions.end() ? it->second : m_defaultParsers;
}
- private:
- QDict<ParserInterface> m_parsers;
- QDict<ParserInterface> m_extensions;
- ParserInterface *m_defaultParser;
+ std::map<std::string,ParserPair> m_parsers;
+ std::map<std::string,ParserPair &> m_extensions;
+ ParserPair m_defaultParsers;
};
#endif
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index be226b7..97b3d3d 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -2271,9 +2271,8 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir)
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
- err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
+ term("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDirectory.data());
- exit(1);
}
else
{
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index ff4ebd3..fa50f2d 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -210,7 +210,7 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
}
while (s)
{
- pumlArgs += portable_pathListSeparator();
+ pumlArgs += Portable::pathListSeparator();
pumlArgs += s;
s = pumlIncludePathList.next();
}
@@ -227,7 +227,7 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
pumlArgs += "-graphvizdot \"";
pumlArgs += dotPath;
pumlArgs += "dot";
- pumlArgs += portable_commandExtension();
+ pumlArgs += Portable::commandExtension();
pumlArgs += "\" ";
}
switch (format)
@@ -283,8 +283,8 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
file.close();
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
- portable_sysTimerStart();
- if ((exitCode=portable_system(pumlExe,pumlArguments,TRUE))!=0)
+ Portable::sysTimerStart();
+ if ((exitCode=Portable::system(pumlExe,pumlArguments,TRUE))!=0)
{
err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line. Exit code: %d\n",
plantumlJarPath.data(),exitCode);
@@ -294,7 +294,7 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
Debug::print(Debug::Plantuml,0,"*** %s Remove %s file\n","PlantumlManager::runPlantumlContent",qPrint(puFileName));
file.remove();
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
if ( (format==PlantumlManager::PUML_EPS) && (Config_getBool(USE_PDFLATEX)) )
{
@@ -309,12 +309,12 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
const int maxCmdLine = 40960;
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",qPrint(pumlOutDir),qPrint(*nb),qPrint(pumlOutDir),qPrint(*nb));
- portable_sysTimerStart();
- if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0)
+ Portable::sysTimerStart();
+ if ((exitCode=Portable::system("epstopdf",epstopdfArgs))!=0)
{
err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode);
}
- portable_sysTimerStop();
+ Portable::sysTimerStop();
}
}
}
diff --git a/src/portable.cpp b/src/portable.cpp
index c6e829d..3ee1081 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -1,36 +1,43 @@
+#include "portable.h"
+
#include <stdlib.h>
-#include <ctype.h>
+#include <stdio.h>
+
#if defined(_WIN32) && !defined(__CYGWIN__)
#undef UNICODE
#define _WIN32_DCOM
#include <windows.h>
#else
#include <unistd.h>
-#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
extern char **environ;
#endif
+#include <ctype.h>
#include <qglobal.h>
#include <qdatetime.h>
+#include <qglobal.h>
+#include <qdir.h>
+#include <map>
+#include <string>
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#define popen _popen
-#define pclose _pclose
-#endif
-
-#include "portable.h"
#include "util.h"
#ifndef NODEBUG
#include "debug.h"
#endif
+#if !defined(_WIN32) || defined(__CYGWIN__)
+static bool environmentLoaded = false;
+static std::map<std::string,std::string> proc_env = std::map<std::string,std::string>();
+#endif
+
static double g_sysElapsedTime;
static QTime g_time;
-int portable_system(const char *command,const char *args,bool commandHasConsole)
+
+int Portable::system(const char *command,const char *args,bool commandHasConsole)
{
if (command==0) return 1;
@@ -127,7 +134,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
#else // Win32 specific
if (commandHasConsole)
{
- return system(fullCmd);
+ return ::system(fullCmd);
}
else
{
@@ -189,13 +196,13 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
}
-uint portable_pid()
+unsigned int Portable::pid(void)
{
- uint pid;
+ unsigned int pid;
#if !defined(_WIN32) || defined(__CYGWIN__)
- pid = (uint)getpid();
+ pid = (unsigned int)getpid();
#else
- pid = (uint)GetCurrentProcessId();
+ pid = (unsigned int)GetCurrentProcessId();
#endif
return pid;
}
@@ -205,88 +212,50 @@ uint portable_pid()
static char **last_environ;
#endif
-void portable_setenv(const char *name,const char *value)
+#if !defined(_WIN32) || defined(__CYGWIN__)
+void loadEnvironment()
{
- if (value==0) value="";
-#if defined(_WIN32) && !defined(__CYGWIN__)
- SetEnvironmentVariable(name,value);
-#else
- char **ep = 0;
- size_t size;
- const size_t namelen=qstrlen(name);
- const size_t vallen=qstrlen(value) + 1;
+ if(environ != NULL)
+ {
+ unsigned int i = 0;
+ char* current = environ[i];
- size = 0;
- if (environ!=0)
+ while(current != NULL) // parse all strings contained by environ til the last element (NULL)
{
- for (ep = environ; *ep; ++ep)
- {
- if (!qstrncmp (*ep, name, (uint)namelen) &&
- (*ep)[namelen] == '=')
- break;
- else
- ++size;
+ std::string env_var(current); // load current environment variable string
+ size_t pos = env_var.find("=");
+ if(pos != std::string::npos) // only parse the variable, if it is a valid environment variable...
+ { // ...which has to contain an equal sign as delimiter by definition
+ std::string name = env_var.substr(0,pos); // the string til the equal sign contains the name
+ std::string value = env_var.substr(pos + 1); // the string from the equal sign contains the value
+
+ proc_env[name] = value; // save the value by the name as its key in the classes map
}
+ i++;
+ current = environ[i];
}
+ }
- if (environ==0 || *ep==0) /* add new string */
- {
- char **new_environ;
- if (environ == last_environ && environ!=0)
- {
- // We allocated this space; we can extend it.
- new_environ = (char **) realloc (last_environ, (size + 2) * sizeof (char *));
- }
- else
- {
- new_environ = (char **) malloc ((size + 2) * sizeof (char *));
- }
-
- if (new_environ==0) // no more memory
- {
- return;
- }
-
- new_environ[size] = (char *)malloc (namelen + 1 + vallen);
- if (new_environ[size]==0)
- {
- free (new_environ);
- return;
- }
-
- if (environ != last_environ)
- {
- memcpy ((char *) new_environ, environ, size * sizeof (char *));
- }
+ environmentLoaded = true;
+}
+#endif
- memcpy(new_environ[size], name, namelen);
- new_environ[size][namelen] = '=';
- memcpy(&new_environ[size][namelen + 1], value, vallen);
- new_environ[size + 1] = 0;
- last_environ = environ = new_environ;
- }
- else /* replace existing string */
- {
- size_t len = qstrlen (*ep);
- if (len + 1 < namelen + 1 + vallen)
- {
- /* The existing string is too short; malloc a new one. */
- char *newString = (char *)malloc(namelen + 1 + vallen);
- if (newString==0)
- {
- return;
- }
- *ep = newString;
- }
- memcpy(*ep, name, namelen);
- (*ep)[namelen] = '=';
- memcpy(&(*ep)[namelen + 1], value, vallen);
+void Portable::setenv(const char *name,const char *value)
+{
+ if (value==0) value="";
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ SetEnvironmentVariable(name,value);
+#else
+ if(!environmentLoaded) // if the environment variables are not loaded already...
+ { // ...call loadEnvironment to store them in class
+ loadEnvironment();
}
+ proc_env[name] = std::string(value); // create or replace exisiting value
#endif
}
-void portable_unsetenv(const char *variable)
+void Portable::unsetenv(const char *variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
SetEnvironmentVariable(variable,0);
@@ -300,32 +269,35 @@ void portable_unsetenv(const char *variable)
return; // not properly formatted
}
- len = qstrlen(variable);
-
- ep = environ;
- while (*ep != NULL)
+ if(proc_env.find(variable) != proc_env.end())
{
- if (!qstrncmp(*ep, variable, (uint)len) && (*ep)[len]=='=')
- {
- /* Found it. Remove this pointer by moving later ones back. */
- char **dp = ep;
- do dp[0] = dp[1]; while (*dp++);
- /* Continue the loop in case NAME appears again. */
- }
- else
- {
- ++ep;
- }
+ proc_env[variable].erase();
}
#endif
}
-const char *portable_getenv(const char *variable)
-{
- return getenv(variable);
+const char *Portable::getenv(const char *variable)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ return ::getenv(variable);
+#else
+ if(!environmentLoaded) // if the environment variables are not loaded already...
+ { // ...call loadEnvironment to store them in class
+ loadEnvironment();
+ }
+
+ if(proc_env.find(variable) != proc_env.end())
+ {
+ return proc_env[variable].c_str();
+ }
+ else
+ {
+ return NULL;
+ }
+#endif
}
-portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence)
+portable_off_t Portable::fseek(FILE *f,portable_off_t offset, int whence)
{
#if defined(__MINGW32__)
return fseeko64(f,offset,whence);
@@ -336,7 +308,7 @@ portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence)
#endif
}
-portable_off_t portable_ftell(FILE *f)
+portable_off_t Portable::ftell(FILE *f)
{
#if defined(__MINGW32__)
return ftello64(f);
@@ -347,18 +319,18 @@ portable_off_t portable_ftell(FILE *f)
#endif
}
-FILE *portable_fopen(const char *fileName,const char *mode)
+FILE *Portable::fopen(const char *fileName,const char *mode)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
QString fn(fileName);
QString m(mode);
return _wfopen((wchar_t*)fn.ucs2(),(wchar_t*)m.ucs2());
#else
- return fopen(fileName,mode);
+ return ::fopen(fileName,mode);
#endif
}
-char portable_pathSeparator()
+char Portable::pathSeparator(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
return '\\';
@@ -367,7 +339,7 @@ char portable_pathSeparator()
#endif
}
-char portable_pathListSeparator()
+char Portable::pathListSeparator(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
return ';';
@@ -376,7 +348,7 @@ char portable_pathListSeparator()
#endif
}
-const char *portable_ghostScriptCommand()
+const char *Portable::ghostScriptCommand(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
return "gswin32c.exe";
@@ -385,7 +357,7 @@ const char *portable_ghostScriptCommand()
#endif
}
-const char *portable_commandExtension()
+const char *Portable::commandExtension(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
return ".exe";
@@ -394,7 +366,7 @@ const char *portable_commandExtension()
#endif
}
-bool portable_fileSystemIsCaseSensitive()
+bool Portable::fileSystemIsCaseSensitive(void)
{
#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) || defined(__CYGWIN__)
return FALSE;
@@ -403,32 +375,40 @@ bool portable_fileSystemIsCaseSensitive()
#endif
}
-FILE * portable_popen(const char *name,const char *type)
+FILE * Portable::popen(const char *name,const char *type)
{
- return popen(name,type);
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ return ::_popen(name,type);
+ #else
+ return ::popen(name,type);
+ #endif
}
-int portable_pclose(FILE *stream)
+int Portable::pclose(FILE *stream)
{
- return pclose(stream);
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ return ::_pclose(stream);
+ #else
+ return ::pclose(stream);
+ #endif
}
-void portable_sysTimerStart()
+void Portable::sysTimerStart(void)
{
g_time.start();
}
-void portable_sysTimerStop()
+void Portable::sysTimerStop(void)
{
g_sysElapsedTime+=((double)g_time.elapsed())/1000.0;
}
-double portable_getSysElapsedTime()
+double Portable::getSysElapsedTime(void)
{
return g_sysElapsedTime;
}
-void portable_sleep(int ms)
+void Portable::sleep(int ms)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
Sleep(ms);
@@ -437,7 +417,7 @@ void portable_sleep(int ms)
#endif
}
-bool portable_isAbsolutePath(const char *fileName)
+bool Portable::isAbsolutePath(const char *fileName)
{
# ifdef _WIN32
if (isalpha (fileName [0]) && fileName[1] == ':')
@@ -459,22 +439,82 @@ bool portable_isAbsolutePath(const char *fileName)
*
* This routine was inspired by the cause for bug 766059 was that in the Windows path there were forward slashes.
*/
-void portable_correct_path(void)
+void Portable::correct_path(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- const char *p = portable_getenv("PATH");
+ const char *p = Portable::getenv("PATH");
if (!p) return; // no path nothing to correct
QCString result = substitute(p,'/','\\');
- if (result!=p) portable_setenv("PATH",result.data());
+ if (result!=p) Portable::setenv("PATH",result.data());
#endif
}
-void portable_unlink(const char *fileName)
+void Portable::unlink(const char *fileName)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
_unlink(fileName);
#else
- unlink(fileName);
+ ::unlink(fileName);
#endif
}
+void Portable::setShortDir(void)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ long length = 0;
+ TCHAR* buffer = NULL;
+ // First obtain the size needed by passing NULL and 0.
+ length = GetShortPathName(QDir::currentDirPath().data(), NULL, 0);
+ // Dynamically allocate the correct size
+ // (terminating null char was included in length)
+ buffer = new TCHAR[length];
+ // Now simply call again using same (long) path.
+ length = GetShortPathName(QDir::currentDirPath().data(), buffer, length);
+ // Set the correct directory (short name)
+ QDir::setCurrent(buffer);
+ delete [] buffer;
+#endif
+}
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+static const char * portable_memmem (const char *haystack, size_t haystack_len,
+ const char *needle, size_t needle_len)
+{
+ const char *const last_possible = haystack + haystack_len - needle_len;
+
+ if (needle_len == 0)
+ // The first occurrence of the empty string should to occur at the beginning of the string.
+ {
+ return haystack;
+ }
+
+ // Sanity check
+ if (haystack_len < needle_len)
+ {
+ return 0;
+ }
+
+ for (const char *begin = haystack; begin <= last_possible; ++begin)
+ {
+ if (begin[0] == needle[0] && !memcmp(&begin[1], needle + 1, needle_len - 1))
+ {
+ return begin;
+ }
+ }
+
+ return 0;
+}
+
+const char *Portable::strnstr(const char *haystack, const char *needle, size_t haystack_len)
+{
+ size_t needle_len = strnlen(needle, haystack_len);
+ if (needle_len < haystack_len || !needle[needle_len])
+ {
+ const char *x = portable_memmem(haystack, haystack_len, needle, needle_len);
+ if (x && !memchr(haystack, 0, x - haystack))
+ {
+ return x;
+ }
+ }
+ return 0;
+}
diff --git a/src/portable.h b/src/portable.h
index 83f90ef..771108e 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -1,9 +1,11 @@
#ifndef PORTABLE_H
#define PORTABLE_H
-#include <sys/types.h>
#include <stdio.h>
-#include <qglobal.h>
+#include <sys/types.h>
+
+
+
#if defined(_WIN32)
typedef __int64 portable_off_t;
@@ -15,28 +17,34 @@ typedef off_t portable_off_t;
* @brief Portable versions of functions that are platform dependent.
*/
-int portable_system(const char *command,const char *args,bool commandHasConsole=TRUE);
-uint portable_pid();
-const char * portable_getenv(const char *variable);
-void portable_setenv(const char *variable,const char *value);
-void portable_unsetenv(const char *variable);
-portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence);
-portable_off_t portable_ftell(FILE *f);
-FILE * portable_fopen(const char *fileName,const char *mode);
-void portable_unlink(const char *fileName);
-char portable_pathSeparator();
-char portable_pathListSeparator();
-const char * portable_ghostScriptCommand();
-const char * portable_commandExtension();
-bool portable_fileSystemIsCaseSensitive();
-FILE * portable_popen(const char *name,const char *type);
-int portable_pclose(FILE *stream);
-void portable_sysTimerStart();
-void portable_sysTimerStop();
-double portable_getSysElapsedTime();
-void portable_sleep(int ms);
-bool portable_isAbsolutePath(const char *fileName);
-void portable_correct_path(void);
+namespace Portable
+{
+ int system(const char *command,const char *args,bool commandHasConsole=true);
+ unsigned int pid(void);
+ const char * getenv(const char *variable);
+ void setenv(const char *variable,const char *value);
+ void unsetenv(const char *variable);
+ portable_off_t fseek(FILE *f,portable_off_t offset, int whence);
+ portable_off_t ftell(FILE *f);
+ FILE * fopen(const char *fileName,const char *mode);
+ void unlink(const char *fileName);
+ char pathSeparator(void);
+ char pathListSeparator(void);
+ const char * ghostScriptCommand(void);
+ const char * commandExtension(void);
+ bool fileSystemIsCaseSensitive();
+ FILE * popen(const char *name,const char *type);
+ int pclose(FILE *stream);
+ void sysTimerStart(void);
+ void sysTimerStop(void);
+ double getSysElapsedTime(void);
+ void sleep(int ms);
+ bool isAbsolutePath(const char *fileName);
+ void correct_path(void);
+ void setShortDir(void);
+ const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
+}
+
extern "C" {
void * portable_iconv_open(const char* tocode, const char* fromcode);
diff --git a/src/pre.l b/src/pre.l
index 0aa54b9..3a627b5 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -379,6 +379,7 @@ struct preYY_state
bool ccomment;
QCString delimiter;
QDict<void> allIncludes;
+ QDict<void> expansionDict;
DefineManager defineManager;
ConstExpressionParser constExpParser;
};
@@ -1825,7 +1826,7 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
//printf("** findFile(%s,%d) state->yyFileName=%s\n",fileName,localInclude,state->yyFileName.data());
- if (portable_isAbsolutePath(fileName))
+ if (Portable::isAbsolutePath(fileName))
{
FileState *fs = checkAndOpenFile(yyscanner,fileName,alreadyIncluded);
if (fs)
@@ -1933,7 +1934,7 @@ static QCString extractTrailingComment(const char *s)
static int getNextChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos);
static int getCurrentChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint pos);
static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos,char c);
-static void expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos);
+static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos,int level);
static QCString stringize(const QCString &s)
{
@@ -2068,10 +2069,10 @@ static inline void addTillEndOfString(yyscan_t yyscanner,const QCString &expr,QC
* The replacement string will be returned in \a result and the
* length of the (unexpanded) argument list is stored in \a len.
*/
-static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result)
+static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),state->level);
+ //printf(">replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s') level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),state->level);
uint j=pos;
len=0;
result.resize(0);
@@ -2083,7 +2084,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
if (cc!='(')
{
- unputChar(yyscanner,expr,rest,j,' ');
+ unputChar(yyscanner,expr,rest,j,cc);
return FALSE;
}
getNextChar(yyscanner,expr,rest,j); // eat the '(' character
@@ -2225,7 +2226,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
// substitution of all formal arguments
QCString resExpr;
const QCString d=def->definition.stripWhiteSpace();
- //printf("Macro definition: %s\n",d.data());
+ //printf("Macro definition: '%s'\n",d.data());
bool inString=FALSE;
while (k<d.length())
{
@@ -2269,7 +2270,10 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
//printf("substArg='%s'\n",substArg.data());
// only if no ## operator is before or after the argument
// marker we do macro expansion.
- if (!hash) expandExpression(yyscanner,substArg,0,0);
+ if (!hash)
+ {
+ expandExpression(yyscanner,substArg,0,0,level+1);
+ }
if (inString)
{
//printf("'%s'=stringize('%s')\n",stringize(*subst).data(),subst->data());
@@ -2311,10 +2315,10 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
len=j-pos;
result=resExpr;
- //printf("result after substitution '%s' expr='%s'\n",
- // result.data(),expr.mid(pos,len).data());
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=TRUE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->level);
return TRUE;
}
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=FALSE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->level);
return FALSE;
}
@@ -2380,13 +2384,25 @@ static int getNextId(const QCString &expr,int p,int *l)
/*! performs recursive macro expansion on the string \a expr
* starting at position \a pos.
* May read additional characters from the input while re-scanning!
- * If \a expandAll is \c TRUE then all macros in the expression are
- * expanded, otherwise only the first is expanded.
*/
-static void expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos)
+static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0);
+ //printf(">expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : "", pos, level);
+ if (expr.isEmpty())
+ {
+ //printf("<expandExpression: empty\n");
+ return TRUE;
+ }
+ if (state->expansionDict.find(expr)!=0) // check for recursive expansions
+ {
+ //printf("<expandExpression: already expanded expr='%s'\n",expr.data());
+ return FALSE;
+ }
+ else
+ {
+ state->expansionDict.insert(expr,(void*)0x8);
+ }
QCString macroName;
QCString expMacro;
bool definedTest=FALSE;
@@ -2395,7 +2411,7 @@ static void expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
{
bool replaced=FALSE;
macroName=expr.mid(p,l);
- //printf("macroName=%s\n",macroName.data());
+ //printf(" p=%d macroName=%s\n",p,macroName.data());
if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
{
if (state->expandedDict->find(macroName)==0) // expand macro
@@ -2432,29 +2448,42 @@ static void expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
}
else if (def && def->nargs>=0) // function macro
{
- replaced=replaceFunctionMacro(yyscanner,expr,rest,p+l,len,def,expMacro);
+ //printf(" >>>> call replaceFunctionMacro\n");
+ replaced=replaceFunctionMacro(yyscanner,expr,rest,p+l,len,def,expMacro,level);
+ //printf(" <<<< call replaceFunctionMacro: replaced=%d\n",replaced);
len+=l;
}
+ //printf(" macroName='%s' expMacro='%s' replaced=%d\n",macroName.data(),expMacro.data(),replaced);
if (replaced) // expand the macro and rescan the expression
{
- //printf("replacing '%s'->'%s'\n",expr.mid(p,len).data(),expMacro.data());
+ //printf(" replacing '%s'->'%s'\n",expr.mid(p,len).data(),expMacro.data());
QCString resultExpr=expMacro;
QCString restExpr=expr.right(expr.length()-len-p);
processConcatOperators(resultExpr);
+ //printf(" macroName=%s restExpr='%s' def->nonRecursive=%d\n",macroName.data(),restExpr.data(),def->nonRecursive);
+ bool expanded=false;
if (def && !def->nonRecursive)
{
state->expandedDict->insert(macroName,def);
- expandExpression(yyscanner,resultExpr,&restExpr,0);
+ expanded = expandExpression(yyscanner,resultExpr,&restExpr,0,level+1);
state->expandedDict->remove(macroName);
}
- expr=expr.left(p)+resultExpr+restExpr;
- i=p;
- //printf("new expression: %s\n",expr.data());
+ if (expanded)
+ {
+ expr=expr.left(p)+resultExpr+restExpr;
+ //printf(" new expression: '%s' old i=%d new i=%d\n",expr.data(),i,p);
+ i=p;
+ }
+ else
+ {
+ expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
+ i=p+l+2;
+ }
}
else // move to the next macro name
{
- //printf("moving to the next macro old=%d new=%d\n",i,p+l);
+ //printf(" moving to the next macro old i=%d new i=%d\n",i,p+l);
i=p+l;
}
}
@@ -2472,6 +2501,8 @@ static void expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
i=p+l;
}
}
+ //printf("<expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : 0, pos,level);
+ return TRUE;
}
/*! @brief Process string or character literal.
@@ -2700,7 +2731,8 @@ static bool computeExpression(yyscan_t yyscanner,const QCString &expr)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
QCString e=expr;
- expandExpression(yyscanner,e,0,0);
+ state->expansionDict.clear();
+ expandExpression(yyscanner,e,0,0,0);
//printf("after expansion '%s'\n",e.data());
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
@@ -2714,8 +2746,10 @@ static bool computeExpression(yyscan_t yyscanner,const QCString &expr)
static QCString expandMacro(yyscan_t yyscanner,const QCString &name)
{
+ YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
QCString n=name;
- expandExpression(yyscanner,n,0,0);
+ state->expansionDict.clear();
+ expandExpression(yyscanner,n,0,0,0);
n=removeMarkers(n);
//printf("expandMacro '%s'->'%s'\n",name.data(),n.data());
return n;
@@ -2750,7 +2784,7 @@ static void addDefine(yyscan_t yyscanner)
// conditional section (cond command) that is disabled.
if (!Doxygen::gatherDefines) return;
- //printf("addDefine %s %s\n",state->defName.data(),state->defArgsStr.data());
+ //printf("addDefine '%s' '%s'\n",state->defName.data(),state->defArgsStr.data());
//ArgumentList *al = new ArgumentList;
//stringToArgumentList(state->defArgsStr,al);
MemberDef *md=createMemberDef(
@@ -2761,7 +2795,7 @@ static void addDefine(yyscan_t yyscanner)
{
ArgumentList argList;
//printf("addDefine() state->defName='%s' state->defArgsStr='%s'\n",state->defName.data(),state->defArgsStr.data());
- stringToArgumentList(state->defArgsStr,argList);
+ stringToArgumentList(SrcLangExt_Cpp, state->defArgsStr,argList);
md->setArgumentList(argList);
}
//printf("Setting initializer for '%s' to '%s'\n",state->defName.data(),state->defText.data());
@@ -2780,7 +2814,15 @@ static void addDefine(yyscan_t yyscanner)
while ((c=*p++) && (c==' ' || c=='\t')) k++;
state->defLitText=state->defLitText.mid(l+1,k-l-1)+state->defLitText.stripWhiteSpace();
}
- md->setInitializer(state->defLitText.stripWhiteSpace());
+ QCString defLitTextStripped = state->defLitText.stripWhiteSpace();
+ if (defLitTextStripped.contains('\n')>=1)
+ {
+ md->setInitializer(state->defLitText);
+ }
+ else
+ {
+ md->setInitializer(defLitTextStripped);
+ }
//printf("pre.l: md->setFileDef(%p)\n",state->inputFileDef);
md->setFileDef(state->inputFileDef);
@@ -3180,6 +3222,11 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
yyscan_t yyscanner = p->yyscanner;
YY_EXTRA_TYPE state = preYYget_extra(p->yyscanner);
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+
+#ifdef FLEX_DEBUG
+ preYYset_debug(1,yyscanner);
+#endif
+
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
uint orgOffset=output.curPos();
//printf("##########################\n%s\n####################\n",
@@ -3220,7 +3267,10 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
int i_cbrace=ds.find(')');
bool nonRecursive = i_equals>0 && ds.at(i_equals-1)==':';
- if (i_obrace==0) continue; // no define name
+ if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && ds.at(i_equals-1)==':'))
+ {
+ continue; // no define name
+ }
if (i_obrace<i_equals && i_cbrace<i_equals &&
i_obrace!=-1 && i_cbrace!=-1 &&
@@ -3282,10 +3332,11 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
def->fileDef = state->yyFileDef;
def->fileName = fileName;
state->defineManager.addDefine(state->yyFileName,def);
+
+ //printf("#define '%s' '%s' #nargs=%d\n",
+ // def->name.data(),def->definition.data(),def->nargs);
}
- //printf("#define '%s' '%s' #nargs=%d\n",
- // def->name.data(),def->definition.data(),def->nargs);
}
else if ((i_obrace==-1 || i_obrace>i_equals) &&
(i_cbrace==-1 || i_cbrace>i_equals) &&
@@ -3399,11 +3450,5 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
-// int preYYwrap() { return 1 ; }
- void preYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
#include "pre.l.h"
diff --git a/src/pycode.h b/src/pycode.h
index de0a8a9..e3a01b4 100644
--- a/src/pycode.h
+++ b/src/pycode.h
@@ -25,7 +25,7 @@
#ifndef PYCODE_H
#define PYCODE_H
-#include "types.h"
+#include "parserintf.h"
class CodeOutputInterface;
class FileDef;
@@ -33,11 +33,26 @@ class MemberDef;
class QCString;
class Definition;
-extern void parsePythonCode(CodeOutputInterface &,const char *,const QCString &,
- bool ,const char *,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectXRefs);
-extern void resetPythonCodeParserState();
+class PythonCodeParser : public CodeParserInterface
+{
+ public:
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt lang,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXrefs=TRUE
+ );
+ void resetCodeParserState();
+};
+
#endif
diff --git a/src/pycode.l b/src/pycode.l
index 4ff4fc1..f7e255f 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -1638,13 +1638,33 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
return;
}
+//----------------------------------------------------------------------------
+
+void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt /*lang*/,
+ bool isExampleBlock,
+ const char *exampleName,
+ FileDef *fileDef,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool showLineNumbers,
+ const Definition *searchCtx,
+ bool collectXRefs
+ )
+{
+ ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs);
+}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void pycodeYYdummy() { yy_flex_realloc(0,0); }
+void PythonCodeParser::resetCodeParserState()
+{
+ ::resetPythonCodeParserState();
}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
-#endif
+
#include "pycode.l.h"
diff --git a/src/pyscanner.h b/src/pyscanner.h
index 2faffdc..6cfadf6 100644
--- a/src/pyscanner.h
+++ b/src/pyscanner.h
@@ -31,34 +31,17 @@
*
* This is the Python language parser for doxygen.
*/
-class PythonLanguageScanner : public ParserInterface
+class PythonOutlineParser : public OutlineParserInterface
{
public:
- virtual ~PythonLanguageScanner() {}
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char * fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &extension) const;
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXrefs=TRUE
- );
- void resetCodeParserState();
void parsePrototype(const char *text);
};
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 63f11e3..efdc943 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -65,17 +65,17 @@
*/
-static ParserInterface *g_thisParser;
+static OutlineParserInterface *g_thisParser;
static const char * inputString;
static int inputPosition;
static QFile inputFile;
static Protection protection;
-static Entry* current_root = 0 ;
-static std::unique_ptr<Entry> current;
-static Entry* previous = 0 ;
-static Entry* bodyEntry = 0 ;
+static std::shared_ptr<Entry> current_root;
+static std::shared_ptr<Entry> current;
+static std::shared_ptr<Entry> previous;
+static std::shared_ptr<Entry> bodyEntry;
static int yyLineNr = 1 ;
static QCString yyFileName;
static MethodTypes mtype;
@@ -151,7 +151,7 @@ static void initEntry()
static void newEntry()
{
- previous = current.get();
+ previous = current;
current_root->moveToSubEntryAndRefresh(current);
initEntry();
}
@@ -292,7 +292,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
QCString processedDoc = preprocessCommentBlock(doc,yyFileName,lineNr);
while (parseCommentBlock(
g_thisParser,
- (docBlockInBody && previous) ? previous : current.get(),
+ (docBlockInBody && previous) ? previous.get() : current.get(),
processedDoc, // text
yyFileName, // file
lineNr,
@@ -913,7 +913,7 @@ STARTDOCSYMS "##"
}
{B}":"{B} { // function without arguments
g_specialBlock = TRUE; // expecting a docstring
- bodyEntry = current.get();
+ bodyEntry = current;
BEGIN(FunctionBody);
}
@@ -1300,7 +1300,7 @@ STARTDOCSYMS "##"
current->program+=yytext;
//current->startLine = yyLineNr;
g_curIndent=computeIndent(yytext);
- bodyEntry = current.get();
+ bodyEntry = current;
DBG_CTX((stderr,"setting indent %d\n",g_curIndent));
//printf("current->program=[%s]\n",current->program.data());
//g_hideClassDocs = TRUE;
@@ -1706,12 +1706,12 @@ STARTDOCSYMS "##"
//----------------------------------------------------------------------------
-static void parseCompounds(Entry *rt)
+static void parseCompounds(std::shared_ptr<Entry> rt)
{
//printf("parseCompounds(%s)\n",rt->name.data());
for (int i=0; i<rt->children().size(); ++i)
{
- Entry *ce = rt->children()[i].get();
+ std::shared_ptr<Entry> ce = rt->children()[i];
if (!ce->program.isEmpty())
{
//printf("-- %s ---------\n%s\n---------------\n",
@@ -1727,14 +1727,14 @@ static void parseCompounds(Entry *rt)
}
else if (ce->parent())
{
- current_root = ce->parent();
+ current_root = rt;
//printf("Searching for member variables in %s parent=%s\n",
// ce->name.data(),ce->parent->name.data());
BEGIN( SearchMemVars );
}
yyFileName = ce->fileName;
yyLineNr = ce->bodyLine ;
- current = std::make_unique<Entry>();
+ current = std::make_shared<Entry>();
initEntry();
QCString name = ce->name;
@@ -1754,7 +1754,7 @@ static void parseCompounds(Entry *rt)
//----------------------------------------------------------------------------
-static void parseMain(const char *fileName,const char *fileBuf,const std::unique_ptr<Entry> &rt)
+static void parseMain(const char *fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
{
initParser();
@@ -1765,7 +1765,7 @@ static void parseMain(const char *fileName,const char *fileBuf,const std::unique
mtype = Method;
gstat = FALSE;
virt = Normal;
- current_root = rt.get();
+ current_root = rt;
g_specialBlock = FALSE;
@@ -1789,7 +1789,7 @@ static void parseMain(const char *fileName,const char *fileBuf,const std::unique
g_moduleScope+=baseName;
}
- current = std::make_unique<Entry>();
+ current = std::make_shared<Entry>();
initEntry();
current->name = g_moduleScope;
current->section = Entry::NAMESPACE_SEC;
@@ -1798,7 +1798,7 @@ static void parseMain(const char *fileName,const char *fileBuf,const std::unique
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
- current_root = current.get();
+ current_root = current;
rt->moveToSubEntryAndRefresh(current);
@@ -1886,9 +1886,9 @@ void pyscanFreeScanner()
//----------------------------------------------------------------------------
-void PythonLanguageScanner::parseInput(const char *fileName,
+void PythonOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
@@ -1901,50 +1901,17 @@ void PythonLanguageScanner::parseInput(const char *fileName,
// printAST(global_root);
}
-bool PythonLanguageScanner::needsPreprocessing(const QCString &) const
+bool PythonOutlineParser::needsPreprocessing(const QCString &) const
{
return FALSE;
}
-void PythonLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt /*lang*/,
- bool isExampleBlock,
- const char *exampleName,
- FileDef *fileDef,
- int startLine,
- int endLine,
- bool inlineFragment,
- const MemberDef *memberDef,
- bool showLineNumbers,
- const Definition *searchCtx,
- bool collectXRefs
- )
-{
- ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs);
-}
-
-void PythonLanguageScanner::parsePrototype(const char *text)
+void PythonOutlineParser::parsePrototype(const char *text)
{
::parsePrototype(text);
}
-void PythonLanguageScanner::resetCodeParserState()
-{
- ::resetPythonCodeParserState();
-}
-
-//----------------------------------------------------------------------------
-
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void pyscannerYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
#include "pyscanner.l.h"
diff --git a/src/qhp.cpp b/src/qhp.cpp
index 6260d09..50f43ff 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -168,8 +168,7 @@ void Qhp::finalize()
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
- err("Could not open file %s for writing\n", fileName.data());
- exit(1);
+ term("Could not open file %s for writing\n", fileName.data());
}
m_doc.dumpTo(file);
}
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 43ac362..5a8e49d 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -305,8 +305,8 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
- Doxygen::parserManager->getParser(lang)
- ->parseCode(m_ci,s->context(),s->text(),langExt,
+ Doxygen::parserManager->getCodeParser(lang)
+ .parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
//m_t << "\\par" << endl;
m_t << "}" << endl;
@@ -432,8 +432,8 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << rtf_Style_Reset << getStyle("CodeExample");
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -454,8 +454,8 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
inc->exampleFile(),
0, // fileDef
@@ -485,8 +485,8 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl;
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -502,8 +502,8 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl;
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -560,8 +560,8 @@ void RTFDocVisitor::visit(DocIncOperator *op)
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(m_ci,op->context(),op->text(),langExt,
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(m_ci,op->context(),op->text(),langExt,
op->isExample(),op->exampleFile(),
fd, // fileDef
op->line(), // startLine
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 92740f4..efc0f63 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -175,8 +175,7 @@ void RTFGenerator::init()
QDir d(dir);
if (!d.exists() && !d.mkdir(dir))
{
- err("Could not create output directory %s\n",dir.data());
- exit(1);
+ term("Could not create output directory %s\n",dir.data());
}
rtf_Style.setAutoDelete(TRUE);
diff --git a/src/scanner.h b/src/scanner.h
index 65206be..70df660 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -26,37 +26,24 @@
* supports C++ and various languages that are closely related to C++,
* such as C, C#, Objective-C, Java, PHP, and IDL.
*/
-class CLanguageScanner : public ParserInterface
+class COutlineParser : public OutlineParserInterface
{
public:
- virtual ~CLanguageScanner() {}
+ COutlineParser();
+ virtual ~COutlineParser();
void startTranslationUnit(const char *fileName);
void finishTranslationUnit();
void parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &extension) const;
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- );
- void resetCodeParserState();
void parsePrototype(const char *text);
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
};
-void scanFreeScanner();
#endif
diff --git a/src/scanner.l b/src/scanner.l
index abc0c3b..6ad0860 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -16,6 +16,8 @@
*/
%option never-interactive
%option prefix="scannerYY"
+%option reentrant
+%option extra-type="struct scannerYY_state *"
%{
@@ -54,492 +56,170 @@
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-/* -----------------------------------------------------------------
- *
- * statics
- */
-static ParserInterface *g_thisParser;
-static const char * inputString;
-static int inputPosition;
-static QFile inputFile;
-static int lastContext;
-static int lastCContext;
-static int lastDocContext;
-static int lastCPPContext;
-static int lastSkipSharpContext;
-static int lastSkipRoundContext;
-static int lastStringContext;
-static int lastCurlyContext;
-static int lastRoundContext;
-static int lastSquareContext;
-static int lastInitializerContext;
-static int lastClassTemplSpecContext;
-static int lastPreLineCtrlContext;
-static int lastSkipVerbStringContext;
-static int lastCommentInArgContext;
-static int lastRawStringContext;
-static int lastCSConstraint;
-static int lastHereDocContext;
-static int lastDefineContext;
-static int lastAlignAsContext;
-static int lastC11AttributeContext;
-static int lastModifierContext;
-static Protection protection;
-static Protection baseProt;
-static int sharpCount = 0 ;
-static int roundCount = 0 ;
-static int curlyCount = 0 ;
-static int squareCount = 0 ;
-static int padCount = 0 ;
-static std::unique_ptr<Entry> current;
-static Entry* current_root = 0 ;
-static Entry* global_root = 0 ;
-static Entry* previous = 0 ;
-static std::unique_ptr<Entry> tempEntry;
-static Entry* firstTypedefEntry = 0 ;
-static Entry* memspecEntry = 0 ;
-static int yyLineNr = 1 ;
-static int yyBegLineNr = yyLineNr ;
-static int yyColNr = 1 ;
-static int yyBegColNr = yyColNr ;
-static int anonCount = 0 ;
-static int anonNSCount = 0 ;
-static QCString yyFileName;
-static MethodTypes mtype;
-static bool gstat;
-static bool removeSlashes;
-static Specifier virt;
-static Specifier baseVirt;
-static QCString msType,msName,msArgs;
-static bool isTypedef;
-static int tmpDocType;
-static QCString sectionLabel;
-static QCString sectionTitle;
-static QCString funcPtrType;
-static QCString templateStr;
-static QCString aliasName;
-static QCString baseName;
-static QCString* specName;
-static QCString formulaText;
-static bool useOverrideCommands = FALSE;
-
-static SrcLangExt language;
-static bool insideIDL = FALSE; //!< processing IDL code?
-static bool insideJava = FALSE; //!< processing Java code?
-static bool insideCS = FALSE; //!< processing C# code?
-static bool insideD = FALSE; //!< processing D code?
-static bool insidePHP = FALSE; //!< processing PHP code?
-static bool insideObjC = FALSE; //!< processing Objective C code?
-static bool insideCli = FALSE; //!< processing C++/CLI code?
-static bool insideJS = FALSE; //!< processing JavaScript code?
-static bool insideSlice = FALSE; //!< processing Slice code?
-static bool insideCpp = TRUE; //!< processing C/C++ code
-
-static bool sliceOpt = FALSE;
-
-static bool insideCppQuote = FALSE;
-static bool insideProtocolList = FALSE;
-
-static int argRoundCount;
-static int argSharpCount;
-static int currentArgumentContext;
-static int lastCopyArgStringContext;
-static int lastCopyArgContext;
-static QCString *copyArgString;
-static QCString fullArgString;
-static QCString dummyRawString;
-
-static ArgumentList *currentArgumentList;
-static char lastCopyArgChar;
-
-static QCString *pCopyQuotedString;
-static QCString *pCopyRoundString;
-static QCString *pCopyCurlyString;
-static QCString *pCopyRawString;
-
-static QGString *pCopyCurlyGString;
-static QGString *pCopyRoundGString;
-static QGString *pCopySquareGString;
-static QGString *pCopyQuotedGString;
-static QGString *pCopyHereDocGString;
-static QGString *pCopyRawGString;
-static QGString *pSkipVerbString;
-static QStack<Grouping> autoGroupStack;
-
-static bool insideFormula;
-static bool insideTryBlock=FALSE;
-static bool insideCode;
-static bool needsSemi;
-
-//static int depthIf;
-static int initBracketCount;
-
-static QCString oldStyleArgType;
-static QCString docBackup;
-static QCString briefBackup;
-
-static int docBlockContext;
-static QGString docBlock;
-static QCString docBlockName;
-static bool docBlockInBody;
-static bool docBlockAutoBrief;
-static char docBlockTerm;
-
-static QCString idlAttr;
-static QCString idlProp;
-static bool odlProp;
-
-static bool g_lexInit = FALSE;
-static bool externC;
-
-static QCString g_delimiter;
-
-static int g_column;
-
-static int g_fencedSize=0;
-static bool g_nestedComment=0;
-
-static std::vector< std::pair<Entry*,std::unique_ptr<Entry> > > g_outerScopeEntries;
-
-static const char *stateToString(int state);
-//-----------------------------------------------------------------------------
-
-// forward declarations
-//static void handleGroupStartCommand(const char *header);
-//static void handleGroupEndCommand();
-
-//-----------------------------------------------------------------------------
-
-static void initParser()
-{
- g_outerScopeEntries.clear();
- sectionLabel.resize(0);
- sectionTitle.resize(0);
- baseName.resize(0);
- formulaText.resize(0);
- protection = Public;
- baseProt = Public;
- sharpCount = 0;
- roundCount = 0;
- curlyCount = 0;
- mtype = Method;
- gstat = FALSE;
- virt = Normal;
- baseVirt = Normal;
- isTypedef = FALSE;
- autoGroupStack.clear();
- insideTryBlock = FALSE;
- autoGroupStack.setAutoDelete(TRUE);
- insideFormula = FALSE;
- insideCode=FALSE;
- insideCli=Config_getBool(CPP_CLI_SUPPORT);
- sliceOpt=Config_getBool(OPTIMIZE_OUTPUT_SLICE);
- previous = 0;
- firstTypedefEntry = 0;
- memspecEntry =0;
-}
-
-static void initEntry()
-{
- if (insideJava)
- {
- protection = (current_root->spec & (Entry::Interface|Entry::Enum)) ? Public : Package;
- }
- current->protection = protection ;
- current->mtype = mtype;
- current->virt = virt;
- current->stat = gstat;
- current->lang = language;
- //printf("*** initEntry() language=%d\n",language);
- Doxygen::docGroup.initGroupInfo(current.get());
- isTypedef=FALSE;
-}
-
-
-//-----------------------------------------------------------------------------
-
-static void lineCount()
-{
- static int tabSize = Config_getInt(TAB_SIZE);
- const char *p;
- for (p = yytext ; *p ; ++p )
- {
- if (*p=='\n')
- {
- yyLineNr++,g_column=0,yyColNr=1;
- }
- else if (*p=='\t')
- {
- g_column+=tabSize - (g_column%tabSize);
- }
- else
- {
- g_column++,yyColNr++;
- }
- }
- //printf("lineCount()=%d\n",g_column);
-}
-
-static inline int computeIndent(const char *s,int startIndent)
-{
- int col=startIndent;
- static int tabSize=Config_getInt(TAB_SIZE);
- const char *p=s;
- char c;
- while ((c=*p++))
- {
- if (c=='\t') col+=tabSize-(col%tabSize);
- else if (c=='\n') col=0;
- else col++;
- }
- return col;
-}
-
-static void addType()
-{
- uint tl=current->type.length();
- if( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.')
- {
- current->type += ' ' ;
- }
- current->type += current->name ;
- current->name.resize(0) ;
- tl=current->type.length();
- if( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.')
- {
- current->type += ' ' ;
- }
- current->type += current->args ;
- current->args.resize(0) ;
- current->argList.clear();
-}
-
-
-static QCString stripQuotes(const char *s)
-{
- QCString name;
- if (s==0 || *s==0) return name;
- name=s;
- if (name.at(0)=='"' && name.at(name.length()-1)=='"')
- {
- name=name.mid(1,name.length()-2);
- }
- return name;
-}
-
-//-----------------------------------------------------------------
-
-static void startCommentBlock(bool);
-static void handleCommentBlock(const QCString &doc,bool brief);
-static void handleParametersCommentBlocks(ArgumentList &al);
-
-//-----------------------------------------------------------------
-
-static bool nameIsOperator(QCString &name)
-{
- int i=name.find("operator");
- if (i==-1) return FALSE;
- if (i==0 && !isId(name.at(8))) return TRUE; // case operator ::X
- if (i>0 && !isId(name.at(i-1)) && !isId(name.at(i+8))) return TRUE; // case X::operator
- return FALSE; // case TEXToperatorTEXT
-}
-
-//-----------------------------------------------------------------------------
-
-static void setContext()
-{
- QCString fileName = yyFileName;
- language = getLanguageFromFileName(fileName);
- insideIDL = language==SrcLangExt_IDL;
- insideJava = language==SrcLangExt_Java;
- insideCS = language==SrcLangExt_CSharp;
- insideD = language==SrcLangExt_D;
- insidePHP = language==SrcLangExt_PHP;
- insideObjC = language==SrcLangExt_ObjC;
- insideJS = language==SrcLangExt_JS;
- insideSlice = language==SrcLangExt_Slice;
- insideCpp = language==SrcLangExt_Cpp;
- if ( insidePHP )
- {
- useOverrideCommands = TRUE;
- }
- //printf("setContext(%s) insideIDL=%d insideJava=%d insideCS=%d "
- // "insideD=%d insidePHP=%d insideObjC=%d\n",
- // yyFileName.data(),insideIDL,insideJava,insideCS,insideD,insidePHP,insideObjC
- // );
-}
-
-//-----------------------------------------------------------------------------
-
-static void prependScope()
-{
- if (current_root->section & Entry::SCOPE_MASK)
- {
- //printf("--- prependScope %s to %s\n",current_root->name.data(),current->name.data());
- current->name.prepend(current_root->name+"::");
- //printf("prependScope #=%d #current=%d\n",current_root->tArgLists->count(),current->tArgLists->count());
- for (const ArgumentList &srcAl : current_root->tArgLists)
- {
- current->tArgLists.insert(current->tArgLists.begin(),srcAl);
- }
- }
-}
-
-//-----------------------------------------------------------------------------
-
-/*! Returns TRUE iff the current entry could be a K&R style C function */
-static bool checkForKnRstyleC()
-{
- if (((QCString)yyFileName).right(2).lower()!=".c") return FALSE; // must be a C file
- if (current->argList.empty()) return FALSE; // must have arguments
- for (const Argument &a : current->argList)
- {
- // in K&R style argument do not have a type, but doxygen expects a type
- // so it will think the argument has no name
- if (a.type.isEmpty() || !a.name.isEmpty()) return FALSE;
- }
- return TRUE;
-}
-
-//-----------------------------------------------------------------------------
-
-static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
-{
- int si = current->args.length();
- if (oldStyleArgType.isEmpty()) // new argument
- {
- static QRegExp re("([^)]*)");
- int bi1 = current->args.findRev(re);
- int bi2 = bi1!=-1 ? current->args.findRev(re,bi1-1) : -1;
- char c;
- if (bi1!=-1 && bi2!=-1) // found something like "int (*func)(int arg)"
- {
- int s=bi2+1;
- oldStyleArgType = current->args.left(s);
- int i=s;
- while (i<si && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i++;
- oldStyleArgType += current->args.mid(s,i-s);
- s=i;
- while (i<si && isId(current->args.at(i))) i++;
- oldStyleArgName = current->args.mid(s,i-s);
- oldStyleArgType+=current->args.mid(i);
- }
- else if (bi1!=-1) // redundant braces like in "int (*var)"
- {
- int s=bi1;
- oldStyleArgType = current->args.left(s);
- s++;
- int i=s+1;
- while (i<si && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i++;
- oldStyleArgType += current->args.mid(s,i-s);
- s=i;
- while (i<si && isId(current->args.at(i))) i++;
- oldStyleArgName = current->args.mid(s,i-s);
- }
- else // normal "int *var"
- {
- int l=si,i=l-1,j;
- char c;
- // look for start of name in "type *name"
- while (i>=0 && isId(current->args.at(i))) i--;
- j=i+1;
- // look for start of *'s
- while (i>=0 && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i--;
- i++;
- if (i!=l)
- {
- oldStyleArgType=current->args.left(i);
- oldStyleArgPtr=current->args.mid(i,j-i);
- oldStyleArgName=current->args.mid(j).stripWhiteSpace();
- }
- else
- {
- oldStyleArgName=current->args.copy().stripWhiteSpace();
- }
- }
- }
- else // continuation like *arg2 in "int *args,*arg2"
- {
- int l=si,j=0;
- char c;
- while (j<l && ((c=current->args.at(j))=='*' || isspace((uchar)c))) j++;
- if (j>0)
- {
- oldStyleArgPtr=current->args.left(j);
- oldStyleArgName=current->args.mid(j).stripWhiteSpace();
- }
- else
- {
- oldStyleArgName=current->args.copy().stripWhiteSpace();
- }
- }
-}
-
-//-----------------------------------------------------------------------------
-
-/*! Update the argument \a name with additional \a type info. For K&R style
- * function the type is found \e after the argument list, so this routine
- * in needed to fix up.
- */
-static void addKnRArgInfo(const QCString &type,const QCString &name,
- const QCString &brief,const QCString &docs)
+struct scannerYY_state
{
- for (Argument &a : current->argList)
- {
- if (a.type==name)
- {
- a.type=type.stripWhiteSpace();
- if (a.type.left(9)=="register ") // strip keyword
- {
- a.type=a.type.mid(9);
- }
- a.name=name.stripWhiteSpace();
- if (!brief.isEmpty() && !docs.isEmpty())
- {
- a.docs=brief+"\n\n"+docs;
- }
- else if (!brief.isEmpty())
- {
- a.docs=brief;
- }
- else
- {
- a.docs=docs;
- }
- }
- }
-}
+ OutlineParserInterface *thisParser;
+ const char * inputString = 0;
+ int inputPosition = 0;
+ int lastContext = 0;
+ int lastCContext = 0;
+ int lastDocContext = 0;
+ int lastCPPContext = 0;
+ int lastSkipSharpContext = 0;
+ int lastSkipRoundContext = 0;
+ int lastStringContext = 0;
+ int lastCurlyContext = 0;
+ int lastRoundContext = 0;
+ int lastSquareContext = 0;
+ int lastInitializerContext = 0;
+ int lastClassTemplSpecContext = 0;
+ int lastPreLineCtrlContext = 0;
+ int lastSkipVerbStringContext = 0;
+ int lastCommentInArgContext = 0;
+ int lastRawStringContext = 0;
+ int lastCSConstraint = 0;
+ int lastHereDocContext = 0;
+ int lastDefineContext = 0;
+ int lastAlignAsContext = 0;
+ int lastC11AttributeContext = 0;
+ int lastModifierContext = 0;
+ Protection protection = Public;
+ Protection baseProt = Public;
+ int sharpCount = 0 ;
+ int roundCount = 0 ;
+ int curlyCount = 0 ;
+ int squareCount = 0 ;
+ int padCount = 0 ;
+ std::shared_ptr<Entry> current;
+ std::shared_ptr<Entry> current_root;
+ std::shared_ptr<Entry> previous;
+ std::shared_ptr<Entry> tempEntry;
+ std::shared_ptr<Entry> firstTypedefEntry;
+ std::shared_ptr<Entry> memspecEntry;
+ int yyLineNr = 1 ;
+ int yyBegLineNr = 1 ;
+ int yyColNr = 1 ;
+ int yyBegColNr = 1 ;
+ int anonCount = 0 ;
+ int anonNSCount = 0 ;
+ QCString yyFileName;
+ MethodTypes mtype = Method;
+ bool stat = false;
+ Specifier virt = Normal;
+ Specifier baseVirt = Normal;
+ QCString msType;
+ QCString msName;
+ QCString msArgs;
+ bool isTypedef = false;
+ QCString funcPtrType;
+ QCString templateStr;
+ QCString aliasName;
+ QCString baseName;
+ QCString* specName = 0;
+
+ SrcLangExt language = SrcLangExt_Unknown;
+ bool insideIDL = false; //!< processing IDL code?
+ bool insideJava = false; //!< processing Java code?
+ bool insideCS = false; //!< processing C# code?
+ bool insideD = false; //!< processing D code?
+ bool insidePHP = false; //!< processing PHP code?
+ bool insideObjC = false; //!< processing Objective C code?
+ bool insideCli = false; //!< processing C++/CLI code?
+ bool insideJS = false; //!< processing JavaScript code?
+ bool insideSlice = false; //!< processing Slice code?
+ bool insideCpp = true; //!< processing C/C++ code
+
+ bool insideCppQuote = false;
+ bool insideProtocolList = false;
+
+ int argRoundCount = 0;
+ int argSharpCount = 0;
+ int currentArgumentContext = 0;
+ int lastCopyArgStringContext = 0;
+ int lastCopyArgContext = 0;
+ QCString *copyArgString = 0;
+ QCString fullArgString;
+ QCString dummyRawString;
+
+ ArgumentList *currentArgumentList = 0;
+ char lastCopyArgChar = '\0';
+
+ QCString *pCopyQuotedString = 0;
+ QCString *pCopyRoundString = 0;
+ QCString *pCopyCurlyString = 0;
+ QCString *pCopyRawString = 0;
+ QGString *pCopyCurlyGString = 0;
+ QGString *pCopyRoundGString = 0;
+ QGString *pCopySquareGString = 0;
+ QGString *pCopyQuotedGString = 0;
+ QGString *pCopyHereDocGString = 0;
+ QGString *pCopyRawGString = 0;
+ QGString *pSkipVerbString = 0;
+ QStack<Grouping> autoGroupStack;
+
+ bool insideFormula = false;
+ bool insideTryBlock = false;
+ bool insideCode = false;
+ bool needsSemi = false;
+
+ int initBracketCount = 0;
+
+ QCString oldStyleArgType;
+ QCString docBackup;
+ QCString briefBackup;
+
+ int docBlockContext = 0;
+ QGString docBlock;
+ QCString docBlockName;
+ bool docBlockInBody = false;
+ bool docBlockAutoBrief = false;
+ char docBlockTerm = '\0';
+
+ QCString idlAttr;
+ QCString idlProp;
+ bool odlProp = false;
+
+ bool lexInit = false;
+ bool externC = false;
+
+ QCString delimiter;
+
+ int column = 0;
+
+ int fencedSize = 0;
+ bool nestedComment = false;
+ std::vector< std::pair<Entry*,std::shared_ptr<Entry> > > outerScopeEntries;
+};
+static const char *stateToString(int state);
//-----------------------------------------------------------------------------
+// forward declarations for stateless functions
+static inline int computeIndent(const char *s,int startIndent);
+static QCString stripQuotes(const char *s);
+static bool nameIsOperator(QCString &name);
+void fixArgumentListForJavaScript(ArgumentList &al);
+
+// forward declarations for statefull functions
+static void initParser(yyscan_t yyscanner);
+static void initEntry(yyscan_t yyscanner);
+static void lineCount(yyscan_t yyscanner);
+static void addType(yyscan_t yyscanner);
+static void setContext(yyscan_t yyscanner);
+static void prependScope(yyscan_t yyscanner);
+static void startCommentBlock(yyscan_t yyscanner,bool);
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
+static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al);
+static bool checkForKnRstyleC(yyscan_t yyscanner);
+static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &oldStyleArgName);
+static void addKnRArgInfo(yyscan_t yyscanner,const QCString &type,const QCString &name,
+ const QCString &brief,const QCString &docs);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
-void fixArgumentListForJavaScript(ArgumentList &al)
-{
- for (Argument &a : al)
- {
- if (!a.type.isEmpty() && a.name.isEmpty())
- { // a->type is actually the (typeless) parameter name, so move it
- a.name=a.type;
- a.type.resize(0);
- }
- }
-}
/* ----------------------------------------------------------------- */
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-
-static int yyread(char *buf,int max_size)
-{
- int c=0;
- while( c < max_size && inputString[inputPosition] )
- {
- *buf = inputString[inputPosition++] ;
- //printf("%d (%c)\n",*buf,*buf);
- c++; buf++;
- }
- return c;
-}
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
%}
@@ -736,32 +416,32 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%%
<NextSemi>"{" {
- curlyCount=0;
- needsSemi = TRUE;
+ yyextra->curlyCount=0;
+ yyextra->needsSemi = TRUE;
BEGIN(SkipCurlyBlock);
}
<NextSemi>"(" {
- roundCount=0;
+ yyextra->roundCount=0;
BEGIN(SkipRoundBlock);
}
<SkipRoundBlock>"(" {
- ++roundCount;
+ ++yyextra->roundCount;
}
<SkipRoundBlock>")" {
- if (roundCount )
- --roundCount ;
+ if (yyextra->roundCount )
+ --yyextra->roundCount ;
else
BEGIN( NextSemi ) ;
}
<SkipCurlyBlock>"{" {
- ++curlyCount ;
+ ++yyextra->curlyCount ;
}
<SkipCurlyBlock>"}" {
- if( curlyCount )
+ if( yyextra->curlyCount )
{
- --curlyCount ;
+ --yyextra->curlyCount ;
}
- else if (needsSemi)
+ else if (yyextra->needsSemi)
{
BEGIN( NextSemi );
}
@@ -771,15 +451,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<NextSemi>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- lastStringContext=NextSemi;
+ yyextra->lastStringContext=NextSemi;
BEGIN(SkipPHPString);
}
}
-<NextSemi>{CHARLIT} { if (insidePHP) REJECT; }
+<NextSemi>{CHARLIT} { if (yyextra->insidePHP) REJECT; }
<NextSemi>\" {
- lastStringContext=NextSemi;
+ yyextra->lastStringContext=NextSemi;
BEGIN(SkipString);
}
<NextSemi>[;,] {
@@ -791,22 +471,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( FindMembers );
}
<EnumBaseType>[{;,] {
- current->args = current->args.simplifyWhiteSpace();
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
unput(*yytext);
BEGIN( ClassVar );
}
<FindMembers>"<?php" { // PHP code with unsupported extension?
- insidePHP = TRUE;
+ yyextra->insidePHP = TRUE;
}
<FindMembersPHP>"<?"("php"?) { // PHP code start
BEGIN( FindMembers );
}
<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" { // PHP code start
- lineCount() ;
+ lineCount(yyscanner) ;
BEGIN( FindMembers );
}
<FindMembers>"?>"|"</script>" { // PHP code end
- if (insidePHP)
+ if (yyextra->insidePHP)
BEGIN( FindMembersPHP );
else
REJECT;
@@ -814,100 +494,100 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<FindMembersPHP>[^\n<]+ { // Non-PHP code text, ignore
}
<FindMembersPHP>\n { // Non-PHP code text, ignore
- lineCount();
+ lineCount(yyscanner);
}
<FindMembersPHP>. { // Non-PHP code text, ignore
}
-<FindMembers>{PHPKW} { if (insidePHP)
+<FindMembers>{PHPKW} { if (yyextra->insidePHP)
BEGIN( NextSemi );
else
REJECT;
}
<FindMembers>"%{"[^\n]* { // Mozilla XPIDL lang-specific block
- if (!insideIDL)
+ if (!yyextra->insideIDL)
REJECT;
}
<FindMembers>"%}" { // Mozilla XPIDL lang-specific block end
- if (!insideIDL)
+ if (!yyextra->insideIDL)
REJECT;
}
<FindMembers>{B}*("properties"){BN}*":"{BN}* { // IDL or Borland C++ builder property
- current->mtype = mtype = Property;
- current->protection = protection = Public ;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->mtype = yyextra->mtype = Property;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
-<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* { current->mtype = mtype = DCOP;
- current->protection = protection = Public ;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* { yyextra->current->mtype = yyextra->mtype = DCOP;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
-<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* { current->mtype = mtype = Signal;
+<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* { yyextra->current->mtype = yyextra->mtype = Signal;
- current->protection = protection = Public ;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
- current->protection = protection = Public ;
- current->mtype = mtype = Slot;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount();
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->mtype = yyextra->mtype = Slot;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner);
}
<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
- current->protection = protection = Protected ;
- current->mtype = mtype = Slot;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount();
+ yyextra->current->protection = yyextra->protection = Protected ;
+ yyextra->current->mtype = yyextra->mtype = Slot;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner);
}
<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
- current->protection = protection = Private ;
- current->mtype = mtype = Slot;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount();
+ yyextra->current->protection = yyextra->protection = Private ;
+ yyextra->current->mtype = yyextra->mtype = Slot;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner);
}
<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
- current->protection = protection = Public ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"internal"{BN}*":"{BN}* { // for now treat C++/CLI's internal as package...
- if (insideCli)
+ if (yyextra->insideCli)
{
- current->protection = protection = Package ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Package ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
else
{
@@ -915,38 +595,38 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>{B}*"protected"{BN}*":"{BN}* {
- current->protection = protection = Protected ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Protected ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"private"{BN}*":"{BN}* {
- current->protection = protection = Private ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Private ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"event"{BN}+ {
- if (insideCli)
+ if (yyextra->insideCli)
{
// C++/CLI event
- lineCount() ;
- current->mtype = mtype = Event;
- current->bodyLine = yyLineNr;
- curlyCount=0;
+ lineCount(yyscanner) ;
+ yyextra->current->mtype = yyextra->mtype = Event;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->curlyCount=0;
BEGIN( CliPropertyType );
}
- else if (insideCS)
+ else if (yyextra->insideCS)
{
- lineCount() ;
- current->mtype = Event;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner) ;
+ yyextra->current->mtype = Event;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
}
else
{
@@ -954,13 +634,13 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>{B}*"property"{BN}+ {
- if (insideCli)
+ if (yyextra->insideCli)
{
// C++/CLI property
- lineCount() ;
- current->mtype = mtype = Property;
- current->bodyLine = yyLineNr;
- curlyCount=0;
+ lineCount(yyscanner) ;
+ yyextra->current->mtype = yyextra->mtype = Property;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->curlyCount=0;
BEGIN( CliPropertyType );
}
else
@@ -969,16 +649,16 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<CliPropertyType>{ID} {
- addType();
- current->name = yytext;
+ addType(yyscanner);
+ yyextra->current->name = yytext;
}
<CliPropertyType>"[" { // C++/CLI indexed property
- current->args = "[";
+ yyextra->current->args = "[";
BEGIN( CliPropertyIndex );
}
<CliPropertyType>"{" {
- curlyCount=0;
- //printf("event: '%s' '%s'\n",current->type.data(),current->name.data());
+ yyextra->curlyCount=0;
+ //printf("event: '%s' '%s'\n",yyextra->current->type.data(),yyextra->current->name.data());
BEGIN( CSAccessorDecl );
}
<CliPropertyType>";" {
@@ -986,84 +666,84 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( FindMembers );
}
<CliPropertyType>\n {
- lineCount();
+ lineCount(yyscanner);
}
<CliPropertyType>{B}* {
}
<CliPropertyType>. {
- addType();
- current->type += yytext;
+ addType(yyscanner);
+ yyextra->current->type += yytext;
}
<CliPropertyIndex>"]" {
BEGIN( CliPropertyType );
- current->args+=yytext;
+ yyextra->current->args+=yytext;
}
<CliPropertyIndex>. {
- current->args+=yytext;
+ yyextra->current->args+=yytext;
}
/*
<FindMembers>{B}*"property"{BN}+ {
- if (!current->type.isEmpty())
+ if (!yyextra->current->type.isEmpty())
{
REJECT;
}
else
{
- current->mtype = mtype = Property;
- lineCount();
+ yyextra->current->mtype = yyextra->mtype = Property;
+ lineCount(yyscanner);
}
}
*/
<FindMembers>{B}*"@private"{BN}+ {
- current->protection = protection = Private ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Private ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"@protected"{BN}+ {
- current->protection = protection = Protected ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Protected ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>{B}*"@public"{BN}+ {
- current->protection = protection = Public ;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- lineCount() ;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ lineCount(yyscanner) ;
}
<FindMembers>[\-+]{BN}* {
- if (!insideObjC)
+ if (!yyextra->insideObjC)
{
REJECT;
}
else
{
- lineCount();
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- current->section = Entry::FUNCTION_SEC;
- current->protection = protection = Public ;
- language = current->lang = SrcLangExt_ObjC;
- insideObjC = TRUE;
- current->virt = Virtual;
- current->stat=yytext[0]=='+';
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
+ lineCount(yyscanner);
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->section = Entry::FUNCTION_SEC;
+ yyextra->current->protection = yyextra->protection = Public ;
+ yyextra->language = yyextra->current->lang = SrcLangExt_ObjC;
+ yyextra->insideObjC = TRUE;
+ yyextra->current->virt = Virtual;
+ yyextra->current->stat=yytext[0]=='+';
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
BEGIN( ObjCMethod );
}
}
@@ -1071,24 +751,24 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( ObjCReturnType );
}
<ObjCMethod>{ID} { // found method name
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type = "id";
+ yyextra->current->type = "id";
}
- current->name = yytext;
- if (insideCpp || insideObjC)
+ yyextra->current->name = yytext;
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
}
<ObjCMethod>":"{B}* { // start of parameter list
- current->name += ':';
+ yyextra->current->name += ':';
Argument a;
- current->argList.push_back(a);
+ yyextra->current->argList.push_back(a);
BEGIN( ObjCParams );
}
<ObjCReturnType>[^)]* { // TODO: check if nested braches are possible.
- current->type = yytext;
+ yyextra->current->type = yytext;
}
<ObjCReturnType>")" {
BEGIN( ObjCMethod );
@@ -1098,140 +778,140 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
keyw=keyw.left(keyw.length()-1).stripWhiteSpace(); // strip :
if (keyw.isEmpty())
{
- current->name += " :";
+ yyextra->current->name += " :";
}
else
{
- current->name += keyw+":";
+ yyextra->current->name += keyw+":";
}
- if (current->argList.back().type.isEmpty())
+ if (yyextra->current->argList.back().type.isEmpty())
{
- current->argList.back().type="id";
+ yyextra->current->argList.back().type="id";
}
Argument a;
a.attrib=(QCString)"["+keyw+"]";
- current->argList.push_back(a);
+ yyextra->current->argList.push_back(a);
}
<ObjCParams>{ID}{BN}* { // name of parameter
- lineCount();
- current->argList.back().name=QCString(yytext).stripWhiteSpace();
+ lineCount(yyscanner);
+ yyextra->current->argList.back().name=QCString(yytext).stripWhiteSpace();
}
<ObjCParams>","{BN}*"..." { // name of parameter
- lineCount();
+ lineCount(yyscanner);
// do we want the comma as part of the name?
- //current->name += ",";
+ //yyextra->current->name += ",";
Argument a;
a.attrib="[,]";
a.type="...";
- current->argList.push_back(a);
+ yyextra->current->argList.push_back(a);
}
/*
<ObjCParams>":" {
- current->name += ':';
+ yyextra->current->name += ':';
}
*/
<ObjCParams>"(" {
- roundCount=0;
- current->argList.back().type.resize(0);
+ yyextra->roundCount=0;
+ yyextra->current->argList.back().type.resize(0);
BEGIN( ObjCParamType );
}
<ObjCParamType>"(" {
- roundCount++;
- current->argList.back().type+=yytext;
+ yyextra->roundCount++;
+ yyextra->current->argList.back().type+=yytext;
}
<ObjCParamType>")"/{B}* {
- if (roundCount<=0)
+ if (yyextra->roundCount<=0)
{
BEGIN( ObjCParams );
}
else
{
- current->argList.back().type+=yytext;
- roundCount--;
+ yyextra->current->argList.back().type+=yytext;
+ yyextra->roundCount--;
}
}
<ObjCParamType>[^()]* {
- current->argList.back().type+=QCString(yytext).stripWhiteSpace();
+ yyextra->current->argList.back().type+=QCString(yytext).stripWhiteSpace();
}
<ObjCMethod,ObjCParams>";" { // end of method declaration
- if (!current->argList.empty() && current->argList.back().type.isEmpty())
+ if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
{
- current->argList.back().type="id";
+ yyextra->current->argList.back().type="id";
}
- if (current->argList.empty()) // method without parameters
+ if (yyextra->current->argList.empty()) // method without parameters
{
- current->argList.noParameters = TRUE;
+ yyextra->current->argList.noParameters = TRUE;
}
- current->args = argListToString(current->argList);
- //printf("argList=%s\n",current->args.data());
+ yyextra->current->args = argListToString(yyextra->current->argList);
+ //printf("argList=%s\n",yyextra->current->args.data());
unput(';');
BEGIN( Function );
}
<ObjCMethod,ObjCParams>(";"{BN}+)?"{" { // start of a method body
- lineCount();
+ lineCount(yyscanner);
//printf("Type=%s Name=%s args=%s\n",
- // current->type.data(),current->name.data(),argListToString(current->argList).data()
+ // yyextra->current->type.data(),yyextra->current->name.data(),argListToString(yyextra->current->argList).data()
// );
- if (!current->argList.empty() && current->argList.back().type.isEmpty())
+ if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
{
- current->argList.back().type="id";
+ yyextra->current->argList.back().type="id";
}
- if (current->argList.empty()) // method without parameters
+ if (yyextra->current->argList.empty()) // method without parameters
{
- current->argList.noParameters = TRUE;
+ yyextra->current->argList.noParameters = TRUE;
}
- current->args = argListToString(current->argList);
+ yyextra->current->args = argListToString(yyextra->current->argList);
unput('{');
BEGIN( Function );
}
<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
- if (insideSlice)
- {
- lineCount();
- current->bodyLine = yyLineNr;
- current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- current->args.resize(0);
- current->section = Entry::TYPEDEF_SEC ;
- isTypedef = TRUE;
+ if (yyextra->insideSlice)
+ {
+ lineCount(yyscanner);
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->args.resize(0);
+ yyextra->current->section = Entry::TYPEDEF_SEC ;
+ yyextra->isTypedef = TRUE;
BEGIN( SliceSequence );
}
else
REJECT;
}
<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
- if (insideSlice)
- {
- lineCount();
- current->bodyLine = yyLineNr;
- current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- current->args.resize(0);
- current->section = Entry::TYPEDEF_SEC ;
- isTypedef = TRUE;
+ if (yyextra->insideSlice)
+ {
+ lineCount(yyscanner);
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->args.resize(0);
+ yyextra->current->section = Entry::TYPEDEF_SEC ;
+ yyextra->isTypedef = TRUE;
BEGIN( SliceDictionary );
}
else
REJECT;
}
<FindMembers>{BN}{1,80} {
- lineCount();
+ lineCount(yyscanner);
}
<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
- if (insideJava) // Java annotation
+ if (yyextra->insideJava) // Java annotation
{
- lineCount();
- lastSkipRoundContext = YY_START;
- roundCount=0;
+ lineCount(yyscanner);
+ yyextra->lastSkipRoundContext = YY_START;
+ yyextra->roundCount=0;
BEGIN( SkipRound );
}
else if (qstrncmp(yytext,"@property",9)==0) // ObjC 2.0 property
{
- current->mtype = mtype = Property;
- current->spec|=Entry::Readable | Entry::Writable | Entry::Assign;
- current->protection = Public ;
+ yyextra->current->mtype = yyextra->mtype = Property;
+ yyextra->current->spec|=Entry::Readable | Entry::Writable | Entry::Assign;
+ yyextra->current->protection = Public ;
unput('(');
BEGIN( ObjCPropAttr );
}
@@ -1241,54 +921,54 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<ObjCPropAttr>"getter="{ID} {
- current->read = yytext+7;
+ yyextra->current->read = yytext+7;
}
<ObjCPropAttr>"setter="{ID} {
- current->write = yytext+7;
+ yyextra->current->write = yytext+7;
}
<ObjCPropAttr>"readonly" {
- current->spec&=~Entry::Writable;
+ yyextra->current->spec&=~Entry::Writable;
}
<ObjCPropAttr>"readwrite" { // default
}
<ObjCPropAttr>"assign" { // default
}
<ObjCPropAttr>"unsafe_unretained" {
- current->spec&=~Entry::Assign;
- current->spec|=Entry::Unretained;
+ yyextra->current->spec&=~Entry::Assign;
+ yyextra->current->spec|=Entry::Unretained;
}
<ObjCPropAttr>"retain" {
- current->spec&=~Entry::Assign;
- current->spec|=Entry::Retain;
+ yyextra->current->spec&=~Entry::Assign;
+ yyextra->current->spec|=Entry::Retain;
}
<ObjCPropAttr>"copy" {
- current->spec&=~Entry::Assign;
- current->spec|=Entry::Copy;
+ yyextra->current->spec&=~Entry::Assign;
+ yyextra->current->spec|=Entry::Copy;
}
<ObjCPropAttr>"weak" {
- current->spec&=~Entry::Assign;
- current->spec|=Entry::Weak;
+ yyextra->current->spec&=~Entry::Assign;
+ yyextra->current->spec|=Entry::Weak;
}
<ObjCPropAttr>"strong" {
- current->spec&=~Entry::Assign;
- current->spec|=Entry::Strong;
+ yyextra->current->spec&=~Entry::Assign;
+ yyextra->current->spec|=Entry::Strong;
}
<ObjCPropAttr>"nonatomic" {
- current->spec|=Entry::NonAtomic;
+ yyextra->current->spec|=Entry::NonAtomic;
}
<ObjCPropAttr>")" {
BEGIN(FindMembers);
}
<FindMembers>"@"{ID} {
- if (insideJava) // Java annotation
+ if (yyextra->insideJava) // Java annotation
{
// skip annotation
}
else if (qstrcmp(yytext,"@property")==0) // ObjC 2.0 property
{
- current->mtype = mtype = Property;
- current->spec|=Entry::Writable | Entry::Readable;
- current->protection = Public ;
+ yyextra->current->mtype = yyextra->mtype = Property;
+ yyextra->current->spec|=Entry::Writable | Entry::Readable;
+ yyextra->current->protection = Public ;
}
else if (qstrcmp(yytext,"@synthesize")==0)
{
@@ -1307,58 +987,58 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FindMembers);
}
<PackageName>{ID}(("."|"\\"){ID})* {
- isTypedef=FALSE;
- //printf("Found namespace %s lang=%d\n",yytext,current->lang);
- current->name = yytext;
- current->name = substitute(current->name,".","::");
- current->name = substitute(current->name,"\\","::");
- current->section = Entry::NAMESPACE_SEC;
- current->type = "namespace" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount();
+ yyextra->isTypedef=FALSE;
+ //printf("Found namespace %s lang=%d\n",yytext,yyextra->current->lang);
+ yyextra->current->name = yytext;
+ yyextra->current->name = substitute(yyextra->current->name,".","::");
+ yyextra->current->name = substitute(yyextra->current->name,"\\","::");
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "namespace" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner);
}
<PackageName>";" {
- Entry *tmp = current.get();
- current_root->moveToSubEntryAndRefresh(current);
- current_root = tmp;
- initEntry();
+ std::shared_ptr<Entry> tmp = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ yyextra->current_root = tmp;
+ initEntry(yyscanner);
BEGIN(FindMembers);
}
<PackageName>"{" {
- curlyCount=0;
+ yyextra->curlyCount=0;
BEGIN( ReadNSBody );
}
<FindMembers>{B}*"initonly"{BN}+ {
- current->type += " initonly ";
- if (insideCli) current->spec |= Entry::Initonly;
- lineCount();
+ yyextra->current->type += " initonly ";
+ if (yyextra->insideCli) yyextra->current->spec |= Entry::Initonly;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"static"{BN}+ { current->type += " static ";
- current->stat = TRUE;
- lineCount();
+<FindMembers>{B}*"static"{BN}+ { yyextra->current->type += " static ";
+ yyextra->current->stat = TRUE;
+ lineCount(yyscanner);
}
<FindMembers>{B}*"extern"{BN}+ {
- current->stat = FALSE;
- current->explicitExternal = TRUE;
- lineCount();
+ yyextra->current->stat = FALSE;
+ yyextra->current->explicitExternal = TRUE;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"const"{BN}+ { current->type += " const ";
- if (insideCS) current->stat = TRUE;
- lineCount();
+<FindMembers>{B}*"const"{BN}+ { yyextra->current->type += " const ";
+ if (yyextra->insideCS) yyextra->current->stat = TRUE;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"virtual"{BN}+ { current->type += " virtual ";
- current->virt = Virtual;
- lineCount();
+<FindMembers>{B}*"virtual"{BN}+ { yyextra->current->type += " virtual ";
+ yyextra->current->virt = Virtual;
+ lineCount(yyscanner);
}
<FindMembers>{B}*"constexpr"{BN}+ {
- if (insideCpp)
+ if (yyextra->insideCpp)
{
- current->type += " constexpr ";
- current->spec |= Entry::ConstExpr;
- lineCount();
+ yyextra->current->type += " constexpr ";
+ yyextra->current->spec |= Entry::ConstExpr;
+ lineCount(yyscanner);
}
else
{
@@ -1366,10 +1046,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>{B}*"published"{BN}+ { // UNO IDL published keyword
- if (insideIDL)
+ if (yyextra->insideIDL)
{
- lineCount();
- current->spec |= Entry::Published;
+ lineCount(yyscanner);
+ yyextra->current->spec |= Entry::Published;
}
else
{
@@ -1377,60 +1057,60 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>{B}*"abstract"{BN}+ {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
{
- current->type += " abstract ";
- if (!insideJava)
+ yyextra->current->type += " abstract ";
+ if (!yyextra->insideJava)
{
- current->virt = Pure;
+ yyextra->current->virt = Pure;
}
else
{
- current->spec|=Entry::Abstract;
+ yyextra->current->spec|=Entry::Abstract;
}
}
else
{
- current->spec|=Entry::Abstract;
+ yyextra->current->spec|=Entry::Abstract;
}
- lineCount();
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"inline"{BN}+ { current->spec|=Entry::Inline;
- lineCount();
+<FindMembers>{B}*"inline"{BN}+ { yyextra->current->spec|=Entry::Inline;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"mutable"{BN}+ { current->spec|=Entry::Mutable;
- lineCount();
+<FindMembers>{B}*"mutable"{BN}+ { yyextra->current->spec|=Entry::Mutable;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"explicit"{BN}+ { current->spec|=Entry::Explicit;
- lineCount();
+<FindMembers>{B}*"explicit"{BN}+ { yyextra->current->spec|=Entry::Explicit;
+ lineCount(yyscanner);
}
-<FindMembers>{B}*"local"{BN}+ { current->spec|=Entry::Local;
- lineCount();
+<FindMembers>{B}*"local"{BN}+ { yyextra->current->spec|=Entry::Local;
+ lineCount(yyscanner);
}
<FindMembers>{B}*"@required"{BN}+ { // Objective C 2.0 protocol required section
- current->spec=(current->spec & ~Entry::Optional) | Entry::Required;
- lineCount();
+ yyextra->current->spec=(yyextra->current->spec & ~Entry::Optional) | Entry::Required;
+ lineCount(yyscanner);
}
<FindMembers>{B}*"@optional"{BN}+ { // Objective C 2.0 protocol optional section
- current->spec=(current->spec & ~Entry::Required) | Entry::Optional;
- lineCount();
+ yyextra->current->spec=(yyextra->current->spec & ~Entry::Required) | Entry::Optional;
+ lineCount(yyscanner);
}
/*
<FindMembers>{B}*"import"{BN}+ { // IDL import keyword
BEGIN( NextSemi );
}
*/
-<FindMembers>{B}*"typename"{BN}+ { lineCount(); }
+<FindMembers>{B}*"typename"{BN}+ { lineCount(yyscanner); }
<FindMembers>{B}*"namespace"{BN}*/[^a-z_A-Z0-9] {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "namespace" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount();
- if (insidePHP)
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "namespace" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insidePHP)
{
BEGIN( PackageName );
}
@@ -1440,449 +1120,449 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>{B}*"module"{BN}+ {
- lineCount();
- if (insideIDL || insideSlice)
- {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "module" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insideIDL || yyextra->insideSlice)
+ {
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "module" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
- else if (insideD)
+ else if (yyextra->insideD)
{
- lineCount();
+ lineCount(yyscanner);
BEGIN(PackageName);
}
else
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{B}*"library"{BN}+ {
- lineCount();
- if (insideIDL)
- {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "library" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insideIDL)
+ {
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "library" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
else
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{B}*"constants"{BN}+ { // UNO IDL constant group
- lineCount();
- if (insideIDL)
- {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "constants";
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insideIDL)
+ {
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "constants";
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
else
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{BN}*("service"){BN}+ { // UNO IDL service
- lineCount();
- if (insideIDL)
+ lineCount(yyscanner);
+ if (yyextra->insideIDL)
{
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Service |
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Service |
// preserve UNO IDL [optional] or published
- (current->spec & (Entry::Optional|Entry::Published));
- addType();
- current->type += " service " ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
+ (yyextra->current->spec & (Entry::Optional|Entry::Published));
+ addType(yyscanner);
+ yyextra->current->type += " service " ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
else // TODO is addType right? just copy/pasted
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{BN}*("singleton"){BN}+ { // UNO IDL singleton
- lineCount();
- if (insideIDL)
- {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Singleton |
- (current->spec & Entry::Published); // preserve
- addType();
- current->type += " singleton " ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insideIDL)
+ {
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Singleton |
+ (yyextra->current->spec & Entry::Published); // preserve
+ addType(yyscanner);
+ yyextra->current->type += " singleton " ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
else // TODO is addType right? just copy/pasted
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba/UNO IDL/Java/Slice interface
- lineCount();
- if (insideIDL || insideJava || insideCS || insideD || insidePHP || insideSlice)
+ lineCount(yyscanner);
+ if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
{
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Interface |
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Interface |
// preserve UNO IDL [optional], published, Slice local
- (current->spec & (Entry::Optional|Entry::Published|Entry::Local));
- addType();
- current->type += " interface" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ (yyextra->current->spec & (Entry::Optional|Entry::Published|Entry::Local));
+ addType(yyscanner);
+ yyextra->current->type += " interface" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
else
{
- addType();
- current->name = QCString(yytext).stripWhiteSpace();
+ addType(yyscanner);
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{B}*"@implementation"{BN}+ { // Objective-C class implementation
- lineCount();
- isTypedef=FALSE;
- current->section = Entry::OBJCIMPL_SEC;
- language = current->lang = SrcLangExt_ObjC;
- insideObjC = TRUE;
- current->protection = protection = Public ;
- addType();
- current->type += " implementation" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::OBJCIMPL_SEC;
+ yyextra->language = yyextra->current->lang = SrcLangExt_ObjC;
+ yyextra->insideObjC = TRUE;
+ yyextra->current->protection = yyextra->protection = Public ;
+ addType(yyscanner);
+ yyextra->current->type += " implementation" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
<FindMembers>{B}*"@interface"{BN}+ { // Objective-C class interface, or Java attribute
- lineCount();
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Interface;
- if (!insideJava)
- {
- language = current->lang = SrcLangExt_ObjC;
- insideObjC = TRUE;
- }
- current->protection = protection = Public ;
- addType();
- current->type += " interface" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Interface;
+ if (!yyextra->insideJava)
+ {
+ yyextra->language = yyextra->current->lang = SrcLangExt_ObjC;
+ yyextra->insideObjC = TRUE;
+ }
+ yyextra->current->protection = yyextra->protection = Public ;
+ addType(yyscanner);
+ yyextra->current->type += " interface" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
<FindMembers>{B}*"@protocol"{BN}+ { // Objective-C protocol definition
- lineCount();
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Protocol;
- language = current->lang = SrcLangExt_ObjC;
- insideObjC = TRUE;
- current->protection = protection = Public ;
- addType();
- current->type += " protocol" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ lineCount(yyscanner);
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Protocol;
+ yyextra->language = yyextra->current->lang = SrcLangExt_ObjC;
+ yyextra->insideObjC = TRUE;
+ yyextra->current->protection = yyextra->protection = Public ;
+ addType(yyscanner);
+ yyextra->current->type += " protocol" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( CompoundName );
}
<FindMembers>{B}*"exception"{BN}+ { // Corba IDL/Slice exception
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
// preserve UNO IDL, Slice local
- current->spec = Entry::Exception |
- (current->spec & Entry::Published) |
- (current->spec & Entry::Local);
- addType();
- current->type += " exception" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount();
+ yyextra->current->spec = Entry::Exception |
+ (yyextra->current->spec & Entry::Published) |
+ (yyextra->current->spec & Entry::Local);
+ addType(yyscanner);
+ yyextra->current->type += " exception" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner);
BEGIN( CompoundName );
}
<FindMembers>"@class" | // for Objective C class declarations
<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
QCString decl = yytext;
- isTypedef=decl.find("typedef")!=-1;
+ yyextra->isTypedef=decl.find("typedef")!=-1;
bool isConst=decl.find("const")!=-1;
bool isVolatile=decl.find("volatile")!=-1;
- current->section = Entry::CLASS_SEC;
- addType();
- uint64 spec = current->spec;
- if (insidePHP && current->spec&Entry::Abstract)
+ yyextra->current->section = Entry::CLASS_SEC;
+ addType(yyscanner);
+ uint64 spec = yyextra->current->spec;
+ if (yyextra->insidePHP && yyextra->current->spec&Entry::Abstract)
{
// convert Abstract to AbstractClass
- current->spec=(current->spec&~Entry::Abstract)|Entry::AbstractClass;
+ yyextra->current->spec=(yyextra->current->spec&~Entry::Abstract)|Entry::AbstractClass;
}
- if (insideSlice && spec&Entry::Local)
+ if (yyextra->insideSlice && spec&Entry::Local)
{
- current->spec|=Entry::Local;
+ yyextra->current->spec|=Entry::Local;
}
if (isConst)
{
- current->type += " const";
+ yyextra->current->type += " const";
}
else if (isVolatile)
{
- current->type += " volatile";
+ yyextra->current->type += " volatile";
}
- current->type += " class" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
+ yyextra->current->type += " class" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
if (yytext[0]=='@')
{
- language = current->lang = SrcLangExt_ObjC;
- insideObjC = TRUE;
+ yyextra->language = yyextra->current->lang = SrcLangExt_ObjC;
+ yyextra->insideObjC = TRUE;
}
- lineCount() ;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"value class{" | // C++/CLI extension
<FindMembers>{B}*"value class"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Value;
- addType();
- current->type += " value class" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Value;
+ addType(yyscanner);
+ yyextra->current->type += " value class" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"ref class{" | // C++/CLI extension
<FindMembers>{B}*"ref class"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Ref;
- addType();
- current->type += " ref class" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Ref;
+ addType(yyscanner);
+ yyextra->current->type += " ref class" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"interface class{" | // C++/CLI extension
<FindMembers>{B}*"interface class"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Interface;
- addType();
- current->type += " interface class" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Interface;
+ addType(yyscanner);
+ yyextra->current->type += " interface class" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"coclass"{BN}+ {
- if (insideIDL)
- {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- addType();
- current->type += " coclass" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ if (yyextra->insideIDL)
+ {
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ addType(yyscanner);
+ yyextra->current->type += " coclass" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
BEGIN( CompoundName ) ;
}
else
{
- addType();
- current->name = yytext;
- current->name = current->name.stripWhiteSpace();
- lineCount();
+ addType(yyscanner);
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ lineCount(yyscanner);
}
}
<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
QCString decl = yytext;
- isTypedef=decl.find("typedef")!=-1;
+ yyextra->isTypedef=decl.find("typedef")!=-1;
bool isConst=decl.find("const")!=-1;
bool isVolatile=decl.find("volatile")!=-1;
- uint64 spec = current->spec;
- current->section = Entry::CLASS_SEC ;
+ uint64 spec = yyextra->current->spec;
+ yyextra->current->section = Entry::CLASS_SEC ;
// preserve UNO IDL & Inline attributes, Slice local
- current->spec = Entry::Struct |
- (current->spec & Entry::Published) |
- (current->spec & Entry::Inline) |
- (current->spec & Entry::Local);
- // bug 582676: can be a struct nested in an interface so keep insideObjC state
- //current->objc = insideObjC = FALSE;
- addType();
+ yyextra->current->spec = Entry::Struct |
+ (yyextra->current->spec & Entry::Published) |
+ (yyextra->current->spec & Entry::Inline) |
+ (yyextra->current->spec & Entry::Local);
+ // bug 582676: can be a struct nested in an interface so keep yyextra->insideObjC state
+ //yyextra->current->objc = yyextra->insideObjC = FALSE;
+ addType(yyscanner);
if (isConst)
{
- current->type += " const";
+ yyextra->current->type += " const";
}
else if (isVolatile)
{
- current->type += " volatile";
+ yyextra->current->type += " volatile";
}
- current->type += " struct" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->current->type += " struct" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"value struct{" | // C++/CLI extension
<FindMembers>{B}*"value struct"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Struct | Entry::Value;
- addType();
- current->type += " value struct" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Struct | Entry::Value;
+ addType(yyscanner);
+ yyextra->current->type += " value struct" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"ref struct{" | // C++/CLI extension
<FindMembers>{B}*"ref struct"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Struct | Entry::Ref;
- addType();
- current->type += " ref struct" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Struct | Entry::Ref;
+ addType(yyscanner);
+ yyextra->current->type += " ref struct" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*"interface struct{" | // C++/CLI extension
<FindMembers>{B}*"interface struct"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Struct | Entry::Interface;
- addType();
- current->type += " interface struct";
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Struct | Entry::Interface;
+ addType(yyscanner);
+ yyextra->current->type += " interface struct";
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
QCString decl=yytext;
- isTypedef=decl.find("typedef")!=-1;
+ yyextra->isTypedef=decl.find("typedef")!=-1;
bool isConst=decl.find("const")!=-1;
bool isVolatile=decl.find("volatile")!=-1;
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Union;
- // bug 582676: can be a struct nested in an interface so keep insideObjC state
- //current->objc = insideObjC = FALSE;
- addType();
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Union;
+ // bug 582676: can be a struct nested in an interface so keep yyextra->insideObjC state
+ //yyextra->current->objc = yyextra->insideObjC = FALSE;
+ addType(yyscanner);
if (isConst)
{
- current->type += " const";
+ yyextra->current->type += " const";
}
else if (isVolatile)
{
- current->type += " volatile";
+ yyextra->current->type += " volatile";
}
- current->type += " union" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->current->type += " union" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ { // for IDL: typedef [something] enum
QCString text=yytext;
- isTypedef = text.find("typedef")!=-1;
- bool isStrongEnum = text.find("struct")!=-1 || text.find("class")!=-1 || insideCS;
- if (insideJava)
+ yyextra->isTypedef = text.find("typedef")!=-1;
+ bool isStrongEnum = text.find("struct")!=-1 || text.find("class")!=-1 || yyextra->insideCS;
+ if (yyextra->insideJava)
{
- current->section = Entry::CLASS_SEC;
- current->spec = Entry::Enum;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec = Entry::Enum;
}
else
{
- current->section = Entry::ENUM_SEC ;
+ yyextra->current->section = Entry::ENUM_SEC ;
}
- addType();
- current->type += " enum";
+ addType(yyscanner);
+ yyextra->current->type += " enum";
if (isStrongEnum)
{
- current->spec |= Entry::Strong;
+ yyextra->current->spec |= Entry::Strong;
}
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->bodyLine = yyLineNr;
- lineCount() ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner) ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BN}*/"(" { // A::operator()<int>(int arg)
- lineCount();
- current->name += "()";
+ lineCount(yyscanner);
+ yyextra->current->name += "()";
BEGIN( FindMembers );
}
<Operator>"("{BN}*")"{BN}*/"(" {
- lineCount();
- current->name += yytext ;
- current->name = current->name.simplifyWhiteSpace();
+ lineCount(yyscanner);
+ yyextra->current->name += yytext ;
+ yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
BEGIN( FindMembers ) ;
}
<Operator>";" { // can occur when importing members
@@ -1890,85 +1570,85 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( FindMembers ) ;
}
<Operator>[^(] {
- lineCount();
- current->name += *yytext ;
+ lineCount(yyscanner);
+ yyextra->current->name += *yytext ;
}
<Operator>"<>" { /* skip guided templ specifiers */ }
<Operator>"(" {
- current->name = current->name.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
unput(*yytext);
BEGIN( FindMembers ) ;
}
<FindMembers>("template"|"generic")({BN}*)"<"/[>]? { // generic is a C++/CLI extension
- lineCount();
+ lineCount(yyscanner);
ArgumentList al;
- //current->spec |= (yytext[0]=='g') ? Entry::Generic : Entry::Template;
- current->tArgLists.push_back(al);
- currentArgumentList = &current->tArgLists.back();
- templateStr="<";
- fullArgString = templateStr;
- copyArgString = &templateStr;
- currentArgumentContext = FindMembers;
+ //yyextra->current->spec |= (yytext[0]=='g') ? Entry::Generic : Entry::Template;
+ yyextra->current->tArgLists.push_back(al);
+ yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
+ yyextra->templateStr="<";
+ yyextra->fullArgString = yyextra->templateStr;
+ yyextra->copyArgString = &yyextra->templateStr;
+ yyextra->currentArgumentContext = FindMembers;
BEGIN( ReadTempArgs );
}
<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" { // namespace alias
- lineCount();
+ lineCount(yyscanner);
BEGIN( NSAliasName );
}
<NSAliasName>{ID} {
- aliasName = yytext;
+ yyextra->aliasName = yytext;
BEGIN( NSAliasArg );
}
<NSAliasArg>({ID}"::")*{ID} {
- //printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext);
- //if (current_root->name.isEmpty())
+ //printf("Inserting namespace alias %s::%s->%s\n",yyextra->current_root->name.data(),yyextra->aliasName.data(),yytext);
+ //if (yyextra->current_root->name.isEmpty())
//{
// TODO: namespace aliases are now treated as global entities
// while they should be aware of the scope they are in
- Doxygen::namespaceAliasDict.insert(aliasName,new QCString(yytext));
+ Doxygen::namespaceAliasDict.insert(yyextra->aliasName,new QCString(yytext));
//}
//else
//{
- // Doxygen::namespaceAliasDict.insert(current_root->name+"::"+aliasName,
- // new QCString(current_root->name+"::"+yytext));
+ // Doxygen::namespaceAliasDict.insert(yyextra->current_root->name+"::"+yyextra->aliasName,
+ // new QCString(yyextra->current_root->name+"::"+yytext));
//}
}
<NSAliasArg>";" {
BEGIN( FindMembers );
}
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
- lineCount();
- aliasName=yytext;
+ lineCount(yyscanner);
+ yyextra->aliasName=yytext;
BEGIN(PHPUseAs);
}
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
- lineCount();
- current->name=removeRedundantWhiteSpace(substitute(yytext,"\\","::"));
- //printf("PHP: adding use relation: %s\n",current->name.data());
- current->fileName = yyFileName;
+ lineCount(yyscanner);
+ yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,"\\","::"));
+ //printf("PHP: adding use relation: %s\n",yyextra->current->name.data());
+ yyextra->current->fileName = yyextra->yyFileName;
// add a using declaration
- current->section=Entry::USINGDECL_SEC;
- current_root->copyToSubEntry(current);
+ yyextra->current->section=Entry::USINGDECL_SEC;
+ yyextra->current_root->copyToSubEntry(yyextra->current);
// also add it as a using directive
- current->section=Entry::USINGDIR_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
- aliasName.resize(0);
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+ yyextra->aliasName.resize(0);
}
<PHPUseAs>{BN}+"as"{BN}+ {
- lineCount();
+ lineCount(yyscanner);
}
<PHPUseAs>{PHPUSEKW} {
}
<PHPUseAs>{ID} {
- //printf("PHP: adding use as relation: %s->%s\n",yytext,aliasName.data());
- if (!aliasName.isEmpty())
+ //printf("PHP: adding use as relation: %s->%s\n",yytext,yyextra->aliasName.data());
+ if (!yyextra->aliasName.isEmpty())
{
Doxygen::namespaceAliasDict.insert(yytext,
new QCString(removeRedundantWhiteSpace(
- substitute(aliasName,"\\","::"))));
+ substitute(yyextra->aliasName,"\\","::"))));
}
- aliasName.resize(0);
+ yyextra->aliasName.resize(0);
}
<PHPUse,PHPUseAs>[,;] {
if (*yytext==',')
@@ -1981,62 +1661,62 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<JavaImport>({ID}{BN}*"."{BN}*)+"*" { // package import => add as a using directive
- lineCount();
+ lineCount(yyscanner);
QCString scope=yytext;
- current->name=removeRedundantWhiteSpace(substitute(scope.left(scope.length()-1),".","::"));
- current->fileName = yyFileName;
- current->section=Entry::USINGDIR_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->name=removeRedundantWhiteSpace(substitute(scope.left(scope.length()-1),".","::"));
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(Using);
}
<JavaImport>({ID}{BN}*"."{BN}*)+{ID} { // class import => add as a using declaration
- lineCount();
+ lineCount(yyscanner);
QCString scope=yytext;
- current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
- current->fileName = yyFileName;
- if (insideD)
+ yyextra->current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
+ yyextra->current->fileName = yyextra->yyFileName;
+ if (yyextra->insideD)
{
- current->section=Entry::USINGDIR_SEC;
+ yyextra->current->section=Entry::USINGDIR_SEC;
}
else
{
- //printf("import name = %s -> %s\n",yytext,current->name.data());
- current->section=Entry::USINGDECL_SEC;
+ //printf("import name = %s -> %s\n",yytext,yyextra->current->name.data());
+ yyextra->current->section=Entry::USINGDECL_SEC;
}
- previous = current.get();
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->previous = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(Using);
}
<FindMembers>"using"{BN}+ {
- current->startLine=yyLineNr;
- current->startColumn = yyColNr;
- lineCount();
+ yyextra->current->startLine=yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ lineCount(yyscanner);
BEGIN(Using);
}
-<Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); }
+<Using>"namespace"{BN}+ { lineCount(yyscanner); BEGIN(UsingDirective); }
<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}) {
- lineCount();
- current->name=yytext;
- current->fileName = yyFileName;
- current->section=Entry::USINGDECL_SEC;
- current->startLine = yyLineNr;
- previous = current.get();
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
- if (insideCS) /* Hack: in C# a using declaration and
+ lineCount(yyscanner);
+ yyextra->current->name=yytext;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->section=Entry::USINGDECL_SEC;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->previous = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+ if (yyextra->insideCS) /* Hack: in C# a using declaration and
directive have the same syntax, so we
also add it as a using directive here
*/
{
- current->name=yytext;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->section=Entry::USINGDIR_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->name=yytext;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
}
BEGIN(Using);
}
@@ -2044,119 +1724,119 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(UsingAlias);
}
<UsingAlias>";" {
- previous->section=Entry::VARIABLE_SEC;
- previous->type = "typedef "+previous->args;
- previous->type=previous->type.simplifyWhiteSpace();
- previous->args.resize(0);
- previous->name=previous->name.stripWhiteSpace();
- previous->bodyLine = yyLineNr;
- previous->spec |= Entry::Alias;
+ yyextra->previous->section=Entry::VARIABLE_SEC;
+ yyextra->previous->type = "typedef "+yyextra->previous->args;
+ yyextra->previous->type=yyextra->previous->type.simplifyWhiteSpace();
+ yyextra->previous->args.resize(0);
+ yyextra->previous->name=yyextra->previous->name.stripWhiteSpace();
+ yyextra->previous->bodyLine = yyextra->yyLineNr;
+ yyextra->previous->spec |= Entry::Alias;
BEGIN(FindMembers);
}
<UsingAlias>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
- docBlockContext = UsingAliasEnd;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = UsingAliasEnd;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
- lineCount();
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
+ lineCount(yyscanner);
- docBlockTerm = ';';
+ yyextra->docBlockTerm = ';';
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
<UsingAlias>">>" {
- previous->args+="> >"; // see bug769552
+ yyextra->previous->args+="> >"; // see bug769552
}
<UsingAlias>. {
- previous->args+=yytext;
+ yyextra->previous->args+=yytext;
}
<UsingAlias>\n {
- previous->args+=yytext;
- lineCount();
+ yyextra->previous->args+=yytext;
+ lineCount(yyscanner);
}
<UsingAliasEnd>";" {
- previous->doc = current->doc;
- previous->brief = current->brief;
- current->doc.resize(0);
- current->brief.resize(0);
+ yyextra->previous->doc = yyextra->current->doc;
+ yyextra->previous->brief = yyextra->current->brief;
+ yyextra->current->doc.resize(0);
+ yyextra->current->brief.resize(0);
unput(';');
BEGIN(UsingAlias);
}
-<UsingDirective>{SCOPENAME} { current->name=removeRedundantWhiteSpace(yytext);
- current->fileName = yyFileName;
- current->section=Entry::USINGDIR_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+<UsingDirective>{SCOPENAME} { yyextra->current->name=removeRedundantWhiteSpace(yytext);
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(Using);
}
<Using>";" { BEGIN(FindMembers); }
<FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl
QCString n=yytext;
- addType();
- current->name=n.left(n.length()-2);
+ addType(yyscanner);
+ yyextra->current->name=n.left(n.length()-2);
}
<FindMembers>{SCOPENAME}{BN}*/"<" { // Note: this could be a return type!
- roundCount=0;
- sharpCount=0;
- lineCount();
- addType();
- current->name=yytext;
- current->name=current->name.stripWhiteSpace();
- //current->scopeSpec.resize(0);
- // currentTemplateSpec = &current->scopeSpec;
- if (nameIsOperator(current->name))
+ yyextra->roundCount=0;
+ yyextra->sharpCount=0;
+ lineCount(yyscanner);
+ addType(yyscanner);
+ yyextra->current->name=yytext;
+ yyextra->current->name=yyextra->current->name.stripWhiteSpace();
+ //yyextra->current->scopeSpec.resize(0);
+ // yyextra->currentTemplateSpec = &yyextra->current->scopeSpec;
+ if (nameIsOperator(yyextra->current->name))
BEGIN( Operator );
else
BEGIN( EndTemplate );
}
<FindMemberName>{SCOPENAME}{BN}*/"<" {
- sharpCount=0;
- roundCount=0;
- lineCount();
- current->name+=((QCString)yytext).stripWhiteSpace();
- //current->memberSpec.resize(0);
- // currentTemplateSpec = &current->memberSpec;
- if (nameIsOperator(current->name))
+ yyextra->sharpCount=0;
+ yyextra->roundCount=0;
+ lineCount(yyscanner);
+ yyextra->current->name+=((QCString)yytext).stripWhiteSpace();
+ //yyextra->current->memberSpec.resize(0);
+ // yyextra->currentTemplateSpec = &yyextra->current->memberSpec;
+ if (nameIsOperator(yyextra->current->name))
BEGIN( Operator );
else
BEGIN( EndTemplate );
}
<EndTemplate>"<<<" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
{
REJECT;
}
else
{
- lastHereDocContext = YY_START;
+ yyextra->lastHereDocContext = YY_START;
BEGIN(HereDoc);
}
}
<ClassTemplSpec,EndTemplate>"<<" {
- current->name+=yytext;
- // *currentTemplateSpec+=yytext;
+ yyextra->current->name+=yytext;
+ // *yyextra->currentTemplateSpec+=yytext;
}
<EndTemplate>"<" {
- if (roundCount==0)
+ if (yyextra->roundCount==0)
{
- // *currentTemplateSpec+='<';
- sharpCount++;
+ // *yyextra->currentTemplateSpec+='<';
+ yyextra->sharpCount++;
}
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<ClassTemplSpec,EndTemplate>">>" {
- if (insideJava || insideCS || insideCli || roundCount==0)
+ if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
{
unput('>');
unput(' ');
@@ -2164,117 +1844,118 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
else
{
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
- // *currentTemplateSpec+=yytext;
+ // *yyextra->currentTemplateSpec+=yytext;
}
<EndTemplate>">" {
- current->name+='>';
- // *currentTemplateSpec+='>';
- if (roundCount==0 && --sharpCount<=0)
+ yyextra->current->name+='>';
+ // *yyextra->currentTemplateSpec+='>';
+ if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
- //printf("Found %s\n",current->name.data());
+ //printf("Found %s\n",yyextra->current->name.data());
BEGIN(FindMembers);
}
}
<EndTemplate>">"{BN}*"(" {
- lineCount();
- current->name+='>';
- // *currentTemplateSpec+='>';
- if (roundCount==0 && --sharpCount<=0)
- {
- current->bodyLine = yyLineNr;
- current->args = "(";
- currentArgumentContext = FuncQual;
- fullArgString = current->args.copy();
- copyArgString = &current->args;
- //printf("Found %s\n",current->name.data());
+ lineCount(yyscanner);
+ yyextra->current->name+='>';
+ // *yyextra->currentTemplateSpec+='>';
+ if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
+ {
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->args = "(";
+ yyextra->currentArgumentContext = FuncQual;
+ yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->copyArgString = &yyextra->current->args;
+ //printf("Found %s\n",yyextra->current->name.data());
BEGIN( ReadFuncArgType ) ;
}
}
<EndTemplate>">"{BN}*/"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { // function pointer returning a template instance
- lineCount();
- current->name+='>';
- if (roundCount==0)
+ lineCount(yyscanner);
+ yyextra->current->name+='>';
+ if (yyextra->roundCount==0)
{
BEGIN(FindMembers);
}
}
<EndTemplate>">"{BN}*/"::" {
- lineCount();
- current->name+='>';
- // *currentTemplateSpec+='>';
- if (roundCount==0 && --sharpCount<=0)
+ lineCount(yyscanner);
+ yyextra->current->name+='>';
+ // *yyextra->currentTemplateSpec+='>';
+ if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
BEGIN(FindMemberName);
}
}
-<ClassTemplSpec,EndTemplate>"(" { current->name+=*yytext;
- roundCount++;
+<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
+ yyextra->roundCount++;
}
-<ClassTemplSpec,EndTemplate>")" { current->name+=*yytext;
- if (roundCount>0) roundCount--;
+<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
+ if (yyextra->roundCount>0) yyextra->roundCount--;
}
<EndTemplate>. {
- current->name+=*yytext;
- // *currentTemplateSpec+=*yytext;
+ yyextra->current->name+=*yytext;
+ // *yyextra->currentTemplateSpec+=*yytext;
}
<FindMembers>"define"{BN}*"("{BN}*["'] {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- current->bodyLine = yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( DefinePHP );
}
else
REJECT;
}
<CopyHereDoc>{ID} { // PHP heredoc
- g_delimiter = yytext;
- *pCopyHereDocGString += yytext;
+ yyextra->delimiter = yytext;
+ *yyextra->pCopyHereDocGString += yytext;
BEGIN(CopyHereDocEnd);
}
<CopyHereDoc>"'"{ID}/"'" { // PHP nowdoc
- g_delimiter = &yytext[1];
- *pCopyHereDocGString += yytext;
+ yyextra->delimiter = &yytext[1];
+ *yyextra->pCopyHereDocGString += yytext;
BEGIN(CopyHereDocEnd);
}
<HereDoc>{ID} { // PHP heredoc
- g_delimiter = yytext;
+ yyextra->delimiter = yytext;
BEGIN(HereDocEnd);
}
<HereDoc>"'"{ID}/"'" { // PHP nowdoc
- g_delimiter = &yytext[1];
+ yyextra->delimiter = &yytext[1];
BEGIN(HereDocEnd);
}
<HereDocEnd>^{ID} { // id at start of the line could mark the end of the block
- if (g_delimiter==yytext) // it is the end marker
+ if (yyextra->delimiter==yytext) // it is the end marker
{
- BEGIN(lastHereDocContext);
+ BEGIN(yyextra->lastHereDocContext);
}
}
<HereDocEnd>. { }
<CopyHereDocEnd>^{ID} { // id at start of the line could mark the end of the block
- *pCopyHereDocGString += yytext;
- if (g_delimiter==yytext) // it is the end marker
+ *yyextra->pCopyHereDocGString += yytext;
+ if (yyextra->delimiter==yytext) // it is the end marker
{
- BEGIN(lastHereDocContext);
+ BEGIN(yyextra->lastHereDocContext);
}
}
<CopyHereDocEnd>\n {
- *pCopyHereDocGString += yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopyHereDocGString += yytext;
}
<CopyHereDocEnd>{ID} {
- *pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString += yytext;
}
<CopyHereDocEnd>. {
- *pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString += yytext;
}
<FindMembers>"Q_OBJECT" { // Qt object macro
}
<FindMembers>"Q_PROPERTY" { // Qt property declaration
- current->protection = Public ; // see bug734245 & bug735462
- current->mtype = mtype = Property;
- current->type.resize(0);
+ yyextra->current->protection = Public ; // see bug734245 & bug735462
+ yyextra->current->mtype = yyextra->mtype = Property;
+ yyextra->current->type.resize(0);
BEGIN(QtPropType);
}
<QtPropType>"(" { // start of property arguments
@@ -2284,25 +1965,25 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FindMembers);
}
<QtPropType>"const"|"volatile"|"unsigned"|"signed"|"long"|"short" {
- current->type+=yytext;
+ yyextra->current->type+=yytext;
}
<QtPropType>{B}+ {
- current->type+=yytext;
+ yyextra->current->type+=yytext;
}
<QtPropType>({TSCOPE}"::")*{TSCOPE} {
- current->type+=yytext;
+ yyextra->current->type+=yytext;
BEGIN(QtPropName);
}
<QtPropName>{ID} {
- current->name=yytext;
+ yyextra->current->name=yytext;
BEGIN(QtPropAttr);
}
<QtPropAttr>"READ" {
- current->spec |= Entry::Readable;
+ yyextra->current->spec |= Entry::Readable;
BEGIN(QtPropRead);
}
<QtPropAttr>"WRITE" {
- current->spec |= Entry::Writable;
+ yyextra->current->spec |= Entry::Writable;
BEGIN(QtPropWrite);
}
<QtPropAttr>"RESET"{B}+{ID} { // reset method => not supported yet
@@ -2312,163 +1993,163 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<QtPropAttr>"DESIGNABLE"{B}+{ID} { // designable property => not supported yet
}
<QtPropRead>{ID} {
- current->read = yytext;
+ yyextra->current->read = yytext;
BEGIN(QtPropAttr);
}
<QtPropWrite>{ID} {
- current->write = yytext;
+ yyextra->current->write = yytext;
BEGIN(QtPropAttr);
}
<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
- current->name=yytext;
+ yyextra->current->name=yytext;
BEGIN(FindMembers);
}
<FindMembers,FindMemberName>{SCOPENAME} {
- if (insideCpp || insideObjC)
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
- yyBegColNr=yyColNr;
- yyBegLineNr=yyLineNr;
- lineCount();
- if (insideIDL && yyleng==9 && qstrcmp(yytext,"cpp_quote")==0)
+ yyextra->yyBegColNr=yyextra->yyColNr;
+ yyextra->yyBegLineNr=yyextra->yyLineNr;
+ lineCount(yyscanner);
+ if (yyextra->insideIDL && yyleng==9 && qstrcmp(yytext,"cpp_quote")==0)
{
BEGIN(CppQuote);
}
- else if ((insideIDL || insideJava || insideD) && yyleng==6 && qstrcmp(yytext,"import")==0)
+ else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 && qstrcmp(yytext,"import")==0)
{
- if (insideIDL)
+ if (yyextra->insideIDL)
BEGIN(NextSemi);
- else // insideJava or insideD
+ else // yyextra->insideJava or yyextra->insideD
BEGIN(JavaImport);
}
- else if (insidePHP && qstrcmp(yytext,"use")==0)
+ else if (yyextra->insidePHP && qstrcmp(yytext,"use")==0)
{
BEGIN(PHPUse);
}
- else if (insideJava && qstrcmp(yytext,"package")==0)
+ else if (yyextra->insideJava && qstrcmp(yytext,"package")==0)
{
- lineCount();
+ lineCount(yyscanner);
BEGIN(PackageName);
}
- else if (insideIDL && qstrcmp(yytext,"case")==0)
+ else if (yyextra->insideIDL && qstrcmp(yytext,"case")==0)
{
BEGIN(IDLUnionCase);
}
- else if (insideTryBlock && qstrcmp(yytext,"catch")==0)
+ else if (yyextra->insideTryBlock && qstrcmp(yytext,"catch")==0)
{
- insideTryBlock=FALSE;
+ yyextra->insideTryBlock=FALSE;
BEGIN(TryFunctionBlock);
}
- else if (insideCpp && qstrcmp(yytext,"alignas")==0)
+ else if (yyextra->insideCpp && qstrcmp(yytext,"alignas")==0)
{
- lastAlignAsContext = YY_START;
+ yyextra->lastAlignAsContext = YY_START;
BEGIN(AlignAs);
}
- else if (insideJS && qstrcmp(yytext,"var")==0)
+ else if (yyextra->insideJS && qstrcmp(yytext,"var")==0)
{ // javascript variable
- current->type="var";
+ yyextra->current->type="var";
}
- else if (insideJS && qstrcmp(yytext,"function")==0)
+ else if (yyextra->insideJS && qstrcmp(yytext,"function")==0)
{ // javascript function
- current->type="function";
+ yyextra->current->type="function";
}
- else if (insideCS && qstrcmp(yytext,"this")==0)
+ else if (yyextra->insideCS && qstrcmp(yytext,"this")==0)
{
// C# indexer
- addType();
- current->name="this";
+ addType(yyscanner);
+ yyextra->current->name="this";
BEGIN(CSIndexer);
}
- else if (insideCpp && qstrcmp(yytext,"static_assert")==0)
+ else if (yyextra->insideCpp && qstrcmp(yytext,"static_assert")==0)
{
// C++11 static_assert
BEGIN(StaticAssert);
}
- else if (insideCpp && qstrcmp(yytext,"decltype")==0)
+ else if (yyextra->insideCpp && qstrcmp(yytext,"decltype")==0)
{
// C++11 decltype(x)
- current->type+=yytext;
+ yyextra->current->type+=yytext;
BEGIN(DeclType);
}
- else if (insideSlice && qstrcmp(yytext,"optional")==0)
+ else if (yyextra->insideSlice && qstrcmp(yytext,"optional")==0)
{
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type = "optional";
+ yyextra->current->type = "optional";
}
else
{
- current->type += " optional";
+ yyextra->current->type += " optional";
}
- lastModifierContext = YY_START;
+ yyextra->lastModifierContext = YY_START;
BEGIN(SliceOptional);
}
else
{
if (YY_START==FindMembers)
{
- addType();
+ addType(yyscanner);
}
- bool javaLike = insideJava || insideCS || insideD || insidePHP || insideJS;
+ bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
if (javaLike && qstrcmp(yytext,"public")==0)
{
- current->protection = Public;
+ yyextra->current->protection = Public;
}
else if (javaLike && qstrcmp(yytext,"protected")==0)
{
- current->protection = Protected;
+ yyextra->current->protection = Protected;
}
- else if ((insideCS || insideD || insidePHP || insideJS) && qstrcmp(yytext,"internal")==0)
+ else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) && qstrcmp(yytext,"internal")==0)
{
- current->protection = Package;
+ yyextra->current->protection = Package;
}
else if (javaLike && qstrcmp(yytext,"private")==0)
{
- current->protection = Private;
+ yyextra->current->protection = Private;
}
else if (javaLike && qstrcmp(yytext,"static")==0)
{
if (YY_START==FindMembers)
- current->name = yytext;
+ yyextra->current->name = yytext;
else
- current->name += yytext;
- current->stat = TRUE;
+ yyextra->current->name += yytext;
+ yyextra->current->stat = TRUE;
}
else
{
if (YY_START==FindMembers)
- current->name = yytext;
+ yyextra->current->name = yytext;
else
- current->name += yytext;
- if (current->name.left(7)=="static ")
+ yyextra->current->name += yytext;
+ if (yyextra->current->name.left(7)=="static ")
{
- current->stat = TRUE;
- current->name= current->name.mid(7);
+ yyextra->current->stat = TRUE;
+ yyextra->current->name= yyextra->current->name.mid(7);
}
- else if (current->name.left(7)=="inline ")
+ else if (yyextra->current->name.left(7)=="inline ")
{
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type="inline";
+ yyextra->current->type="inline";
}
else
{
- current->type+="inline ";
+ yyextra->current->type+="inline ";
}
- current->name= current->name.mid(7);
+ yyextra->current->name= yyextra->current->name.mid(7);
}
- else if (current->name.left(6)=="const ")
+ else if (yyextra->current->name.left(6)=="const ")
{
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type="const";
+ yyextra->current->type="const";
}
else
{
- current->type+="const ";
+ yyextra->current->type+="const ";
}
- current->name=current->name.mid(6);
+ yyextra->current->name=yyextra->current->name.mid(6);
}
}
QCString tmp=yytext;
@@ -2478,64 +2159,64 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
else
{
- externC=FALSE; // see bug759247
+ yyextra->externC=FALSE; // see bug759247
BEGIN(FindMembers);
}
}
}
<StaticAssert>"(" {
- lastSkipRoundContext = FindMembers;
- roundCount=0;
+ yyextra->lastSkipRoundContext = FindMembers;
+ yyextra->roundCount=0;
BEGIN(SkipRound);
}
-<StaticAssert>{BN}+ { lineCount(); }
+<StaticAssert>{BN}+ { lineCount(yyscanner); }
<StaticAssert>. { // variable with static_assert as name?
unput(*yytext);
BEGIN(FindMembers);
}
<DeclType>"(" {
- current->type+=yytext;
- lastRoundContext=FindMembers;
- pCopyRoundString=&current->type;
- roundCount=0;
+ yyextra->current->type+=yytext;
+ yyextra->lastRoundContext=FindMembers;
+ yyextra->pCopyRoundString=&yyextra->current->type;
+ yyextra->roundCount=0;
BEGIN(CopyRound);
}
-<DeclType>{BN}+ { lineCount(); }
+<DeclType>{BN}+ { lineCount(yyscanner); }
<DeclType>. {
unput(*yytext);
BEGIN(FindMembers);
}
<CSIndexer>"["[^\n\]]*"]" {
- current->name+=removeRedundantWhiteSpace(yytext);
+ yyextra->current->name+=removeRedundantWhiteSpace(yytext);
BEGIN(FindMembers);
}
<FindMembers>[0-9]{ID} { // some number where we did not expect one
}
<FindMembers>"." {
- if (insideJava || insideCS || insideD)
+ if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
{
- current->name+=".";
+ yyextra->current->name+=".";
}
}
<FindMembers>"::" {
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<CppQuote>"("{B}*"\"" {
- insideCppQuote=TRUE;
+ yyextra->insideCppQuote=TRUE;
BEGIN(FindMembers);
}
<IDLUnionCase>"::"
<IDLUnionCase>":" { BEGIN(FindMembers); }
-<IDLUnionCase>\n { lineCount(); }
+<IDLUnionCase>\n { lineCount(yyscanner); }
<IDLUnionCase>.
-<TryFunctionBlock>\n { lineCount(); }
+<TryFunctionBlock>\n { lineCount(yyscanner); }
<TryFunctionBlock>"{" {
- curlyCount=0;
- lastCurlyContext = TryFunctionBlockEnd ;
+ yyextra->curlyCount=0;
+ yyextra->lastCurlyContext = TryFunctionBlockEnd ;
BEGIN( SkipCurly );
}
<TryFunctionBlock>.
-<TryFunctionBlockEnd>{BN}*"catch" { lineCount(); BEGIN(TryFunctionBlock); // {BN}* added to fix bug 611193
+<TryFunctionBlockEnd>{BN}*"catch" { lineCount(yyscanner); BEGIN(TryFunctionBlock); // {BN}* added to fix bug 611193
}
<TryFunctionBlockEnd>\n { unput(*yytext); // rule added to fix bug id 601138
BEGIN( FindMembers );
@@ -2544,159 +2225,159 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( FindMembers );
}
<EndCppQuote>")" {
- insideCppQuote=FALSE;
+ yyextra->insideCppQuote=FALSE;
BEGIN(FindMembers);
}
-<FindMembers,FindFields>{B}*"#" { if (insidePHP)
+<FindMembers,FindFields>{B}*"#" { if (yyextra->insidePHP)
REJECT;
- lastCPPContext = YY_START;
+ yyextra->lastCPPContext = YY_START;
BEGIN( SkipCPP ) ;
}
<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
- if (insidePHP)
+ if (yyextra->insidePHP)
REJECT;
- current->bodyLine = yyLineNr;
- lastDefineContext = YY_START;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->lastDefineContext = YY_START;
BEGIN( Define );
}
<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
- yyLineNr = atoi(&yytext[1]);
- //printf("setting line number to %d\n",yyLineNr);
- lastPreLineCtrlContext = YY_START;
+ yyextra->yyLineNr = atoi(&yytext[1]);
+ //printf("setting line number to %d\n",yyextra->yyLineNr);
+ yyextra->lastPreLineCtrlContext = YY_START;
if (YY_START==ReadBody ||
YY_START==ReadNSBody ||
YY_START==ReadBodyIntf)
{
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
BEGIN( PreLineCtrl );
}
<PreLineCtrl>"\""[^\n\"]*"\"" {
- yyFileName = stripQuotes(yytext);
- if (lastPreLineCtrlContext==ReadBody ||
- lastPreLineCtrlContext==ReadNSBody ||
- lastPreLineCtrlContext==ReadBodyIntf)
+ yyextra->yyFileName = stripQuotes(yytext);
+ if (yyextra->lastPreLineCtrlContext==ReadBody ||
+ yyextra->lastPreLineCtrlContext==ReadNSBody ||
+ yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
}
<PreLineCtrl>. {
- if (lastPreLineCtrlContext==ReadBody ||
- lastPreLineCtrlContext==ReadNSBody ||
- lastPreLineCtrlContext==ReadBodyIntf)
+ if (yyextra->lastPreLineCtrlContext==ReadBody ||
+ yyextra->lastPreLineCtrlContext==ReadNSBody ||
+ yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
}
<PreLineCtrl>\n {
- if (lastPreLineCtrlContext==ReadBody ||
- lastPreLineCtrlContext==ReadNSBody ||
- lastPreLineCtrlContext==ReadBodyIntf)
+ if (yyextra->lastPreLineCtrlContext==ReadBody ||
+ yyextra->lastPreLineCtrlContext==ReadNSBody ||
+ yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
- lineCount();
- BEGIN( lastPreLineCtrlContext );
+ lineCount(yyscanner);
+ BEGIN( yyextra->lastPreLineCtrlContext );
}
<SkipCPP>.
-<SkipCPP>\\[\r]*"\n"[\r]* { lineCount(); }
-<SkipCPP>[\r]*\n[\r]* { lineCount();
- BEGIN( lastCPPContext) ;
+<SkipCPP>\\[\r]*"\n"[\r]* { lineCount(yyscanner); }
+<SkipCPP>[\r]*\n[\r]* { lineCount(yyscanner);
+ BEGIN( yyextra->lastCPPContext) ;
}
<Define>{ID}{B}*"(" {
- current->name = yytext;
- current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
- current->args = "(";
- current->bodyLine = yyLineNr;
- currentArgumentContext = DefineEnd;
- fullArgString=current->args.copy();
- copyArgString=&current->args;
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
+ yyextra->current->args = "(";
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->currentArgumentContext = DefineEnd;
+ yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
/*
<DefineArg>")" {
//printf("Define with args\n");
- current->args += ')';
+ yyextra->current->args += ')';
BEGIN( DefineEnd );
}
<DefineArg>. {
- current->args += *yytext;
+ yyextra->current->args += *yytext;
}
*/
<Define>{ID} {
//printf("Define '%s' without args\n",yytext);
- if (insideCpp || insideObjC)
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
- current->bodyLine = yyLineNr;
- current->name = yytext;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->name = yytext;
BEGIN(DefineEnd);
}
<DefineEnd>\n {
- //printf("End define: doc=%s docFile=%s docLine=%d\n",current->doc.data(),current->docFile.data(),current->docLine);
- lineCount();
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->type.resize(0);
- current->args = current->args.simplifyWhiteSpace();
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::DEFINE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
- BEGIN(lastDefineContext);
+ //printf("End define: doc=%s docFile=%s docLine=%d\n",yyextra->current->doc.data(),yyextra->current->docFile.data(),yyextra->current->docLine);
+ lineCount(yyscanner);
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->type.resize(0);
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::DEFINE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+ BEGIN(yyextra->lastDefineContext);
}
<DefinePHPEnd>";" {
//printf("End define\n");
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->type.resize(0);
- current->type = "const";
- QCString init = current->initializer.data();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->type.resize(0);
+ yyextra->current->type = "const";
+ QCString init = yyextra->current->initializer.data();
init = init.simplifyWhiteSpace();
init = init.left(init.length()-1);
- current->initializer = init;
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->initializer = init;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(FindMembers);
}
<DefinePHPEnd>.
<DefineEnd>\\[\r]?\n {
- lineCount();
+ lineCount(yyscanner);
}
<DefineEnd>\" {
- if (insideIDL && insideCppQuote)
+ if (yyextra->insideIDL && yyextra->insideCppQuote)
{
BEGIN(EndCppQuote);
}
else
{
- lastStringContext=DefineEnd;
+ yyextra->lastStringContext=DefineEnd;
BEGIN(SkipString);
}
}
<DefineEnd>.
<DefinePHP>{ID}["']{BN}*","{BN}* {
- current->name = yytext;
- current->name = current->name.stripWhiteSpace();
- current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
- current->name = current->name.left(current->name.length()-1);
- current->bodyLine = yyLineNr;
- lastRoundContext = DefinePHPEnd;
- pCopyRoundGString = &current->initializer;
- roundCount = 0;
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
+ yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->lastRoundContext = DefinePHPEnd;
+ yyextra->pCopyRoundGString = &yyextra->current->initializer;
+ yyextra->roundCount = 0;
BEGIN( GCopyRound );
}
<FindMembers>[\^%] { // ^ and % are C++/CLI extensions
- if (insideCli)
+ if (yyextra->insideCli)
{
- addType();
- current->name = yytext ;
+ addType(yyscanner);
+ yyextra->current->name = yytext ;
}
else
{
@@ -2704,128 +2385,128 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers>[*&]+ {
- current->name += yytext ;
- addType();
+ yyextra->current->name += yytext ;
+ addType(yyscanner);
}
<FindMembers,MemberSpec,Function,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs,DefinePHPEnd>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
- if (current->bodyLine==-1)
+ if (yyextra->current->bodyLine==-1)
{
- current->bodyLine=yyLineNr;
+ yyextra->current->bodyLine=yyextra->yyLineNr;
}
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
- //printf("indent=%d\n",computeIndent(yytext+1,g_column));
- lineCount();
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
+ //printf("indent=%d\n",computeIndent(yytext+1,yyextra->column));
+ lineCount(yyscanner);
- docBlockTerm = ';';
- if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC)
+ yyextra->docBlockTerm = ';';
+ if (YY_START==EnumBaseType && yyextra->current->section==Entry::ENUM_SEC)
{
- current->bitfields = ":"+current->args;
- current->args.resize(0);
- current->section=Entry::VARIABLE_SEC;
+ yyextra->current->bitfields = ":"+yyextra->current->args;
+ yyextra->current->args.resize(0);
+ yyextra->current->section=Entry::VARIABLE_SEC;
}
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
- lineCount();
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
+ lineCount(yyscanner);
- docBlockTerm = ',';
- if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC)
+ yyextra->docBlockTerm = ',';
+ if (YY_START==EnumBaseType && yyextra->current->section==Entry::ENUM_SEC)
{
- current->bitfields = ":"+current->args;
- current->args.resize(0);
- current->section=Entry::VARIABLE_SEC;
+ yyextra->current->bitfields = ":"+yyextra->current->args;
+ yyextra->current->args.resize(0);
+ yyextra->current->section=Entry::VARIABLE_SEC;
}
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
<DefineEnd,FindFields,FindFieldArg,ReadInitializer,OldStyleArgs>{BN}*("/**"|"//!"|"/*!"|"///")"<" {
- if (current->bodyLine==-1)
+ if (yyextra->current->bodyLine==-1)
{
- current->bodyLine=yyLineNr;
+ yyextra->current->bodyLine=yyextra->yyLineNr;
}
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
- lineCount();
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
+ lineCount(yyscanner);
- docBlockTerm = 0;
+ yyextra->docBlockTerm = 0;
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
<FindMembers,FindFields>("//"([!/]){B}*{CMD}"{")|("/*"([!*]){B}*{CMD}"{") {
- //handleGroupStartCommand(current->name);
- if (previous && previous->section==Entry::GROUPDOC_SEC)
+ //handleGroupStartCommand(yyextra->current->name);
+ if (yyextra->previous && yyextra->previous->section==Entry::GROUPDOC_SEC)
{
- // link open command to the group defined in the previous entry
- Doxygen::docGroup.open(previous,yyFileName,yyLineNr);
+ // link open command to the group defined in the yyextra->previous entry
+ Doxygen::docGroup.open(yyextra->previous.get(),yyextra->yyFileName,yyextra->yyLineNr);
}
else
{
- // link open command to the current entry
- Doxygen::docGroup.open(current.get(),yyFileName,yyLineNr);
+ // link open command to the yyextra->current entry
+ Doxygen::docGroup.open(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr);
}
- //current = tmp;
- initEntry();
+ //yyextra->current = tmp;
+ initEntry(yyscanner);
if (yytext[1]=='/')
{
if (yytext[2]=='!' || yytext[2]=='/')
{
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockAutoBrief = FALSE;
- docBlock.resize(0);
- docBlockTerm = 0;
- startCommentBlock(TRUE);
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = FALSE;
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockTerm = 0;
+ startCommentBlock(yyscanner,TRUE);
BEGIN(DocLine);
}
else
{
- lastCContext=YY_START;
+ yyextra->lastCContext=YY_START;
BEGIN(SkipCxxComment);
}
}
@@ -2833,497 +2514,498 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
if (yytext[2]=='!' || yytext[2]=='*')
{
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlock.resize(0);
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
- docBlockTerm = 0;
- startCommentBlock(FALSE);
+ yyextra->docBlockTerm = 0;
+ startCommentBlock(yyscanner,FALSE);
BEGIN(DocBlock);
}
else
{
- lastCContext=YY_START;
+ yyextra->lastCContext=YY_START;
BEGIN(SkipComment);
}
}
}
<FindMembers,FindFields,ReadInitializer>"//"([!/]){B}*{CMD}"}".*|"/*"([!*]){B}*{CMD}"}"[^*]*"*/" {
- bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && lastInitializerContext==FindFields); // see bug746226
- Doxygen::docGroup.close(current.get(),yyFileName,yyLineNr,insideEnum);
+ bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && yyextra->lastInitializerContext==FindFields); // see bug746226
+ Doxygen::docGroup.close(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr,insideEnum);
+ lineCount(yyscanner);
}
<FindMembers>"=" { // in PHP code this could also be due to "<?="
- current->bodyLine = yyLineNr;
- current->initializer = yytext;
- lastInitializerContext = YY_START;
- initBracketCount=0;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->initializer = yytext;
+ yyextra->lastInitializerContext = YY_START;
+ yyextra->initBracketCount=0;
BEGIN(ReadInitializer);
}
<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
- lineCount();
- current->exception += " ";
- current->exception += removeRedundantWhiteSpace(yytext);
+ lineCount(yyscanner);
+ yyextra->current->exception += " ";
+ yyextra->current->exception += removeRedundantWhiteSpace(yytext);
}
<UNOIDLAttributeBlock>"}" {
- current->exception += " }";
+ yyextra->current->exception += " }";
BEGIN(FindMembers);
}
/* Read initializer rules */
<ReadInitializer>"(" {
- lastRoundContext=YY_START;
- pCopyRoundGString=&current->initializer;
- roundCount=0;
- current->initializer+=*yytext;
+ yyextra->lastRoundContext=YY_START;
+ yyextra->pCopyRoundGString=&yyextra->current->initializer;
+ yyextra->roundCount=0;
+ yyextra->current->initializer+=*yytext;
BEGIN(GCopyRound);
}
<ReadInitializer>"[" {
- if (!insidePHP) REJECT;
- lastSquareContext=YY_START;
- pCopySquareGString=&current->initializer;
- squareCount=0;
- current->initializer+=*yytext;
+ if (!yyextra->insidePHP) REJECT;
+ yyextra->lastSquareContext=YY_START;
+ yyextra->pCopySquareGString=&yyextra->current->initializer;
+ yyextra->squareCount=0;
+ yyextra->current->initializer+=*yytext;
BEGIN(GCopySquare);
}
<ReadInitializer>"{" {
- lastCurlyContext=YY_START;
- pCopyCurlyGString=&current->initializer;
- curlyCount=0;
- current->initializer+=*yytext;
+ yyextra->lastCurlyContext=YY_START;
+ yyextra->pCopyCurlyGString=&yyextra->current->initializer;
+ yyextra->curlyCount=0;
+ yyextra->current->initializer+=*yytext;
BEGIN(GCopyCurly);
}
<ReadInitializer>[;,] {
- //printf(">> initializer '%s' <<\n",current->initializer.data());
- if (*yytext==';' && (current_root->spec&Entry::Enum))
- {
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- current->args = current->args.simplifyWhiteSpace();
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ //printf(">> initializer '%s' <<\n",yyextra->current->initializer.data());
+ if (*yytext==';' && (yyextra->current_root->spec&Entry::Enum))
+ {
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(FindMembers);
}
- else if (*yytext==';' || (lastInitializerContext==FindFields && initBracketCount==0)) // initBracketCount==0 was added for bug 665778
+ else if (*yytext==';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0)) // yyextra->initBracketCount==0 was added for bug 665778
{
unput(*yytext);
- BEGIN(lastInitializerContext);
+ BEGIN(yyextra->lastInitializerContext);
}
- else if (*yytext==',' && initBracketCount==0) // for "int a=0,b=0"
+ else if (*yytext==',' && yyextra->initBracketCount==0) // for "int a=0,b=0"
{
unput(*yytext);
- BEGIN(lastInitializerContext);
+ BEGIN(yyextra->lastInitializerContext);
}
else
{
- current->initializer+=*yytext;
+ yyextra->current->initializer+=*yytext;
}
}
<ReadInitializer>{RAWBEGIN} { // C++11 raw string
- if (!insideCpp)
+ if (!yyextra->insideCpp)
{
REJECT;
}
else
{
QCString text=yytext;
- current->initializer+=text;
+ yyextra->current->initializer+=text;
int i=text.find('"');
- g_delimiter = yytext+i+1;
- g_delimiter=g_delimiter.left(g_delimiter.length()-1);
- lastRawStringContext = YY_START;
- pCopyRawGString = &current->initializer;
+ yyextra->delimiter = yytext+i+1;
+ yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
+ yyextra->lastRawStringContext = YY_START;
+ yyextra->pCopyRawGString = &yyextra->current->initializer;
BEGIN(RawGString);
//printf("RawGString delimiter='%s'\n",delimiter.data());
}
}
<RawGString>{RAWEND} {
- *pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString+=yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
- if (delimiter==g_delimiter)
+ if (delimiter==yyextra->delimiter)
{
- BEGIN(lastRawStringContext);
+ BEGIN(yyextra->lastRawStringContext);
}
}
<RawGString>[^)\n]+ {
- *pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString+=yytext;
}
<RawGString>. {
- *pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString+=yytext;
}
<RawGString>\n {
- *pCopyRawGString+=yytext;
- lineCount();
+ *yyextra->pCopyRawGString+=yytext;
+ lineCount(yyscanner);
}
<RawString>{RAWEND} {
- *pCopyRawString+=yytext;
- fullArgString+=yytext;
+ *yyextra->pCopyRawString+=yytext;
+ yyextra->fullArgString+=yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
- if (delimiter==g_delimiter)
+ if (delimiter==yyextra->delimiter)
{
- BEGIN(lastRawStringContext);
+ BEGIN(yyextra->lastRawStringContext);
}
}
<RawString>[^)]+ {
- *pCopyRawString+=yytext;
- fullArgString+=yytext;
+ *yyextra->pCopyRawString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<RawString>. {
- *pCopyRawString+=yytext;
- fullArgString+=yytext;
+ *yyextra->pCopyRawString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<RawString>\n {
- *pCopyRawString+=yytext;
- fullArgString+=yytext;
- lineCount();
+ *yyextra->pCopyRawString+=yytext;
+ yyextra->fullArgString+=yytext;
+ lineCount(yyscanner);
}
<ReadInitializer>\" {
- if (insideIDL && insideCppQuote)
+ if (yyextra->insideIDL && yyextra->insideCppQuote)
{
BEGIN(EndCppQuote);
}
else
{
- lastStringContext=YY_START;
- current->initializer+=yytext;
- pCopyQuotedGString=&current->initializer;
+ yyextra->lastStringContext=YY_START;
+ yyextra->current->initializer+=yytext;
+ yyextra->pCopyQuotedGString=&yyextra->current->initializer;
BEGIN(CopyGString);
}
}
<ReadInitializer>"->" {
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
<ReadInitializer>"<<" {
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
<ReadInitializer>">>" {
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
<ReadInitializer>[<\[{(] {
- initBracketCount++;
- current->initializer+=*yytext;
+ yyextra->initBracketCount++;
+ yyextra->current->initializer+=*yytext;
}
<ReadInitializer>[>\]})] {
- initBracketCount--;
- current->initializer+=*yytext;
+ yyextra->initBracketCount--;
+ yyextra->current->initializer+=*yytext;
}
<ReadInitializer>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- current->initializer+=yytext;
- pCopyQuotedGString = &current->initializer;
- lastStringContext=YY_START;
+ yyextra->current->initializer+=yytext;
+ yyextra->pCopyQuotedGString = &yyextra->current->initializer;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
}
<ReadInitializer>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
}
<ReadInitializer>\n {
- current->initializer+=*yytext;
- lineCount();
+ yyextra->current->initializer+=*yytext;
+ lineCount(yyscanner);
}
<ReadInitializer>"@\"" {
- //printf("insideCS=%d\n",insideCS);
- current->initializer+=yytext;
- if (!insideCS && !insideObjC)
+ //printf("yyextra->insideCS=%d\n",yyextra->insideCS);
+ yyextra->current->initializer+=yytext;
+ if (!yyextra->insideCS && !yyextra->insideObjC)
{
REJECT;
}
else
{
// C#/ObjC verbatim string
- lastSkipVerbStringContext=YY_START;
- pSkipVerbString=&current->initializer;
+ yyextra->lastSkipVerbStringContext=YY_START;
+ yyextra->pSkipVerbString=&yyextra->current->initializer;
BEGIN(SkipVerbString);
}
}
<SkipVerbString>[^\n"]+ {
- *pSkipVerbString+=yytext;
+ *yyextra->pSkipVerbString+=yytext;
}
<SkipVerbString>"\"\"" { // quote escape
- *pSkipVerbString+=yytext;
+ *yyextra->pSkipVerbString+=yytext;
}
<SkipVerbString>"\"" {
- *pSkipVerbString+=*yytext;
- BEGIN(lastSkipVerbStringContext);
+ *yyextra->pSkipVerbString+=*yytext;
+ BEGIN(yyextra->lastSkipVerbStringContext);
}
<SkipVerbString>\n {
- *pSkipVerbString+=*yytext;
- lineCount();
+ *yyextra->pSkipVerbString+=*yytext;
+ lineCount(yyscanner);
}
<SkipVerbString>. {
- *pSkipVerbString+=*yytext;
+ *yyextra->pSkipVerbString+=*yytext;
}
<ReadInitializer>"?>" {
- if (insidePHP)
+ if (yyextra->insidePHP)
BEGIN( FindMembersPHP );
else
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
<ReadInitializer>. {
- current->initializer+=*yytext;
+ yyextra->current->initializer+=*yytext;
}
/* generic quoted string copy rules */
<CopyString,CopyPHPString>\\. {
- *pCopyQuotedString+=yytext;
+ *yyextra->pCopyQuotedString+=yytext;
}
<CopyString>\" {
- *pCopyQuotedString+=*yytext;
- BEGIN( lastStringContext );
+ *yyextra->pCopyQuotedString+=*yytext;
+ BEGIN( yyextra->lastStringContext );
}
<CopyPHPString>\' {
- *pCopyQuotedString+=*yytext;
- BEGIN( lastStringContext );
+ *yyextra->pCopyQuotedString+=*yytext;
+ BEGIN( yyextra->lastStringContext );
}
<CopyString,CopyPHPString>"/*"|"*/"|"//" {
- *pCopyQuotedString+=yytext;
+ *yyextra->pCopyQuotedString+=yytext;
}
<CopyString,CopyPHPString>\n {
- *pCopyQuotedString+=*yytext;
- lineCount();
+ *yyextra->pCopyQuotedString+=*yytext;
+ lineCount(yyscanner);
}
<CopyString,CopyPHPString>. {
- *pCopyQuotedString+=*yytext;
+ *yyextra->pCopyQuotedString+=*yytext;
}
/* generic quoted growable string copy rules */
<CopyGString,CopyPHPGString>\\. {
- *pCopyQuotedGString+=yytext;
+ *yyextra->pCopyQuotedGString+=yytext;
}
<CopyGString>\" {
- *pCopyQuotedGString+=*yytext;
- BEGIN( lastStringContext );
+ *yyextra->pCopyQuotedGString+=*yytext;
+ BEGIN( yyextra->lastStringContext );
}
<CopyPHPGString>\' {
- *pCopyQuotedGString+=*yytext;
- BEGIN( lastStringContext );
+ *yyextra->pCopyQuotedGString+=*yytext;
+ BEGIN( yyextra->lastStringContext );
}
<CopyGString,CopyPHPGString>"<?php" { // we had an odd number of quotes.
- *pCopyQuotedGString += yytext;
- BEGIN( lastStringContext );
+ *yyextra->pCopyQuotedGString += yytext;
+ BEGIN( yyextra->lastStringContext );
}
<CopyGString,CopyPHPGString>"/*"|"*/"|"//" {
- *pCopyQuotedGString+=yytext;
+ *yyextra->pCopyQuotedGString+=yytext;
}
<CopyGString,CopyPHPGString>\n {
- *pCopyQuotedGString+=*yytext;
- lineCount();
+ *yyextra->pCopyQuotedGString+=*yytext;
+ lineCount(yyscanner);
}
<CopyGString,CopyPHPGString>. {
- *pCopyQuotedGString+=*yytext;
+ *yyextra->pCopyQuotedGString+=*yytext;
}
/* generic round bracket list copy rules */
<CopyRound>\" {
- *pCopyRoundString+=*yytext;
- pCopyQuotedString=pCopyRoundString;
- lastStringContext=YY_START;
+ *yyextra->pCopyRoundString+=*yytext;
+ yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyString);
}
<CopyRound>"(" {
- *pCopyRoundString+=*yytext;
- roundCount++;
+ *yyextra->pCopyRoundString+=*yytext;
+ yyextra->roundCount++;
}
<CopyRound>")" {
- *pCopyRoundString+=*yytext;
- if (--roundCount<0)
- BEGIN(lastRoundContext);
+ *yyextra->pCopyRoundString+=*yytext;
+ if (--yyextra->roundCount<0)
+ BEGIN(yyextra->lastRoundContext);
}
<CopyRound>\n {
- lineCount();
- *pCopyRoundString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopyRoundString+=*yytext;
}
<CopyRound>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- current->initializer+=yytext;
- pCopyQuotedString = pCopyRoundString;
- lastStringContext=YY_START;
+ yyextra->current->initializer+=yytext;
+ yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
- *pCopyRoundString+=yytext;
+ *yyextra->pCopyRoundString+=yytext;
}
}
<CopyRound>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *pCopyRoundString+=yytext;
+ *yyextra->pCopyRoundString+=yytext;
}
}
<CopyRound>[^"'()\n]+ {
- *pCopyRoundString+=yytext;
+ *yyextra->pCopyRoundString+=yytext;
}
<CopyRound>. {
- *pCopyRoundString+=*yytext;
+ *yyextra->pCopyRoundString+=*yytext;
}
/* generic round bracket list copy rules for growable strings */
<GCopyRound>\" {
- *pCopyRoundGString+=*yytext;
- pCopyQuotedGString=pCopyRoundGString;
- lastStringContext=YY_START;
+ *yyextra->pCopyRoundGString+=*yytext;
+ yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopyRound>"(" {
- *pCopyRoundGString+=*yytext;
- roundCount++;
+ *yyextra->pCopyRoundGString+=*yytext;
+ yyextra->roundCount++;
}
<GCopyRound>")" {
- *pCopyRoundGString+=*yytext;
- if (--roundCount<0)
- BEGIN(lastRoundContext);
+ *yyextra->pCopyRoundGString+=*yytext;
+ if (--yyextra->roundCount<0)
+ BEGIN(yyextra->lastRoundContext);
}
<GCopyRound>\n {
- lineCount();
- *pCopyRoundGString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopyRoundGString+=*yytext;
}
<GCopyRound>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- current->initializer+=yytext;
- pCopyQuotedGString = pCopyRoundGString;
- lastStringContext=YY_START;
+ yyextra->current->initializer+=yytext;
+ yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- *pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString+=yytext;
}
}
<GCopyRound>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString+=yytext;
}
}
<GCopyRound>[^"'()\n/]+ {
- *pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString+=yytext;
}
<GCopyRound>. {
- *pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString+=*yytext;
}
/* generic square bracket list copy rules for growable strings, we should only enter here in case of php, left the test part as in GCopyRound to keep it compatible with the round bracket version */
<GCopySquare>\" {
- *pCopySquareGString+=*yytext;
- pCopyQuotedGString=pCopySquareGString;
- lastStringContext=YY_START;
+ *yyextra->pCopySquareGString+=*yytext;
+ yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopySquare>"[" {
- *pCopySquareGString+=*yytext;
- squareCount++;
+ *yyextra->pCopySquareGString+=*yytext;
+ yyextra->squareCount++;
}
<GCopySquare>"]" {
- *pCopySquareGString+=*yytext;
- if (--squareCount<0)
- BEGIN(lastSquareContext);
+ *yyextra->pCopySquareGString+=*yytext;
+ if (--yyextra->squareCount<0)
+ BEGIN(yyextra->lastSquareContext);
}
<GCopySquare>\n {
- lineCount();
- *pCopySquareGString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopySquareGString+=*yytext;
}
<GCopySquare>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- current->initializer+=yytext;
- pCopyQuotedGString = pCopySquareGString;
- lastStringContext=YY_START;
+ yyextra->current->initializer+=yytext;
+ yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- *pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString+=yytext;
}
}
<GCopySquare>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString+=yytext;
}
}
<GCopySquare>[^"\[\]\n/]+ {
- *pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString+=yytext;
}
<GCopySquare>. {
- *pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString+=*yytext;
}
/* generic curly bracket list copy rules */
<CopyCurly>\" {
- *pCopyCurlyString+=*yytext;
- pCopyQuotedString=pCopyCurlyString;
- lastStringContext=YY_START;
+ *yyextra->pCopyCurlyString+=*yytext;
+ yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyString);
}
<CopyCurly>\' {
- *pCopyCurlyString+=*yytext;
- if (insidePHP)
+ *yyextra->pCopyCurlyString+=*yytext;
+ if (yyextra->insidePHP)
{
- pCopyQuotedString=pCopyCurlyString;
- lastStringContext=YY_START;
+ yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<CopyCurly>"{" {
- *pCopyCurlyString+=*yytext;
- curlyCount++;
+ *yyextra->pCopyCurlyString+=*yytext;
+ yyextra->curlyCount++;
}
<CopyCurly>"}" {
- *pCopyCurlyString+=*yytext;
- if (--curlyCount<0)
- BEGIN(lastCurlyContext);
+ *yyextra->pCopyCurlyString+=*yytext;
+ if (--yyextra->curlyCount<0)
+ BEGIN(yyextra->lastCurlyContext);
}
-<CopyCurly>{CHARLIT} { if (insidePHP)
+<CopyCurly>{CHARLIT} { if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *pCopyCurlyString+=yytext;
+ *yyextra->pCopyCurlyString+=yytext;
}
}
<CopyCurly>[^"'{}\/\n]+ {
- *pCopyCurlyString+=yytext;
+ *yyextra->pCopyCurlyString+=yytext;
}
-<CopyCurly>"/" { *pCopyCurlyString+=yytext; }
+<CopyCurly>"/" { *yyextra->pCopyCurlyString+=yytext; }
<CopyCurly>\n {
- lineCount();
- *pCopyCurlyString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopyCurlyString+=*yytext;
}
<CopyCurly>. {
- *pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString+=*yytext;
}
/* generic curly bracket list copy rules for growable strings */
@@ -3333,444 +3015,444 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
QCString line = QCString(yytext);
int s = line.find(' ');
int e = line.find('"',s);
- yyLineNr = line.mid(s,e-s).toInt();
+ yyextra->yyLineNr = line.mid(s,e-s).toInt();
if (yytext[yyleng-1]=='\n')
{
- lineCount();
- g_column=0;
+ lineCount(yyscanner);
+ yyextra->column=0;
}
}
<GCopyCurly>\" {
- *pCopyCurlyGString+=*yytext;
- pCopyQuotedGString=pCopyCurlyGString;
- lastStringContext=YY_START;
+ *yyextra->pCopyCurlyGString+=*yytext;
+ yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopyCurly>\' {
- *pCopyCurlyGString+=*yytext;
- if (insidePHP)
+ *yyextra->pCopyCurlyGString+=*yytext;
+ if (yyextra->insidePHP)
{
- pCopyQuotedGString=pCopyCurlyGString;
- lastStringContext=YY_START;
+ yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
}
<GCopyCurly>"{" {
- *pCopyCurlyGString+=*yytext;
- curlyCount++;
+ *yyextra->pCopyCurlyGString+=*yytext;
+ yyextra->curlyCount++;
}
<GCopyCurly>"}" {
- *pCopyCurlyGString+=*yytext;
- if (--curlyCount<0)
- BEGIN(lastCurlyContext);
+ *yyextra->pCopyCurlyGString+=*yytext;
+ if (--yyextra->curlyCount<0)
+ BEGIN(yyextra->lastCurlyContext);
}
-<GCopyCurly>{CHARLIT} { if (insidePHP)
+<GCopyCurly>{CHARLIT} { if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString+=yytext;
}
}
<GCopyCurly>[^"'{}\/\n,]+ {
- *pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString+=yytext;
}
<GCopyCurly>[,]+ {
- *pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString+=yytext;
}
-<GCopyCurly>"/" { *pCopyCurlyGString+=yytext; }
+<GCopyCurly>"/" { *yyextra->pCopyCurlyGString+=yytext; }
<GCopyCurly>\n {
- lineCount();
- *pCopyCurlyGString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->pCopyCurlyGString+=*yytext;
}
<GCopyCurly>. {
- *pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString+=*yytext;
}
/* ---------------------- */
<FindMembers>":" {
- if (current->type.isEmpty() &&
- current->name=="enum") // see bug 69041, C++11 style anon enum: 'enum : unsigned int {...}'
+ if (yyextra->current->type.isEmpty() &&
+ yyextra->current->name=="enum") // see bug 69041, C++11 style anon enum: 'enum : unsigned int {...}'
{
- current->section=Entry::ENUM_SEC;
- current->name.resize(0);
- current->args.resize(0);
+ yyextra->current->section=Entry::ENUM_SEC;
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
BEGIN(EnumBaseType);
}
else
{
- if (current->type.isEmpty()) // anonymous padding field, e.g. "int :7;"
+ if (yyextra->current->type.isEmpty()) // anonymous padding field, e.g. "int :7;"
{
- addType();
- current->name.sprintf("__pad%d__",padCount++);
+ addType(yyscanner);
+ yyextra->current->name.sprintf("__pad%d__",yyextra->padCount++);
}
BEGIN(BitFields);
- current->bitfields+=":";
+ yyextra->current->bitfields+=":";
}
}
<BitFields>. {
- current->bitfields+=*yytext;
+ yyextra->current->bitfields+=*yytext;
}
<EnumBaseType>. {
- current->args+=*yytext;
+ yyextra->current->args+=*yytext;
}
<EnumBaseType>\n {
- lineCount();
- current->args+=' ';
+ lineCount(yyscanner);
+ yyextra->current->args+=' ';
}
<FindMembers>[;,] {
- QCString oldType = current->type;
- if (current->bodyLine==-1)
+ QCString oldType = yyextra->current->type;
+ if (yyextra->current->bodyLine==-1)
{
- current->bodyLine = yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
}
- if ( insidePHP && current->type.left(3) == "var" )
+ if ( yyextra->insidePHP && yyextra->current->type.left(3) == "var" )
{
- current->type = current->type.mid(3);
+ yyextra->current->type = yyextra->current->type.mid(3);
}
- if (isTypedef && current->type.left(8)!="typedef ")
+ if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
- current->type.prepend("typedef ");
+ yyextra->current->type.prepend("typedef ");
}
- bool stat = current->stat;
- if (!current->name.isEmpty() && current->section!=Entry::ENUM_SEC)
+ bool stat = yyextra->current->stat;
+ if (!yyextra->current->name.isEmpty() && yyextra->current->section!=Entry::ENUM_SEC)
{
- current->type=current->type.simplifyWhiteSpace();
- current->args=removeRedundantWhiteSpace(current->args);
- current->name=current->name.stripWhiteSpace();
- if (current->section==Entry::CLASS_SEC) // remove spec for "struct Bla bla;"
+ yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
+ yyextra->current->args=removeRedundantWhiteSpace(yyextra->current->args);
+ yyextra->current->name=yyextra->current->name.stripWhiteSpace();
+ if (yyextra->current->section==Entry::CLASS_SEC) // remove spec for "struct Bla bla;"
{
- current->spec = 0;
+ yyextra->current->spec = 0;
}
- current->section = Entry::VARIABLE_SEC ;
- current->fileName = yyFileName;
- current->startLine = yyBegLineNr;
- current->startColumn = yyBegColNr;
- current_root->moveToSubEntryAndRefresh( current ) ;
- initEntry();
+ yyextra->current->section = Entry::VARIABLE_SEC ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyBegLineNr;
+ yyextra->current->startColumn = yyextra->yyBegColNr;
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
}
if ( *yytext == ',')
{
- current->stat = stat; // the static attribute holds for all variables
- current->name.resize(0);
- current->args.resize(0);
- current->brief.resize(0);
- current->doc.resize(0);
- current->initializer.resize(0);
- current->bitfields.resize(0);
+ yyextra->current->stat = stat; // the static attribute holds for all variables
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->brief.resize(0);
+ yyextra->current->doc.resize(0);
+ yyextra->current->initializer.resize(0);
+ yyextra->current->bitfields.resize(0);
int i=oldType.length();
while (i>0 && (oldType[i-1]=='*' || oldType[i-1]=='&' || oldType[i-1]==' ')) i--;
- current->type = oldType.left(i);
+ yyextra->current->type = oldType.left(i);
}
else
{
- mtype = Method;
- virt = Normal;
- current->groups.clear();
- initEntry();
+ yyextra->mtype = Method;
+ yyextra->virt = Normal;
+ yyextra->current->groups.clear();
+ initEntry(yyscanner);
}
}
<FindMembers>"[" {
- if (insideSlice)
+ if (yyextra->insideSlice)
{
- squareCount=1;
- lastSquareContext = YY_START;
- current->metaData += "[";
+ yyextra->squareCount=1;
+ yyextra->lastSquareContext = YY_START;
+ yyextra->current->metaData += "[";
BEGIN( SliceMetadata );
}
- else if (!insideCS &&
- (current->name.isEmpty() ||
- current->name=="typedef"
+ else if (!yyextra->insideCS &&
+ (yyextra->current->name.isEmpty() ||
+ yyextra->current->name=="typedef"
)
) // IDL function property
{
- squareCount=1;
- lastSquareContext = YY_START;
- idlAttr.resize(0);
- idlProp.resize(0);
- current->mtype = mtype;
+ yyextra->squareCount=1;
+ yyextra->lastSquareContext = YY_START;
+ yyextra->idlAttr.resize(0);
+ yyextra->idlProp.resize(0);
+ yyextra->current->mtype = yyextra->mtype;
if (Config_getBool(IDL_PROPERTY_SUPPORT) &&
- current->mtype == Property)
- { // we are inside the properties section of a dispinterface
- odlProp = true;
- current->spec |= Entry::Gettable;
- current->spec |= Entry::Settable;
+ yyextra->current->mtype == Property)
+ { // we are yyextra->inside the properties section of a dispinterface
+ yyextra->odlProp = true;
+ yyextra->current->spec |= Entry::Gettable;
+ yyextra->current->spec |= Entry::Settable;
}
BEGIN( IDLAttribute );
}
- else if (insideCS &&
- current->name.isEmpty())
+ else if (yyextra->insideCS &&
+ yyextra->current->name.isEmpty())
{
- squareCount=1;
- lastSquareContext = YY_START;
+ yyextra->squareCount=1;
+ yyextra->lastSquareContext = YY_START;
// Skip the C# attribute
// for this member
- current->args.resize(0);
+ yyextra->current->args.resize(0);
BEGIN( SkipSquare );
}
else
{
- current->args += yytext ;
- squareCount=1;
- externC=FALSE; // see bug759247
+ yyextra->current->args += yytext ;
+ yyextra->squareCount=1;
+ yyextra->externC=FALSE; // see bug759247
BEGIN( Array ) ;
}
}
<SliceMetadata>"[" { // Global metadata.
- squareCount++;
- current->metaData += "[";
+ yyextra->squareCount++;
+ yyextra->current->metaData += "[";
}
<SliceMetadata>{BN}* {
- lineCount();
+ lineCount(yyscanner);
}
<SliceMetadata>\"[^\"]*\" {
- current->metaData += yytext;
+ yyextra->current->metaData += yytext;
}
<SliceMetadata>"," {
- current->metaData += yytext;
+ yyextra->current->metaData += yytext;
}
<SliceMetadata>"]" {
- current->metaData += yytext;
- if (--squareCount<=0)
+ yyextra->current->metaData += yytext;
+ if (--yyextra->squareCount<=0)
{
- BEGIN (lastSquareContext);
+ BEGIN (yyextra->lastSquareContext);
}
}
<SliceOptional>"(" {
- current->type += "(";
- roundCount++;
+ yyextra->current->type += "(";
+ yyextra->roundCount++;
}
<SliceOptional>[0-9]+ {
- current->type += yytext;
+ yyextra->current->type += yytext;
}
<SliceOptional>")" {
- current->type += ")";
- if(--roundCount<=0)
+ yyextra->current->type += ")";
+ if(--yyextra->roundCount<=0)
{
- BEGIN (lastModifierContext);
+ BEGIN (yyextra->lastModifierContext);
}
}
<IDLAttribute>"]" {
// end of IDL function attribute
- if (--squareCount<=0)
+ if (--yyextra->squareCount<=0)
{
- lineCount();
- if (current->mtype == Property)
+ lineCount(yyscanner);
+ if (yyextra->current->mtype == Property)
BEGIN( IDLPropName );
else
- BEGIN( lastSquareContext );
+ BEGIN( yyextra->lastSquareContext );
}
}
<IDLAttribute>"propput" {
if (Config_getBool(IDL_PROPERTY_SUPPORT))
{
- current->mtype = Property;
+ yyextra->current->mtype = Property;
}
- current->spec |= Entry::Settable;
+ yyextra->current->spec |= Entry::Settable;
}
<IDLAttribute>"propget" {
if (Config_getBool(IDL_PROPERTY_SUPPORT))
{
- current->mtype = Property;
+ yyextra->current->mtype = Property;
}
- current->spec |= Entry::Gettable;
+ yyextra->current->spec |= Entry::Gettable;
}
<IDLAttribute>"property" { // UNO IDL property
- current->spec |= Entry::Property;
+ yyextra->current->spec |= Entry::Property;
}
<IDLAttribute>"attribute" { // UNO IDL attribute
- current->spec |= Entry::Attribute;
+ yyextra->current->spec |= Entry::Attribute;
}
<IDLAttribute>"optional" { // on UNO IDL interface/service/attribute/property
- current->spec |= Entry::Optional;
+ yyextra->current->spec |= Entry::Optional;
}
<IDLAttribute>"readonly" { // on UNO IDL attribute or property
- if (Config_getBool(IDL_PROPERTY_SUPPORT) && odlProp)
+ if (Config_getBool(IDL_PROPERTY_SUPPORT) && yyextra->odlProp)
{
- current->spec ^= Entry::Settable;
+ yyextra->current->spec ^= Entry::Settable;
}
else
{
- current->spec |= Entry::Readonly;
+ yyextra->current->spec |= Entry::Readonly;
}
}
<IDLAttribute>"bound" { // on UNO IDL attribute or property
- current->spec |= Entry::Bound;
+ yyextra->current->spec |= Entry::Bound;
}
<IDLAttribute>"removable" { // on UNO IDL property
- current->spec |= Entry::Removable;
+ yyextra->current->spec |= Entry::Removable;
}
<IDLAttribute>"constrained" { // on UNO IDL property
- current->spec |= Entry::Constrained;
+ yyextra->current->spec |= Entry::Constrained;
}
<IDLAttribute>"transient" { // on UNO IDL property
- current->spec |= Entry::Transient;
+ yyextra->current->spec |= Entry::Transient;
}
<IDLAttribute>"maybevoid" { // on UNO IDL property
- current->spec |= Entry::MaybeVoid;
+ yyextra->current->spec |= Entry::MaybeVoid;
}
<IDLAttribute>"maybedefault" { // on UNO IDL property
- current->spec |= Entry::MaybeDefault;
+ yyextra->current->spec |= Entry::MaybeDefault;
}
<IDLAttribute>"maybeambiguous" { // on UNO IDL property
- current->spec |= Entry::MaybeAmbiguous;
+ yyextra->current->spec |= Entry::MaybeAmbiguous;
}
<IDLAttribute>. {
}
<IDLPropName>{BN}*{ID}{BN}* {
// return type (probably HRESULT) - skip it
- if (odlProp)
+ if (yyextra->odlProp)
{ // property type
- idlProp = yytext;
+ yyextra->idlProp = yytext;
}
}
<IDLPropName>{ID}{BN}*"(" {
- current->name = yytext;
- current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
BEGIN( IDLProp );
}
<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
- if (odlProp)
+ if (yyextra->odlProp)
{
- idlProp += yytext;
+ yyextra->idlProp += yytext;
}
}
<IDLPropName>{ID}{BN}*/";" {
- if (odlProp)
+ if (yyextra->odlProp)
{
- current->name = yytext;
- idlProp = idlProp.stripWhiteSpace();
- odlProp = false;
+ yyextra->current->name = yytext;
+ yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
+ yyextra->odlProp = false;
BEGIN( IDLProp );
}
}
<IDLProp>{BN}*"["[^\]]*"]"{BN}* { // attribute of a parameter
- idlAttr = yytext;
- idlAttr=idlAttr.stripWhiteSpace();
+ yyextra->idlAttr = yytext;
+ yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
}
<IDLProp>{ID} { // property type
- idlProp = yytext;
+ yyextra->idlProp = yytext;
}
<IDLProp>{BN}*{ID}{BN}*"," { // Rare: Another parameter ([propput] HRESULT Item(int index, [in] Type theRealProperty);)
- if (!current->args)
- current->args = "(";
+ if (!yyextra->current->args)
+ yyextra->current->args = "(";
else
- current->args += ", ";
- current->args += idlAttr;
- current->args += " ";
- current->args += idlProp; // prop was actually type of extra parameter
- current->args += " ";
- current->args += yytext;
- current->args = current->args.left(current->args.length() - 1); // strip comma
- idlProp.resize(0);
- idlAttr.resize(0);
+ yyextra->current->args += ", ";
+ yyextra->current->args += yyextra->idlAttr;
+ yyextra->current->args += " ";
+ yyextra->current->args += yyextra->idlProp; // prop was actually type of extra parameter
+ yyextra->current->args += " ";
+ yyextra->current->args += yytext;
+ yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1); // strip comma
+ yyextra->idlProp.resize(0);
+ yyextra->idlAttr.resize(0);
BEGIN( IDLProp );
}
<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
// the parameter name for the property - just skip.
}
<IDLProp>";" {
- current->fileName = yyFileName;
- current->type = idlProp;
- current->args = current->args.simplifyWhiteSpace();
- if (current->args)
- current->args += ")";
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->type = yyextra->idlProp;
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ if (yyextra->current->args)
+ yyextra->current->args += ")";
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN( FindMembers );
}
<IDLProp>. { // spaces, *, or other stuff
- //idlProp+=yytext;
+ //yyextra->idlProp+=yytext;
}
-<Array>"]" { current->args += *yytext ;
- if (--squareCount<=0)
+<Array>"]" { yyextra->current->args += *yytext ;
+ if (--yyextra->squareCount<=0)
BEGIN( FindMembers ) ;
}
-<FuncFuncArray>"]" { current->args += *yytext ;
- if (--squareCount<=0)
+<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
+ if (--yyextra->squareCount<=0)
BEGIN( Function ) ;
}
-<Array,FuncFuncArray>"[" { current->args += *yytext ;
- squareCount++;
+<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
+ yyextra->squareCount++;
}
-<Array,FuncFuncArray>. { current->args += *yytext ; }
-<SkipSquare>"[" { squareCount++; }
+<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
+<SkipSquare>"[" { yyextra->squareCount++; }
<SkipSquare>"]" {
- if (--squareCount<=0)
- BEGIN( lastSquareContext );
+ if (--yyextra->squareCount<=0)
+ BEGIN( yyextra->lastSquareContext );
}
<SkipSquare>\" {
- lastStringContext=YY_START;
+ yyextra->lastStringContext=YY_START;
BEGIN( SkipString );
}
<SkipSquare>[^\n\[\]\"]+
-<FindMembers>"<" { addType();
- current->type += yytext ;
+<FindMembers>"<" { addType(yyscanner);
+ yyextra->current->type += yytext ;
BEGIN( Sharp ) ;
}
-<Sharp>">" { current->type += *yytext ;
- if (--sharpCount<=0)
+<Sharp>">" { yyextra->current->type += *yytext ;
+ if (--yyextra->sharpCount<=0)
BEGIN( FindMembers ) ;
}
-<Sharp>"<" { current->type += *yytext ;
- sharpCount++;
+<Sharp>"<" { yyextra->current->type += *yytext ;
+ yyextra->sharpCount++;
}
<Sharp>{BN}+ {
- current->type += ' ';
- lineCount();
+ yyextra->current->type += ' ';
+ lineCount(yyscanner);
}
-<Sharp>. { current->type += *yytext ; }
+<Sharp>. { yyextra->current->type += *yytext ; }
<FindFields>{ID} {
- if (insideCpp || insideObjC)
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
- current->bodyLine = yyLineNr;
- current->name = yytext;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->name = yytext;
}
<FindFields>"(" {
// Java enum initializer
unput('(');
- lastInitializerContext = YY_START;
- initBracketCount=0;
- current->initializer = "=";
+ yyextra->lastInitializerContext = YY_START;
+ yyextra->initBracketCount=0;
+ yyextra->current->initializer = "=";
BEGIN(ReadInitializer);
}
<FindFields>"=" {
- lastInitializerContext = YY_START;
- initBracketCount=0;
- current->initializer = yytext;
+ yyextra->lastInitializerContext = YY_START;
+ yyextra->initBracketCount=0;
+ yyextra->current->initializer = yytext;
BEGIN(ReadInitializer);
}
<FindFields>";" {
- if (insideJava) // last enum field in Java class
+ if (yyextra->insideJava) // yyextra->last enum field in Java class
{
- if (!current->name.isEmpty())
+ if (!yyextra->current->name.isEmpty())
{
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- if (!(current_root->spec&Entry::Enum))
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ if (!(yyextra->current_root->spec&Entry::Enum))
{
- current->type = "@"; // enum marker
+ yyextra->current->type = "@"; // enum marker
}
- current->args = current->args.simplifyWhiteSpace();
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
}
BEGIN( FindMembers );
@@ -3781,70 +3463,70 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<SkipRemainder>\n {
- lineCount();
+ lineCount(yyscanner);
}
<SkipRemainder>[^\n]*
<FindFields>"," {
//printf("adding '%s' '%s' '%s' to enum '%s' (mGrpId=%d)\n",
- // current->type.data(), current->name.data(),
- // current->args.data(), current_root->name.data(),current->mGrpId);
- if (!current->name.isEmpty())
- {
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->startColumn = yyColNr;
- if (!(current_root->spec&Entry::Enum))
+ // yyextra->current->type.data(), yyextra->current->name.data(),
+ // yyextra->current->args.data(), yyextra->current_root->name.data(),yyextra->current->mGrpId);
+ if (!yyextra->current->name.isEmpty())
+ {
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ if (!(yyextra->current_root->spec&Entry::Enum))
{
- current->type = "@"; // enum marker
+ yyextra->current->type = "@"; // enum marker
}
- current->args = current->args.simplifyWhiteSpace();
- current->name = current->name.stripWhiteSpace();
- current->section = Entry::VARIABLE_SEC;
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->section = Entry::VARIABLE_SEC;
// add to the scope of the enum
- if (!insideCS && !insideJava &&
- !(current_root->spec&Entry::Strong))
+ if (!yyextra->insideCS && !yyextra->insideJava &&
+ !(yyextra->current_root->spec&Entry::Strong))
// for C# and Java 1.5+ enum values always have to be explicitly qualified,
// same for C++11 style enums (enum class Name {})
{
// add to the scope surrounding the enum (copy!)
// we cannot during it directly as that would invalidate the iterator in parseCompounds.
- //printf("*** adding outer scope entry for %s\n",current->name.data());
- g_outerScopeEntries.emplace_back(current_root->parent(), std::make_unique<Entry>(*current));
+ //printf("*** adding outer scope entry for %s\n",yyextra->current->name.data());
+ yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
}
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
}
else // probably a redundant ,
{
- current->reset();
- initEntry();
+ yyextra->current->reset();
+ initEntry(yyscanner);
}
}
<FindFields>"[" { // attribute list in IDL
- squareCount=1;
- lastSquareContext = YY_START;
+ yyextra->squareCount=1;
+ yyextra->lastSquareContext = YY_START;
BEGIN(SkipSquare);
}
/*
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
*/
-<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<]* { current->program += yytext ; }
-<ReadBody,ReadNSBody,ReadBodyIntf>"//".* { current->program += yytext ; }
-<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (!insidePHP)
+<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<]* { yyextra->current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"//".* { yyextra->current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (!yyextra->insidePHP)
REJECT;
// append PHP comment.
- current->program += yytext ;
+ yyextra->current->program += yytext ;
}
-<ReadBody,ReadNSBody,ReadBodyIntf>@\" { current->program += yytext ;
- pSkipVerbString = &current->program;
- lastSkipVerbStringContext=YY_START;
+<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program += yytext ;
+ yyextra->pSkipVerbString = &yyextra->current->program;
+ yyextra->lastSkipVerbStringContext=YY_START;
BEGIN( SkipVerbString );
}
-<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" { if (insidePHP)
+<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" { if (yyextra->insidePHP)
{
- current->program += yytext ;
- pCopyHereDocGString = &current->program;
- lastHereDocContext=YY_START;
+ yyextra->current->program += yytext ;
+ yyextra->pCopyHereDocGString = &yyextra->current->program;
+ yyextra->lastHereDocContext=YY_START;
BEGIN( CopyHereDoc );
}
else
@@ -3852,154 +3534,155 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
REJECT;
}
}
-<ReadBody,ReadNSBody,ReadBodyIntf>\" { current->program += yytext ;
- pCopyQuotedGString = &current->program;
- lastStringContext=YY_START;
+<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program += yytext ;
+ yyextra->pCopyQuotedGString = &yyextra->current->program;
+ yyextra->lastStringContext=YY_START;
BEGIN( CopyGString );
}
-<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{B}* { current->program += yytext ;
- lastContext = YY_START ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{B}* { yyextra->current->program += yytext ;
+ yyextra->lastContext = YY_START ;
BEGIN( Comment ) ;
}
-<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{BL} { current->program += yytext ;
- ++yyLineNr ;
- lastContext = YY_START ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{BL} { yyextra->current->program += yytext ;
+ ++yyextra->yyLineNr ;
+ yyextra->lastContext = YY_START ;
BEGIN( Comment ) ;
}
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
{
- current->program += yytext;
+ yyextra->current->program += yytext;
}
else
{ // begin of single quoted string
- current->program += yytext;
- pCopyQuotedGString = &current->program;
- lastStringContext=YY_START;
+ yyextra->current->program += yytext;
+ yyextra->pCopyQuotedGString = &yyextra->current->program;
+ yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
}
<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT; // for PHP code single quotes
// are used for strings of arbitrary length
}
else
{
- current->program += yytext;
+ yyextra->current->program += yytext;
}
}
-<ReadBody,ReadNSBody,ReadBodyIntf>"{" { current->program += yytext ;
- ++curlyCount ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program += yytext ;
+ ++yyextra->curlyCount ;
}
<ReadBodyIntf>"}" {
- current->program += yytext ;
- --curlyCount ;
+ yyextra->current->program += yytext ;
+ --yyextra->curlyCount ;
}
-<ReadBody,ReadNSBody>"}" { //err("ReadBody count=%d\n",curlyCount);
- if ( curlyCount>0 )
+<ReadBody,ReadNSBody>"}" { //err("ReadBody count=%d\n",yyextra->curlyCount);
+ if ( yyextra->curlyCount>0 )
{
- current->program += yytext ;
- --curlyCount ;
+ yyextra->current->program += yytext ;
+ --yyextra->curlyCount ;
}
else
{
- current->endBodyLine = yyLineNr;
- Entry * original_root = current_root; // save root this namespace is in
- if (current->section == Entry::NAMESPACE_SEC && current->type == "namespace")
+ yyextra->current->endBodyLine = yyextra->yyLineNr;
+ std::shared_ptr<Entry> original_root = yyextra->current_root; // save root this namespace is in
+ if (yyextra->current->section == Entry::NAMESPACE_SEC && yyextra->current->type == "namespace")
{
int split_point;
// save documentation values
- QCString doc = current->doc;
- int docLine = current->docLine;
- QCString docFile = current->docFile;
- QCString brief = current->brief;
- int briefLine = current->briefLine;
- QCString briefFile = current->briefFile;
+ QCString doc = yyextra->current->doc;
+ int docLine = yyextra->current->docLine;
+ QCString docFile = yyextra->current->docFile;
+ QCString brief = yyextra->current->brief;
+ int briefLine = yyextra->current->briefLine;
+ QCString briefFile = yyextra->current->briefFile;
// reset documentation values
- current->doc = "";
- current->docLine = 0;
- current->docFile = "";
- current->brief = "";
- current->briefLine = 0;
- current->briefFile = "";
- while ((split_point = current->name.find("::")) != -1)
+ yyextra->current->doc = "";
+ yyextra->current->docLine = 0;
+ yyextra->current->docFile = "";
+ yyextra->current->brief = "";
+ yyextra->current->briefLine = 0;
+ yyextra->current->briefFile = "";
+ while ((split_point = yyextra->current->name.find("::")) != -1)
{
- std::unique_ptr<Entry> new_current = std::make_unique<Entry>(*current);
- current->program = "";
- new_current->name = current->name.mid(split_point + 2);
- current->name = current->name.left(split_point);
- if (!current_root->name.isEmpty()) current->name.prepend(current_root->name+"::");
-
- Entry *tmp = current.get();
- current_root->moveToSubEntryAndKeep(current);
- current_root = tmp;
- current.swap(new_current);
+ std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
+ yyextra->current->program = "";
+ new_current->name = yyextra->current->name.mid(split_point + 2);
+ yyextra->current->name = yyextra->current->name.left(split_point);
+ if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+"::");
+
+ std::shared_ptr<Entry> tmp = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
+ yyextra->current_root = tmp;
+
+ yyextra->current = new_current;
}
// restore documentation values
- current->doc = doc;
- current->docLine = docLine;
- current->docFile = docFile;
- current->brief = brief;
- current->briefLine = briefLine;
- current->briefFile = briefFile;
+ yyextra->current->doc = doc;
+ yyextra->current->docLine = docLine;
+ yyextra->current->docFile = docFile;
+ yyextra->current->brief = brief;
+ yyextra->current->briefLine = briefLine;
+ yyextra->current->briefFile = briefFile;
}
- QCString &cn = current->name;
- QCString rn = current_root->name.copy();
- //printf("cn='%s' rn='%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
+ QCString &cn = yyextra->current->name;
+ QCString rn = yyextra->current_root->name.copy();
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
if (!cn.isEmpty() && !rn.isEmpty())
{
- prependScope();
+ prependScope(yyscanner);
}
- if (isTypedef && cn.isEmpty())
+ if (yyextra->isTypedef && cn.isEmpty())
{
//printf("Typedef Name\n");
BEGIN( TypedefName );
}
else
{
- if ((current->section == Entry::ENUM_SEC) || (current->spec&Entry::Enum))
+ if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- current->program+=','; // add field terminator
+ yyextra->current->program+=','; // add field terminator
}
// add compound definition to the tree
- current->args=removeRedundantWhiteSpace(current->args);
- // was: current->args.simplifyWhiteSpace();
- current->type = current->type.simplifyWhiteSpace();
- current->name = current->name.stripWhiteSpace();
- //printf("adding '%s' '%s' '%s' brief=%s insideObjC=%d %x\n",current->type.data(),current->name.data(),current->args.data(),current->brief.data(),insideObjC,current->section);
- if (insideObjC &&
- ((current->spec&Entry::Interface) || (current->spec==Entry::Category))
+ yyextra->current->args=removeRedundantWhiteSpace(yyextra->current->args);
+ // was: yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ //printf("adding '%s' '%s' '%s' brief=%s yyextra->insideObjC=%d %x\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data(),yyextra->current->brief.data(),yyextra->insideObjC,yyextra->current->section);
+ if (yyextra->insideObjC &&
+ ((yyextra->current->spec&Entry::Interface) || (yyextra->current->spec==Entry::Category))
) // method definition follows
{
BEGIN( ReadBodyIntf ) ;
}
else
{
- memspecEntry = current.get();
- current_root->copyToSubEntry( current ) ;
- if (current->section==Entry::NAMESPACE_SEC ||
- (current->spec==Entry::Interface) ||
- insideJava || insidePHP || insideCS || insideD || insideJS ||
- insideSlice
+ yyextra->memspecEntry = yyextra->current;
+ yyextra->current_root->copyToSubEntry( yyextra->current ) ;
+ if (yyextra->current->section==Entry::NAMESPACE_SEC ||
+ (yyextra->current->spec==Entry::Interface) ||
+ yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
+ yyextra->insideSlice
)
{ // namespaces and interfaces and java classes ends with a closing bracket without semicolon
- current->reset();
- current_root = original_root; // restore scope from before namespace descent
- initEntry();
- memspecEntry = 0;
+ yyextra->current->reset();
+ yyextra->current_root = original_root; // restore scope from before namespace descent
+ initEntry(yyscanner);
+ yyextra->memspecEntry.reset();
BEGIN( FindMembers ) ;
}
else
{
static QRegExp re("@[0-9]+$");
- if (!isTypedef && memspecEntry &&
- memspecEntry->name.find(re)==-1) // not typedef or anonymous type (see bug691071)
+ if (!yyextra->isTypedef && yyextra->memspecEntry &&
+ yyextra->memspecEntry->name.find(re)==-1) // not typedef or anonymous type (see bug691071)
{
// enabled the next two lines for bug 623424
- current->doc.resize(0);
- current->brief.resize(0);
+ yyextra->current->doc.resize(0);
+ yyextra->current->brief.resize(0);
}
BEGIN( MemberSpec ) ;
}
@@ -4007,113 +3690,113 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
}
-<ReadBody>"}"{BN}+"typedef"{BN}+ { //err("ReadBody count=%d\n",curlyCount);
- lineCount();
- if ( curlyCount>0 )
+<ReadBody>"}"{BN}+"typedef"{BN}+ { //err("ReadBody count=%d\n",yyextra->curlyCount);
+ lineCount(yyscanner);
+ if ( yyextra->curlyCount>0 )
{
- current->program += yytext ;
- --curlyCount ;
+ yyextra->current->program += yytext ;
+ --yyextra->curlyCount ;
}
else
{
- isTypedef = TRUE;
- current->endBodyLine = yyLineNr;
- QCString &cn = current->name;
- QCString rn = current_root->name.copy();
+ yyextra->isTypedef = TRUE;
+ yyextra->current->endBodyLine = yyextra->yyLineNr;
+ QCString &cn = yyextra->current->name;
+ QCString rn = yyextra->current_root->name.copy();
if (!cn.isEmpty() && !rn.isEmpty())
{
- prependScope();
+ prependScope(yyscanner);
}
BEGIN( TypedefName );
}
}
<TypedefName>("const"|"volatile"){BN} { // late "const" or "volatile" keyword
- lineCount();
- current->type.prepend(yytext);
+ lineCount(yyscanner);
+ yyextra->current->type.prepend(yytext);
}
<TypedefName>{ID} {
- if ((current->section == Entry::ENUM_SEC) || (current->spec&Entry::Enum))
+ if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- current->program+=","; // add field terminator
+ yyextra->current->program+=","; // add field terminator
}
- current->name=yytext;
- prependScope();
- current->args = current->args.simplifyWhiteSpace();
- current->type = current->type.simplifyWhiteSpace();
- //printf("Adding compound %s %s %s\n",current->type.data(),current->name.data(),current->args.data());
- if (!firstTypedefEntry)
+ yyextra->current->name=yytext;
+ prependScope(yyscanner);
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
+ //printf("Adding compound %s %s %s\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ if (!yyextra->firstTypedefEntry)
{
- firstTypedefEntry = current.get();
+ yyextra->firstTypedefEntry = yyextra->current;
}
- current_root->moveToSubEntryAndRefresh( current ) ;
- initEntry();
- isTypedef=TRUE; // to undo reset by initEntry()
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
+ yyextra->isTypedef=TRUE; // to undo reset by initEntry(yyscanner)
BEGIN(MemberSpecSkip);
}
<TypedefName>";" { /* typedef of anonymous type */
- current->name.sprintf("@%d",anonCount++);
- if ((current->section == Entry::ENUM_SEC) || (current->spec&Entry::Enum))
+ yyextra->current->name.sprintf("@%d",yyextra->anonCount++);
+ if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- current->program+=','; // add field terminator
+ yyextra->current->program+=','; // add field terminator
}
// add compound definition to the tree
- current->args = current->args.simplifyWhiteSpace();
- current->type = current->type.simplifyWhiteSpace();
- memspecEntry = current.get();
- current_root->moveToSubEntryAndRefresh( current ) ;
- initEntry();
+ yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
+ yyextra->memspecEntry = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
unput(';');
BEGIN( MemberSpec ) ;
}
<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* { // the [] part could be improved.
- lineCount();
+ lineCount(yyscanner);
int i=0,l=(int)yyleng,j;
while (i<l && (!isId(yytext[i]))) i++;
- msName = QCString(yytext).right(l-i).stripWhiteSpace();
- j=msName.find("[");
+ yyextra->msName = QCString(yytext).right(l-i).stripWhiteSpace();
+ j=yyextra->msName.find("[");
if (j!=-1)
{
- msArgs=msName.right(msName.length()-j);
- msName=msName.left(j);
+ yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
+ yyextra->msName=yyextra->msName.left(j);
}
- msType=QCString(yytext).left(i);
+ yyextra->msType=QCString(yytext).left(i);
// handle *pName in: typedef { ... } name, *pName;
- if (firstTypedefEntry)
+ if (yyextra->firstTypedefEntry)
{
- if (firstTypedefEntry->spec&Entry::Struct)
+ if (yyextra->firstTypedefEntry->spec&Entry::Struct)
{
- msType.prepend("struct "+firstTypedefEntry->name);
+ yyextra->msType.prepend("struct "+yyextra->firstTypedefEntry->name);
}
- else if (firstTypedefEntry->spec&Entry::Union)
+ else if (yyextra->firstTypedefEntry->spec&Entry::Union)
{
- msType.prepend("union "+firstTypedefEntry->name);
+ yyextra->msType.prepend("union "+yyextra->firstTypedefEntry->name);
}
- else if (firstTypedefEntry->section==Entry::ENUM_SEC)
+ else if (yyextra->firstTypedefEntry->section==Entry::ENUM_SEC)
{
- msType.prepend("enum "+firstTypedefEntry->name);
+ yyextra->msType.prepend("enum "+yyextra->firstTypedefEntry->name);
}
else
{
- msType.prepend(firstTypedefEntry->name);
+ yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
}
}
}
<MemberSpec>"(" { // function with struct return type
- addType();
- current->name = msName;
- current->spec = 0;
+ addType(yyscanner);
+ yyextra->current->name = yyextra->msName;
+ yyextra->current->spec = 0;
unput('(');
BEGIN(FindMembers);
}
<MemberSpec>[,;] {
- if (msName.isEmpty() && !current->name.isEmpty())
+ if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
{
- // see if the compound does not have a name or is inside another
+ // see if the compound does not have a name or is yyextra->inside another
// anonymous compound. If so we insert a
// special 'anonymous' variable.
- //Entry *p=current_root;
- const Entry *p=current.get();
+ //Entry *p=yyextra->current_root;
+ const Entry *p=yyextra->current.get();
while (p)
{
// only look for class scopes, not namespace scopes
@@ -4124,164 +3807,164 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
int pi = (i==-1) ? 0 : i+2;
if (p->name.at(pi)=='@')
{
- // anonymous compound inside -> insert dummy variable name
+ // anonymous compound yyextra->inside -> insert dummy variable name
//printf("Adding anonymous variable for scope %s\n",p->name.data());
- msName.sprintf("@%d",anonCount++);
+ yyextra->msName.sprintf("@%d",yyextra->anonCount++);
break;
}
}
//p=p->parent;
- if (p==current.get()) p=current_root; else p=p->parent();
+ if (p==yyextra->current.get()) p=yyextra->current_root.get(); else p=p->parent();
}
}
- //printf("msName=%s current->name=%s\n",msName.data(),current->name.data());
- if (!msName.isEmpty()
- /*&& msName!=current->name*/) // skip typedef T {} T;, removed due to bug608493
+ //printf("yyextra->msName=%s yyextra->current->name=%s\n",yyextra->msName.data(),yyextra->current->name.data());
+ if (!yyextra->msName.isEmpty()
+ /*&& yyextra->msName!=yyextra->current->name*/) // skip typedef T {} T;, removed due to bug608493
{
- static bool typedefHidesStruct = Config_getBool(TYPEDEF_HIDES_STRUCT);
+ bool typedefHidesStruct = Config_getBool(TYPEDEF_HIDES_STRUCT);
// case 1: typedef struct _S { ... } S_t;
// -> omit typedef and use S_t as the struct name
if (typedefHidesStruct &&
- isTypedef &&
- ((current->spec&(Entry::Struct|Entry::Union)) ||
- current->section==Entry::ENUM_SEC )&&
- msType.stripWhiteSpace().isEmpty() &&
- memspecEntry)
+ yyextra->isTypedef &&
+ ((yyextra->current->spec&(Entry::Struct|Entry::Union)) ||
+ yyextra->current->section==Entry::ENUM_SEC )&&
+ yyextra->msType.stripWhiteSpace().isEmpty() &&
+ yyextra->memspecEntry)
{
- memspecEntry->name=msName;
+ yyextra->memspecEntry->name=yyextra->msName;
}
else // case 2: create a typedef field
{
- std::unique_ptr<Entry> varEntry=std::make_unique<Entry>();
- varEntry->lang = language;
- varEntry->protection = current->protection ;
- varEntry->mtype = current->mtype;
- varEntry->virt = current->virt;
- varEntry->stat = current->stat;
+ std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
+ varEntry->lang = yyextra->language;
+ varEntry->protection = yyextra->current->protection ;
+ varEntry->mtype = yyextra->current->mtype;
+ varEntry->virt = yyextra->current->virt;
+ varEntry->stat = yyextra->current->stat;
varEntry->section = Entry::VARIABLE_SEC;
- varEntry->name = msName.stripWhiteSpace();
- varEntry->type = current->type.simplifyWhiteSpace()+" ";
- varEntry->args = msArgs;
- if (isTypedef)
+ varEntry->name = yyextra->msName.stripWhiteSpace();
+ varEntry->type = yyextra->current->type.simplifyWhiteSpace()+" ";
+ varEntry->args = yyextra->msArgs;
+ if (yyextra->isTypedef)
{
varEntry->type.prepend("typedef ");
- // //printf("current->name = %s %s\n",current->name.data(),msName.data());
+ // //printf("yyextra->current->name = %s %s\n",yyextra->current->name.data(),yyextra->msName.data());
}
if (typedefHidesStruct &&
- isTypedef &&
- (current->spec&(Entry::Struct|Entry::Union)) &&
- memspecEntry
+ yyextra->isTypedef &&
+ (yyextra->current->spec&(Entry::Struct|Entry::Union)) &&
+ yyextra->memspecEntry
) // case 1: use S_t as type for pS_t in "typedef struct _S {} S_t, *pS_t;"
{
- varEntry->type+=memspecEntry->name+msType;
+ varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
}
else // case 2: use _S as type for for pS_t
{
- varEntry->type+=current->name+msType;
+ varEntry->type+=yyextra->current->name+yyextra->msType;
}
- varEntry->fileName = yyFileName;
- varEntry->startLine = yyLineNr;
- varEntry->startColumn = yyColNr;
- varEntry->doc = current->doc.copy();
- varEntry->brief = current->brief.copy();
- varEntry->mGrpId = current->mGrpId;
- varEntry->initializer = current->initializer;
- varEntry->groups = current->groups;
- varEntry->sli = current->sli;
+ varEntry->fileName = yyextra->yyFileName;
+ varEntry->startLine = yyextra->yyLineNr;
+ varEntry->startColumn = yyextra->yyColNr;
+ varEntry->doc = yyextra->current->doc.copy();
+ varEntry->brief = yyextra->current->brief.copy();
+ varEntry->mGrpId = yyextra->current->mGrpId;
+ varEntry->initializer = yyextra->current->initializer;
+ varEntry->groups = yyextra->current->groups;
+ varEntry->sli = yyextra->current->sli;
//printf("Add: type='%s',name='%s',args='%s' brief=%s doc=%s\n",
// varEntry->type.data(),varEntry->name.data(),
// varEntry->args.data(),varEntry->brief.data(),varEntry->doc.data());
- current_root->moveToSubEntryAndKeep(varEntry);
+ yyextra->current_root->moveToSubEntryAndKeep(varEntry);
}
}
if (*yytext==';') // end of a struct/class ...
{
- if (!isTypedef && msName.isEmpty() && memspecEntry && (current->section&Entry::COMPOUND_MASK))
+ if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && (yyextra->current->section&Entry::COMPOUND_MASK))
{ // case where a class/struct has a doc block after it
- if (!current->doc.isEmpty())
+ if (!yyextra->current->doc.isEmpty())
{
- memspecEntry->doc += current->doc;
+ yyextra->memspecEntry->doc += yyextra->current->doc;
}
- if (!current->brief.isEmpty())
+ if (!yyextra->current->brief.isEmpty())
{
- memspecEntry->brief += current->brief;
+ yyextra->memspecEntry->brief += yyextra->current->brief;
}
}
- msType.resize(0);
- msName.resize(0);
- msArgs.resize(0);
- isTypedef=FALSE;
- firstTypedefEntry=0;
- memspecEntry=0;
- current->reset();
- initEntry();
+ yyextra->msType.resize(0);
+ yyextra->msName.resize(0);
+ yyextra->msArgs.resize(0);
+ yyextra->isTypedef=FALSE;
+ yyextra->firstTypedefEntry.reset();
+ yyextra->memspecEntry.reset();
+ yyextra->current->reset();
+ initEntry(yyscanner);
BEGIN( FindMembers );
}
else
{
- current->doc.resize(0);
- current->brief.resize(0);
+ yyextra->current->doc.resize(0);
+ yyextra->current->brief.resize(0);
}
}
<MemberSpec>"=" {
- lastInitializerContext=YY_START;
- initBracketCount=0;
- current->initializer = yytext;
+ yyextra->lastInitializerContext=YY_START;
+ yyextra->initBracketCount=0;
+ yyextra->current->initializer = yytext;
BEGIN(ReadInitializer);
/* BEGIN(MemberSpecSkip); */
}
/*
<MemberSpecSkip>"{" {
- curlyCount=0;
- lastCurlyContext = MemberSpecSkip;
- previous = current;
+ yyextra->curlyCount=0;
+ yyextra->lastCurlyContext = MemberSpecSkip;
+ yyextra->previous = yyextra->current;
BEGIN(SkipCurly);
}
*/
<MemberSpecSkip>"," { BEGIN(MemberSpec); }
<MemberSpecSkip>";" { unput(';'); BEGIN(MemberSpec); }
-<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { current->program += yytext ;
- lineCount() ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program += yytext ;
+ lineCount(yyscanner) ;
}
<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] { // end of Objective C block
- current_root->moveToSubEntryAndRefresh( current ) ;
- initEntry();
- language = current->lang = SrcLangExt_Cpp; // see bug746361
- insideObjC=FALSE;
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
+ yyextra->language = yyextra->current->lang = SrcLangExt_Cpp; // see bug746361
+ yyextra->insideObjC=FALSE;
BEGIN( FindMembers );
}
-<ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program += yytext ; }
<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) or int (*func(int))[], the ^ is for Obj-C blocks */
- if (insidePHP) // reference parameter
+ if (yyextra->insidePHP) // reference parameter
{
REJECT
}
else
{
- current->bodyLine = yyLineNr;
- lineCount();
- addType();
- funcPtrType=yytext;
- roundCount=0;
- //current->type += yytext;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ lineCount(yyscanner);
+ addType(yyscanner);
+ yyextra->funcPtrType=yytext;
+ yyextra->roundCount=0;
+ //yyextra->current->type += yytext;
BEGIN( FuncPtr );
}
}
<FuncPtr>{SCOPENAME} {
- current->name = yytext;
- if (nameIsOperator(current->name))
+ yyextra->current->name = yytext;
+ if (nameIsOperator(yyextra->current->name))
{
BEGIN( FuncPtrOperator );
}
else
{
- if (current->name=="const" || current->name=="volatile")
+ if (yyextra->current->name=="const" || yyextra->current->name=="volatile")
{
- funcPtrType += current->name;
+ yyextra->funcPtrType += yyextra->current->name;
}
else
{
@@ -4290,213 +3973,213 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FuncPtr>. {
- //printf("error: FuncPtr '%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName);
+ //printf("error: FuncPtr '%c' unexpected at line %d of %s\n",*yytext,yyextra->yyLineNr,yyextra->yyFileName);
}
<FuncPtrOperator>"("{BN}*")"{BN}*/"(" {
- current->name += yytext;
- current->name = current->name.simplifyWhiteSpace();
- lineCount();
+ yyextra->current->name += yytext;
+ yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
+ lineCount(yyscanner);
}
<FuncPtrOperator>\n {
- lineCount();
- current->name += *yytext;
+ lineCount(yyscanner);
+ yyextra->current->name += *yytext;
}
<FuncPtrOperator>"(" {
unput(*yytext);
BEGIN( EndFuncPtr );
}
<FuncPtrOperator>. {
- current->name += *yytext;
+ yyextra->current->name += *yytext;
}
<EndFuncPtr>")"{BN}*/";" { // a variable with extra braces
- lineCount();
- current->type+=funcPtrType.data()+1;
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType.data()+1;
BEGIN(FindMembers);
}
<EndFuncPtr>")"{BN}*/"(" { // a function pointer
- lineCount();
- current->type+=funcPtrType+")";
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType+")";
BEGIN(FindMembers);
}
<EndFuncPtr>")"{BN}*/"[" { // an array of variables
- lineCount();
- current->type+=funcPtrType.data();
- current->args += ")";
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType.data();
+ yyextra->current->args += ")";
BEGIN(FindMembers);
}
<EndFuncPtr>"(" { // a function returning a function or
// a function returning a pointer to an array
- current->args += *yytext ;
- //roundCount=0;
+ yyextra->current->args += *yytext ;
+ //yyextra->roundCount=0;
//BEGIN( FuncFunc );
- current->bodyLine = yyLineNr;
- currentArgumentContext = FuncFuncEnd;
- fullArgString=current->args.copy();
- copyArgString=&current->args;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->currentArgumentContext = FuncFuncEnd;
+ yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
<EndFuncPtr>"["[^\n\]]*"]" {
- funcPtrType+=yytext;
+ yyextra->funcPtrType+=yytext;
}
<EndFuncPtr>")" {
BEGIN(FindMembers);
}
<FuncFunc>"(" {
- current->args += *yytext ;
- ++roundCount;
+ yyextra->current->args += *yytext ;
+ ++yyextra->roundCount;
}
<FuncFunc>")" {
- current->args += *yytext ;
- if ( roundCount )
- --roundCount;
+ yyextra->current->args += *yytext ;
+ if ( yyextra->roundCount )
+ --yyextra->roundCount;
else
{
BEGIN(FuncFuncEnd);
}
}
<FuncFuncEnd>")"{BN}*"(" {
- lineCount();
- current->type+=funcPtrType+")(";
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType+")(";
BEGIN(FuncFuncType);
}
<FuncFuncEnd>")"{BN}*/[;{] {
- lineCount();
- current->type+=funcPtrType.data()+1;
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType.data()+1;
BEGIN(Function);
}
<FuncFuncEnd>")"{BN}*/"[" { // function returning a pointer to an array
- lineCount();
- current->type+=funcPtrType;
- current->args+=")";
+ lineCount(yyscanner);
+ yyextra->current->type+=yyextra->funcPtrType;
+ yyextra->current->args+=")";
BEGIN(FuncFuncArray);
}
<FuncFuncEnd>. {
- current->args += *yytext;
+ yyextra->current->args += *yytext;
}
<FuncFuncType>"(" {
- current->type += *yytext;
- roundCount++;
+ yyextra->current->type += *yytext;
+ yyextra->roundCount++;
}
<FuncFuncType>")" {
- current->type += *yytext;
- if (roundCount)
- --roundCount;
+ yyextra->current->type += *yytext;
+ if (yyextra->roundCount)
+ --yyextra->roundCount;
else
BEGIN(Function);
}
-<FuncFuncType>{BN}*","{BN}* { lineCount() ; current->type += ", " ; }
-<FuncFuncType>{BN}+ { lineCount() ; current->type += ' ' ; }
+<FuncFuncType>{BN}*","{BN}* { lineCount(yyscanner) ; yyextra->current->type += ", " ; }
+<FuncFuncType>{BN}+ { lineCount(yyscanner) ; yyextra->current->type += ' ' ; }
<FuncFuncType>. {
- current->type += *yytext;
+ yyextra->current->type += *yytext;
}
<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" { // for catching typedef void (__stdcall *f)() like definitions
- if (current->type.left(7)=="typedef" && current->bodyLine==-1)
+ if (yyextra->current->type.left(7)=="typedef" && yyextra->current->bodyLine==-1)
// the bodyLine check is to prevent this guard to be true more than once
{
- current->bodyLine = yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN( GetCallType );
}
- else if (!current->name.isEmpty()) // normal function
+ else if (!yyextra->current->name.isEmpty()) // normal function
{
- current->args = yytext;
- current->bodyLine = yyLineNr;
- currentArgumentContext = FuncQual;
- fullArgString=current->args.copy();
- copyArgString=&current->args;
+ yyextra->current->args = yytext;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->currentArgumentContext = FuncQual;
+ yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
//printf(">>> Read function arguments!\n");
}
}
<GetCallType>{BN}*{ID}{BN}*"*" {
- lineCount();
- addType();
- funcPtrType="(";
- funcPtrType+=yytext;
- roundCount=0;
+ lineCount(yyscanner);
+ addType(yyscanner);
+ yyextra->funcPtrType="(";
+ yyextra->funcPtrType+=yytext;
+ yyextra->roundCount=0;
BEGIN( FuncPtr );
}
<FindMembers>"(" {
- if (!current->name.isEmpty())
+ if (!yyextra->current->name.isEmpty())
{
- current->args = yytext;
- current->bodyLine = yyLineNr;
- currentArgumentContext = FuncQual;
- fullArgString=current->args.copy();
- copyArgString=&current->args;
+ yyextra->current->args = yytext;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->currentArgumentContext = FuncQual;
+ yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
- //printf(">>> Read function arguments current->argList.size()=%d\n",current->argList.size());
+ //printf(">>> Read function arguments yyextra->current->argList.size()=%d\n",yyextra->current->argList.size());
}
}
/*
<FindMembers>"("{BN}*("void"{BN}*)?")" {
- lineCount();
- current->args = "()";
+ lineCount(yyscanner);
+ yyextra->current->args = "()";
BEGIN( FuncQual );
}
*/
/*- Function argument reading rules ---------------------------------------*/
-<ReadFuncArgType>[^ \/\r\t\n\)\(\"\'#]+ { *copyArgString+=yytext;
- fullArgString+=yytext;
+<ReadFuncArgType>[^ \/\r\t\n\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
-<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *copyArgString+=yytext;
- fullArgString+=yytext;
+<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<CopyArgRound>[^\/\n\)\(\"\']+ {
- *copyArgString+=yytext;
- fullArgString+=yytext;
+ *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<ReadFuncArgType,ReadTempArgs>{BN}* {
- *copyArgString+=" ";
- fullArgString+=" ";
- lineCount();
+ *yyextra->copyArgString+=" ";
+ yyextra->fullArgString+=" ";
+ lineCount(yyscanner);
}
<ReadFuncArgType,CopyArgRound,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
- g_delimiter = yytext+2;
- g_delimiter=g_delimiter.left(g_delimiter.length()-1);
- lastRawStringContext = YY_START;
- pCopyRawString = copyArgString;
- *pCopyRawString+=yytext;
- fullArgString+=yytext;
+ yyextra->delimiter = yytext+2;
+ yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
+ yyextra->lastRawStringContext = YY_START;
+ yyextra->pCopyRawString = yyextra->copyArgString;
+ *yyextra->pCopyRawString+=yytext;
+ yyextra->fullArgString+=yytext;
BEGIN(RawString);
}
<ReadFuncArgType,CopyArgRound,CopyArgSharp,ReadTempArgs>\" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- lastCopyArgStringContext = YY_START;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ yyextra->lastCopyArgStringContext = YY_START;
BEGIN( CopyArgString );
}
<ReadFuncArgType,ReadTempArgs>"(" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- argRoundCount=0;
- lastCopyArgContext = YY_START;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ yyextra->argRoundCount=0;
+ yyextra->lastCopyArgContext = YY_START;
BEGIN( CopyArgRound );
}
<ReadFuncArgType>")" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- stringToArgumentList(fullArgString,current->argList);
- if (insideJS)
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ stringToArgumentList(yyextra->language, yyextra->fullArgString,yyextra->current->argList);
+ if (yyextra->insideJS)
{
- fixArgumentListForJavaScript(current->argList);
+ fixArgumentListForJavaScript(yyextra->current->argList);
}
- handleParametersCommentBlocks(current->argList);
+ handleParametersCommentBlocks(yyscanner,yyextra->current->argList);
- /* remember the current documentation block, since
+ /* remember the yyextra->current documentation block, since
we could overwrite it with the documentation of
a function argument, which we then have to correct later
on
*/
- docBackup = current->doc;
- briefBackup = current->brief;
+ yyextra->docBackup = yyextra->current->doc;
+ yyextra->briefBackup = yyextra->current->brief;
- BEGIN( currentArgumentContext );
+ BEGIN( yyextra->currentArgumentContext );
}
/* a special comment */
<ReadFuncArgType,ReadTempArgs>("/*"[*!]|"//"[/!])("<"?) {
- if (currentArgumentContext==DefineEnd)
+ if (yyextra->currentArgumentContext==DefineEnd)
{
// for defines we interpret a comment
// as documentation for the define
@@ -4504,17 +4187,17 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
unput(yytext[i]);
}
- stringToArgumentList(fullArgString,current->argList);
- handleParametersCommentBlocks(current->argList);
- BEGIN( currentArgumentContext );
+ stringToArgumentList(yyextra->language, yyextra->fullArgString,yyextra->current->argList);
+ handleParametersCommentBlocks(yyscanner,yyextra->current->argList);
+ BEGIN( yyextra->currentArgumentContext );
}
else // not a define
{
// for functions we interpret a comment
// as documentation for the argument
- fullArgString+=yytext;
- lastCopyArgChar=0;
- lastCommentInArgContext=YY_START;
+ yyextra->fullArgString+=yytext;
+ yyextra->lastCopyArgChar=0;
+ yyextra->lastCommentInArgContext=YY_START;
if (yytext[1]=='/')
BEGIN( CopyArgCommentLine );
else
@@ -4524,30 +4207,30 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
/* a non-special comment */
<ReadFuncArgType,ReadTempArgs>"/**/" { /* empty comment */ }
<ReadFuncArgType,ReadTempArgs>"/*" {
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN( SkipComment );
}
<ReadFuncArgType,ReadTempArgs>"//" {
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN( SkipCxxComment );
}
/*
-<ReadFuncArgType,ReadTempArgs>"'#" { if (insidePHP)
+<ReadFuncArgType,ReadTempArgs>"'#" { if (yyextra->insidePHP)
REJECT;
- *copyArgString+=yytext;
- fullArgString+=yytext;
+ *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<ReadFuncArgType,ReadTempArgs>"#" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
REJECT;
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN( SkipCxxComment );
}
*/
/* ')' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
- lineCount();
- if (currentArgumentContext==DefineEnd)
+ lineCount(yyscanner);
+ if (yyextra->currentArgumentContext==DefineEnd)
{
// for defines we interpret a comment
// as documentation for the define
@@ -4555,21 +4238,21 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
unput(yytext[i]);
}
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- stringToArgumentList(fullArgString,current->argList);
- handleParametersCommentBlocks(current->argList);
- BEGIN( currentArgumentContext );
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ stringToArgumentList(yyextra->language, yyextra->fullArgString,yyextra->current->argList);
+ handleParametersCommentBlocks(yyscanner,yyextra->current->argList);
+ BEGIN( yyextra->currentArgumentContext );
}
else
{
// for functions we interpret a comment
- // as documentation for the last argument
- lastCopyArgChar=*yytext;
+ // as documentation for the yyextra->last argument
+ yyextra->lastCopyArgChar=*yytext;
QCString text=&yytext[1];
text=text.stripWhiteSpace();
- lastCommentInArgContext=YY_START;
- fullArgString+=text;
+ yyextra->lastCommentInArgContext=YY_START;
+ yyextra->fullArgString+=text;
if (text.find("//")!=-1)
BEGIN( CopyArgCommentLine );
else
@@ -4577,152 +4260,152 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<CopyArgComment>^{B}*"*"+/{BN}+
-<CopyArgComment>[^\n\\\@\*]+ { fullArgString+=yytext; }
-<CopyArgComment>"*/" { fullArgString+=yytext;
- if (lastCopyArgChar!=0)
- unput(lastCopyArgChar);
- BEGIN( lastCommentInArgContext );
- }
-<CopyArgCommentLine>\n { fullArgString+=yytext;
- lineCount();
- if (lastCopyArgChar!=0)
- unput(lastCopyArgChar);
- BEGIN( lastCommentInArgContext );
+<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
+<CopyArgComment>"*/" { yyextra->fullArgString+=yytext;
+ if (yyextra->lastCopyArgChar!=0)
+ unput(yyextra->lastCopyArgChar);
+ BEGIN( yyextra->lastCommentInArgContext );
+ }
+<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
+ lineCount(yyscanner);
+ if (yyextra->lastCopyArgChar!=0)
+ unput(yyextra->lastCopyArgChar);
+ BEGIN( yyextra->lastCommentInArgContext );
}
<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
- docBlockName=&yytext[1];
- fullArgString+=yytext;
+ yyextra->docBlockName=&yytext[1];
+ yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
}
<CopyArgCommentLine>{CMD}("f$"|"f["|"f{") {
- docBlockName=&yytext[1];
- if (docBlockName.at(1)=='[')
+ yyextra->docBlockName=&yytext[1];
+ if (yyextra->docBlockName.at(1)=='[')
{
- docBlockName.at(1)='}';
+ yyextra->docBlockName.at(1)='}';
}
- if (docBlockName.at(1)=='{')
+ if (yyextra->docBlockName.at(1)=='{')
{
- docBlockName.at(1)='}';
+ yyextra->docBlockName.at(1)='}';
}
- fullArgString+=yytext;
+ yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
}
<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9\-] { // end of verbatim block
- fullArgString+=yytext;
+ yyextra->fullArgString+=yytext;
if (yytext[1]=='f') // end of formula
{
BEGIN(CopyArgCommentLine);
}
- if (&yytext[4]==docBlockName)
+ if (&yytext[4]==yyextra->docBlockName)
{
BEGIN(CopyArgCommentLine);
}
}
-<CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; }
-<CopyArgCommentLine>. { fullArgString+=*yytext; }
-<CopyArgComment,CopyArgVerbatim>\n { fullArgString+=*yytext; lineCount(); }
-<CopyArgComment,CopyArgVerbatim>. { fullArgString+=*yytext; }
+<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
+<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
+<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext; lineCount(yyscanner); }
+<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
<CopyArgComment>{CMD}("brief"|"short"){B}+ {
- warn(yyFileName,yyLineNr,
+ warn(yyextra->yyFileName,yyextra->yyLineNr,
"Ignoring %cbrief command inside argument documentation",*yytext
);
- fullArgString+=' ';
+ yyextra->fullArgString+=' ';
}
<ReadTempArgs>"<" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- argSharpCount=1;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ yyextra->argSharpCount=1;
BEGIN( CopyArgSharp );
}
<ReadTempArgs>">" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- //printf("end template list '%s'\n",copyArgString->data());
- stringToArgumentList(fullArgString,*currentArgumentList);
- BEGIN( currentArgumentContext );
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ //printf("end template list '%s'\n",yyextra->copyArgString->data());
+ stringToArgumentList(yyextra->language, yyextra->fullArgString,*yyextra->currentArgumentList);
+ BEGIN( yyextra->currentArgumentContext );
}
<CopyArgRound>"(" {
- argRoundCount++;
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
+ yyextra->argRoundCount++;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
}
<CopyArgRound>")" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- if (argRoundCount>0)
- argRoundCount--;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ if (yyextra->argRoundCount>0)
+ yyextra->argRoundCount--;
else
- BEGIN( lastCopyArgContext );
+ BEGIN( yyextra->lastCopyArgContext );
}
<CopyArgSharp>"(" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- argRoundCount=0;
- lastCopyArgContext = YY_START;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ yyextra->argRoundCount=0;
+ yyextra->lastCopyArgContext = YY_START;
BEGIN( CopyArgRound );
}
<CopyArgSharp>"<" {
- argSharpCount++;
- //printf("argSharpCount++=%d copy\n",argSharpCount);
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
+ yyextra->argSharpCount++;
+ //printf("yyextra->argSharpCount++=%d copy\n",yyextra->argSharpCount);
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
}
<CopyArgSharp>">" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- argSharpCount--;
- if (argSharpCount>0)
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ yyextra->argSharpCount--;
+ if (yyextra->argSharpCount>0)
{
- //printf("argSharpCount--=%d copy\n",argSharpCount);
+ //printf("yyextra->argSharpCount--=%d copy\n",yyextra->argSharpCount);
}
else
{
BEGIN( ReadTempArgs );
- //printf("end of argSharpCount\n");
+ //printf("end of yyextra->argSharpCount\n");
}
}
<CopyArgString,CopyArgPHPString>\\. {
- *copyArgString+=yytext;
- fullArgString+=yytext;
+ *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
<CopyArgString>\" {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- BEGIN( lastCopyArgStringContext );
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ BEGIN( yyextra->lastCopyArgStringContext );
}
<CopyArgPHPString>\' {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
- BEGIN( lastCopyArgStringContext );
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
+ BEGIN( yyextra->lastCopyArgStringContext );
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- *copyArgString+=yytext;
- fullArgString+=yytext;
+ *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
}
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>\' {
- *copyArgString+=yytext;
- fullArgString+=yytext;
- if (insidePHP)
+ *yyextra->copyArgString+=yytext;
+ yyextra->fullArgString+=yytext;
+ if (yyextra->insidePHP)
{
- lastCopyArgStringContext=YY_START;
+ yyextra->lastCopyArgStringContext=YY_START;
BEGIN(CopyArgPHPString);
}
}
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>\n {
- lineCount();
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
+ lineCount(yyscanner);
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
}
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>. {
- *copyArgString+=*yytext;
- fullArgString+=*yytext;
+ *yyextra->copyArgString+=*yytext;
+ yyextra->fullArgString+=*yytext;
}
@@ -4730,29 +4413,29 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
/*------------------------------------------------------------------------*/
-<FuncRound>"(" { current->args += *yytext ;
- ++roundCount ;
+<FuncRound>"(" { yyextra->current->args += *yytext ;
+ ++yyextra->roundCount ;
}
-<FuncRound>")" { current->args += *yytext ;
- if ( roundCount )
- --roundCount ;
+<FuncRound>")" { yyextra->current->args += *yytext ;
+ if ( yyextra->roundCount )
+ --yyextra->roundCount ;
else
BEGIN( FuncQual ) ;
}
/*
-<FuncQual>"#" { if (insidePHP)
+<FuncQual>"#" { if (yyextra->insidePHP)
REJECT;
- lastCPPContext = YY_START;
+ yyextra->lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
*/
<FuncQual>[{:;,] {
if ( qstrcmp(yytext,";")==0 &&
- insidePHP &&
- !containsWord(current->type,"function") )
+ yyextra->insidePHP &&
+ !containsWord(yyextra->current->type,"function") )
{
- current->reset();
- initEntry();
+ yyextra->current->reset();
+ initEntry(yyscanner);
BEGIN( FindMembers );
}
else
@@ -4761,89 +4444,89 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FuncQual>{BN}*"abstract"{BN}* { // pure virtual member function
- lineCount() ;
- current->virt = Pure;
- current->args += " override ";
+ lineCount(yyscanner) ;
+ yyextra->current->virt = Pure;
+ yyextra->current->args += " override ";
}
<FuncQual,TrailingReturn>{BN}*"override"{BN}* { // C++11 overridden virtual member function
- lineCount() ;
- current->spec |= Entry::Override;
- current->args += " override ";
+ lineCount(yyscanner) ;
+ yyextra->current->spec |= Entry::Override;
+ yyextra->current->args += " override ";
BEGIN(FuncQual);
}
<FuncQual,TrailingReturn>{BN}*"final"{BN}* { // C++11 final method
- lineCount() ;
- current->spec |= Entry::Final;
- current->args += " final ";
+ lineCount(yyscanner) ;
+ yyextra->current->spec |= Entry::Final;
+ yyextra->current->args += " final ";
BEGIN(FuncQual);
}
<FuncQual>{BN}*"sealed"{BN}* { // sealed member function
- lineCount() ;
- current->spec |= Entry::Sealed;
- current->args += " sealed ";
+ lineCount(yyscanner) ;
+ yyextra->current->spec |= Entry::Sealed;
+ yyextra->current->args += " sealed ";
}
<FuncQual>{BN}*"new"{BN}* { // new member function
- lineCount() ;
- current->spec |= Entry::New;
- current->args += " new ";
+ lineCount(yyscanner) ;
+ yyextra->current->spec |= Entry::New;
+ yyextra->current->args += " new ";
}
<FuncQual>{BN}*"const"{BN}* { // const member function
- lineCount() ;
- current->args += " const ";
- current->argList.constSpecifier=TRUE;
+ lineCount(yyscanner) ;
+ yyextra->current->args += " const ";
+ yyextra->current->argList.constSpecifier=TRUE;
}
<FuncQual>{BN}*"volatile"{BN}* { // volatile member function
- lineCount() ;
- current->args += " volatile ";
- current->argList.volatileSpecifier=TRUE;
+ lineCount(yyscanner) ;
+ yyextra->current->args += " volatile ";
+ yyextra->current->argList.volatileSpecifier=TRUE;
}
<FuncQual>{BN}*"noexcept"{BN}* { // noexcept qualifier
- lineCount() ;
- current->args += " noexcept ";
- current->spec |= Entry::NoExcept;
+ lineCount(yyscanner) ;
+ yyextra->current->args += " noexcept ";
+ yyextra->current->spec |= Entry::NoExcept;
}
<FuncQual>{BN}*"noexcept"{BN}*"(" { // noexcept expression
- lineCount() ;
- current->args += " noexcept(";
- current->spec |= Entry::NoExcept;
- lastRoundContext=FuncQual;
- pCopyRoundString=&current->args;
- roundCount=0;
+ lineCount(yyscanner) ;
+ yyextra->current->args += " noexcept(";
+ yyextra->current->spec |= Entry::NoExcept;
+ yyextra->lastRoundContext=FuncQual;
+ yyextra->pCopyRoundString=&yyextra->current->args;
+ yyextra->roundCount=0;
BEGIN(CopyRound);
}
<FuncQual>{BN}*"&" {
- current->args += " &";
- current->argList.refQualifier=RefQualifierLValue;
+ yyextra->current->args += " &";
+ yyextra->current->argList.refQualifier=RefQualifierLValue;
}
<FuncQual>{BN}*"&&" {
- current->args += " &&";
- current->argList.refQualifier=RefQualifierRValue;
+ yyextra->current->args += " &&";
+ yyextra->current->argList.refQualifier=RefQualifierRValue;
}
<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function
- lineCount() ;
- current->args += " = 0";
- current->virt = Pure;
- current->argList.pureSpecifier=TRUE;
+ lineCount(yyscanner) ;
+ yyextra->current->args += " = 0";
+ yyextra->current->virt = Pure;
+ yyextra->current->argList.pureSpecifier=TRUE;
BEGIN(FuncQual);
}
<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* { // C++11 explicitly delete member
- lineCount();
- current->args += " = delete";
- current->spec |= Entry::Delete;
- current->argList.isDeleted=TRUE;
+ lineCount(yyscanner);
+ yyextra->current->args += " = delete";
+ yyextra->current->spec |= Entry::Delete;
+ yyextra->current->argList.isDeleted=TRUE;
BEGIN(FuncQual);
}
<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* { // C++11 explicitly defaulted constructor/assignment operator
- lineCount();
- current->args += " = default";
- current->spec |= Entry::Default;
+ lineCount(yyscanner);
+ yyextra->current->args += " = default";
+ yyextra->current->spec |= Entry::Default;
BEGIN(FuncQual);
}
<FuncQual>{BN}*"->"{BN}* {
- lineCount();
- current->argList.trailingReturnType = " -> ";
- current->args += " -> ";
+ lineCount(yyscanner);
+ yyextra->current->argList.trailingReturnType = " -> ";
+ yyextra->current->args += " -> ";
BEGIN(TrailingReturn);
}
<TrailingReturn>[{;] {
@@ -4851,30 +4534,30 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FuncQual);
}
<TrailingReturn>. {
- current->argList.trailingReturnType+=yytext;
- current->args+=yytext;
+ yyextra->current->argList.trailingReturnType+=yytext;
+ yyextra->current->args+=yytext;
}
<TrailingReturn>\n {
- lineCount();
- current->argList.trailingReturnType+=yytext;
- current->args+=' ';
+ lineCount(yyscanner);
+ yyextra->current->argList.trailingReturnType+=yytext;
+ yyextra->current->args+=' ';
}
<FuncRound,FuncFunc>{BN}*","{BN}* {
- lineCount() ;
- current->args += ", " ;
+ lineCount(yyscanner) ;
+ yyextra->current->args += ", " ;
}
<FuncQual,FuncRound,FuncFunc>{BN}+ {
- lineCount() ;
- current->args += ' ' ;
+ lineCount(yyscanner) ;
+ yyextra->current->args += ' ' ;
}
-<Function,FuncQual,FuncRound,FuncFunc>"#" { if (insidePHP)
+<Function,FuncQual,FuncRound,FuncFunc>"#" { if (yyextra->insidePHP)
REJECT;
- lastCPPContext = YY_START;
+ yyextra->lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
<FuncQual>"=" {
- if (insideCli &&
- (current_root->section&Entry::COMPOUND_MASK)
+ if (yyextra->insideCli &&
+ (yyextra->current_root->section&Entry::COMPOUND_MASK)
)
{
BEGIN(CliOverride);
@@ -4882,9 +4565,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else
{
// typically an initialized function pointer
- lastInitializerContext=YY_START;
- initBracketCount=0;
- current->initializer = yytext;
+ yyextra->lastInitializerContext=YY_START;
+ yyextra->initBracketCount=0;
+ yyextra->current->initializer = yytext;
BEGIN(ReadInitializer);
}
}
@@ -4895,7 +4578,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FuncQual);
}
<CliOverride>\n {
- lineCount();
+ lineCount(yyscanner);
}
<CliOverride>. {
}
@@ -4904,96 +4587,96 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FuncQual);
}
<FuncPtrInit>\" {
- current->args += *yytext;
- pCopyQuotedString=&current->args;
- lastStringContext=FuncPtrInit;
+ yyextra->current->args += *yytext;
+ yyextra->pCopyQuotedString=&yyextra->current->args;
+ yyextra->lastStringContext=FuncPtrInit;
BEGIN(CopyString);
}
<FuncPtrInit>\' {
- current->args += *yytext;
- if (insidePHP)
+ yyextra->current->args += *yytext;
+ if (yyextra->insidePHP)
{
- pCopyQuotedString=&current->args;
- lastStringContext=FuncPtrInit;
+ yyextra->pCopyQuotedString=&yyextra->current->args;
+ yyextra->lastStringContext=FuncPtrInit;
BEGIN(CopyPHPString);
}
}
<FuncPtrInit>{CHARLIT} {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
REJECT;
}
else
{
- current->args += yytext;
+ yyextra->current->args += yytext;
}
}
<FuncPtrInit>{ID} {
- current->args += yytext;
+ yyextra->current->args += yytext;
}
<FuncPtrInit>. {
- current->args += *yytext;
+ yyextra->current->args += *yytext;
}
<FuncPtrInit>\n {
- current->args += *yytext;
- lineCount();
+ yyextra->current->args += *yytext;
+ lineCount(yyscanner);
}
<FuncQual>{ID} { // typically a K&R style C function
- if (insideCS && qstrcmp(yytext,"where")==0)
+ if (yyextra->insideCS && qstrcmp(yytext,"where")==0)
{
// type constraint for a method
- current->typeConstr.clear();
- current->typeConstr.push_back(Argument());
- lastCSConstraint = YY_START;
+ yyextra->current->typeConstr.clear();
+ yyextra->current->typeConstr.push_back(Argument());
+ yyextra->lastCSConstraint = YY_START;
BEGIN( CSConstraintName );
}
- else if (checkForKnRstyleC())
+ else if (checkForKnRstyleC(yyscanner))
{
- current->args = yytext;
- oldStyleArgType.resize(0);
+ yyextra->current->args = yytext;
+ yyextra->oldStyleArgType.resize(0);
BEGIN(OldStyleArgs);
}
else
{
- current->args += yytext;
+ yyextra->current->args += yytext;
}
}
<OldStyleArgs>[,;] {
QCString oldStyleArgPtr;
QCString oldStyleArgName;
- splitKnRArg(oldStyleArgPtr,oldStyleArgName);
+ splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
QCString doc,brief;
- if (current->doc!=docBackup)
+ if (yyextra->current->doc!=yyextra->docBackup)
{
- doc=current->doc.copy();
- current->doc=docBackup;
+ doc=yyextra->current->doc.copy();
+ yyextra->current->doc=yyextra->docBackup;
}
- if (current->brief!=briefBackup)
+ if (yyextra->current->brief!=yyextra->briefBackup)
{
- brief=current->brief.copy();
- current->brief=briefBackup;
+ brief=yyextra->current->brief.copy();
+ yyextra->current->brief=yyextra->briefBackup;
}
- addKnRArgInfo(oldStyleArgType+oldStyleArgPtr,
+ addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
oldStyleArgName,brief,doc);
- current->args.resize(0);
- if (*yytext==';') oldStyleArgType.resize(0);
+ yyextra->current->args.resize(0);
+ if (*yytext==';') yyextra->oldStyleArgType.resize(0);
}
-<OldStyleArgs>{ID} { current->args += yytext; }
+<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
<OldStyleArgs>"{" {
- if (current->argList.empty())
+ if (yyextra->current->argList.empty())
{
- current->argList.noParameters=TRUE;
+ yyextra->current->argList.noParameters=TRUE;
}
- current->args = argListToString(current->argList);
+ yyextra->current->args = argListToString(yyextra->current->argList);
unput('{');
BEGIN(FuncQual);
}
-<OldStyleArgs>. { current->args += *yytext; }
-<FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; }
+<OldStyleArgs>. { yyextra->current->args += *yytext; }
+<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
<FuncQual>{BN}*"try:" |
<FuncQual>{BN}*"try"{BN}+ { /* try-function-block */
- insideTryBlock=TRUE;
- lineCount();
+ yyextra->insideTryBlock=TRUE;
+ lineCount(yyscanner);
if (yytext[yyleng-1]==':')
{
unput(':');
@@ -5001,33 +4684,33 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FuncQual>{BN}*"throw"{BN}*"(" { // C++ style throw clause
- current->exception = " throw (" ;
- roundCount=0;
- lineCount() ;
+ yyextra->current->exception = " throw (" ;
+ yyextra->roundCount=0;
+ lineCount(yyscanner) ;
BEGIN( ExcpRound ) ;
}
<FuncQual>{BN}*"raises"{BN}*"(" {
- current->exception = " raises (" ;
- lineCount() ;
- roundCount=0;
+ yyextra->current->exception = " raises (" ;
+ lineCount(yyscanner) ;
+ yyextra->roundCount=0;
BEGIN( ExcpRound ) ;
}
<FuncQual>{BN}*"throws"{BN}+ { // Java style throw clause
- current->exception = " throws " ;
- lineCount() ;
+ yyextra->current->exception = " throws " ;
+ lineCount(yyscanner) ;
BEGIN( ExcpList );
}
-<ExcpRound>"(" { current->exception += *yytext ;
- ++roundCount ;
+<ExcpRound>"(" { yyextra->current->exception += *yytext ;
+ ++yyextra->roundCount ;
}
-<ExcpRound>")" { current->exception += *yytext ;
- if ( roundCount )
- --roundCount ;
+<ExcpRound>")" { yyextra->current->exception += *yytext ;
+ if ( yyextra->roundCount )
+ --yyextra->roundCount ;
else
BEGIN( FuncQual ) ;
}
<ExcpRound>. {
- current->exception += *yytext;
+ yyextra->current->exception += *yytext;
}
<ExcpList>"{" {
unput('{'); BEGIN( FuncQual );
@@ -5036,101 +4719,101 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
unput(';'); BEGIN( FuncQual );
}
<ExcpList>"\n" {
- current->exception += ' ';
- lineCount();
+ yyextra->current->exception += ' ';
+ lineCount(yyscanner);
}
<ExcpList>. {
- current->exception += *yytext;
+ yyextra->current->exception += *yytext;
}
-<Function>"(" { current->type += current->name ;
- current->name = current->args ;
- current->args = yytext ;
- roundCount=0;
+<Function>"(" { yyextra->current->type += yyextra->current->name ;
+ yyextra->current->name = yyextra->current->args ;
+ yyextra->current->args = yytext ;
+ yyextra->roundCount=0;
BEGIN( FuncRound ) ;
}
<Function>":" {
- if (!insidePHP) BEGIN(SkipInits);
+ if (!yyextra->insidePHP) BEGIN(SkipInits);
}
<Function>[;{,] {
- current->name=current->name.simplifyWhiteSpace();
- current->type=current->type.simplifyWhiteSpace();
- current->args=removeRedundantWhiteSpace(current->args);
- // was: current->args.simplifyWhiteSpace();
- current->fileName = yyFileName;
- current->startLine = yyBegLineNr;
- current->startColumn = yyBegColNr;
+ yyextra->current->name=yyextra->current->name.simplifyWhiteSpace();
+ yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
+ yyextra->current->args=removeRedundantWhiteSpace(yyextra->current->args);
+ // was: yyextra->current->args.simplifyWhiteSpace();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyBegLineNr;
+ yyextra->current->startColumn = yyextra->yyBegColNr;
static QRegExp re("([^)]*[*&][^)]*)"); // (...*...)
- if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) )
+ if (*yytext!=';' || (yyextra->current_root->section&Entry::COMPOUND_MASK) )
{
- int tempArg=current->name.find('<');
- int ts=current->type.find('<');
- int te=current->type.findRev('>');
- int ti=current->type.find(re,0);
+ int tempArg=yyextra->current->name.find('<');
+ int ts=yyextra->current->type.find('<');
+ int te=yyextra->current->type.findRev('>');
+ int ti=yyextra->current->type.find(re,0);
// bug677315: A<int(void *, char *)> get(); is not a function pointer
bool isFunction = ti==-1 || // not a (...*...) pattern
(ts!=-1 && ts<te && ts<ti && ti<te); // (...*...) is part of a template argument list
//printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
- // current->type.data(),ts,te,ti,isFunction);
+ // yyextra->current->type.data(),ts,te,ti,isFunction);
QCString tempName;
- if (tempArg==-1) tempName=current->name; else tempName=current->name.left(tempArg);
- if (!current->type.isEmpty() &&
- (!isFunction || current->type.left(8)=="typedef "))
+ if (tempArg==-1) tempName=yyextra->current->name; else tempName=yyextra->current->name.left(tempArg);
+ if (!yyextra->current->type.isEmpty() &&
+ (!isFunction || yyextra->current->type.left(8)=="typedef "))
{
- //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", current->type.data(),current->name.data(),current->args.data());
- if (isTypedef && current->type.left(8)!="typedef ")
+ //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
- current->type.prepend("typedef ");
+ yyextra->current->type.prepend("typedef ");
}
- current->section = Entry::VARIABLE_SEC ;
+ yyextra->current->section = Entry::VARIABLE_SEC ;
}
else
{
- //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", current->type.data(),current->name.data(),current->args.data());
- current->section = Entry::FUNCTION_SEC ;
- current->proto = *yytext==';';
+ //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ yyextra->current->section = Entry::FUNCTION_SEC ;
+ yyextra->current->proto = *yytext==';';
}
}
else // a global function prototype or function variable
{
- //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",current->type.data(),current->name.data(),current->args.data());
- if (!current->type.isEmpty() &&
- (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
+ //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ if (!yyextra->current->type.isEmpty() &&
+ (yyextra->current->type.find(re,0)!=-1 || yyextra->current->type.left(8)=="typedef "))
{
- if (isTypedef && current->type.left(8)!="typedef ")
+ if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
- current->type.prepend("typedef ");
+ yyextra->current->type.prepend("typedef ");
}
//printf("Scanner.l: found function variable!\n");
- current->section = Entry::VARIABLE_SEC;
+ yyextra->current->section = Entry::VARIABLE_SEC;
}
else
{
//printf("Scanner.l: found prototype\n");
- current->section = Entry::FUNCTION_SEC;
- current->proto = TRUE;
+ yyextra->current->section = Entry::FUNCTION_SEC;
+ yyextra->current->proto = TRUE;
}
}
- //printf("Adding entry '%s'\n",current->name.data());
- if ( insidePHP)
+ //printf("Adding entry '%s'\n",yyextra->current->name.data());
+ if ( yyextra->insidePHP)
{
- if (findAndRemoveWord(current->type,"final"))
+ if (findAndRemoveWord(yyextra->current->type,"final"))
{
- current->spec |= Entry::Final;
+ yyextra->current->spec |= Entry::Final;
}
- if (findAndRemoveWord(current->type,"abstract"))
+ if (findAndRemoveWord(yyextra->current->type,"abstract"))
{
- current->spec |= Entry::Abstract;
+ yyextra->current->spec |= Entry::Abstract;
}
}
- if ( insidePHP && !containsWord(current->type,"function"))
+ if ( yyextra->insidePHP && !containsWord(yyextra->current->type,"function"))
{
- initEntry();
+ initEntry(yyscanner);
if ( *yytext == '{' )
{
- lastCurlyContext = FindMembers;
- curlyCount=0;
+ yyextra->lastCurlyContext = FindMembers;
+ yyextra->curlyCount=0;
BEGIN( SkipCurly );
}
else
@@ -5140,66 +4823,66 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
else
{
- if ( insidePHP)
+ if ( yyextra->insidePHP)
{
- findAndRemoveWord(current->type,"function");
+ findAndRemoveWord(yyextra->current->type,"function");
}
- previous = current.get();
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->previous = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
// Objective C 2.0: Required/Optional section
- if (previous->spec & (Entry::Optional | Entry::Required))
+ if (yyextra->previous->spec & (Entry::Optional | Entry::Required))
{
- current->spec |= previous->spec & (Entry::Optional|Entry::Required);
+ yyextra->current->spec |= yyextra->previous->spec & (Entry::Optional|Entry::Required);
}
- lastCurlyContext = FindMembers;
+ yyextra->lastCurlyContext = FindMembers;
if ( *yytext == ',' )
{
- current->type = previous->type;
+ yyextra->current->type = yyextra->previous->type;
// we need to strip any trailing * and & (see bugs 623023 and 649103 for test cases)
- int i=current->type.length();
- while (i>0 && (current->type[i-1]=='*' || current->type[i-1]=='&' || current->type[i-1]==' ')) i--;
- current->type = current->type.left(i);
+ int i=yyextra->current->type.length();
+ while (i>0 && (yyextra->current->type[i-1]=='*' || yyextra->current->type[i-1]=='&' || yyextra->current->type[i-1]==' ')) i--;
+ yyextra->current->type = yyextra->current->type.left(i);
}
if ( *yytext == '{' )
{
- if ( !insidePHP && (current_root->section & Entry::COMPOUND_MASK) )
+ if ( !yyextra->insidePHP && (yyextra->current_root->section & Entry::COMPOUND_MASK) )
{
- previous->spec |= Entry::Inline;
+ yyextra->previous->spec |= Entry::Inline;
}
//addToBody(yytext);
- curlyCount=0;
+ yyextra->curlyCount=0;
BEGIN( SkipCurly ) ;
}
else
{
- if (previous->section!=Entry::VARIABLE_SEC)
- previous->bodyLine=-1; // a function/member declaration
+ if (yyextra->previous->section!=Entry::VARIABLE_SEC)
+ yyextra->previous->bodyLine=-1; // a function/member declaration
BEGIN( FindMembers ) ;
}
}
}
<SkipInits>">"{BN}*"{" { // C++11 style initializer (see bug 790788)
- lineCount();
- curlyCount=1;
+ lineCount(yyscanner);
+ yyextra->curlyCount=1;
BEGIN(SkipC11Inits);
}
<SkipInits>{ID}{BN}*"{" { // C++11 style initializer (see bug 688647)
- lineCount();
- curlyCount=1;
+ lineCount(yyscanner);
+ yyextra->curlyCount=1;
BEGIN(SkipC11Inits);
}
<SkipC11Inits>"{" {
- ++curlyCount;
+ ++yyextra->curlyCount;
}
<SkipC11Inits>"}" {
- if ( --curlyCount<=0 )
+ if ( --yyextra->curlyCount<=0 )
{
BEGIN(SkipInits);
}
}
<SkipC11Attribute>"]]" {
- BEGIN(lastC11AttributeContext);
+ BEGIN(yyextra->lastC11AttributeContext);
}
<SkipInits>"{" { // C++11 style initializer
unput('{');
@@ -5207,197 +4890,197 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipCurly>"{" {
//addToBody(yytext);
- ++curlyCount ;
+ ++yyextra->curlyCount ;
}
<SkipCurly>"}"/{BN}*("/*!"|"/**"|"//!"|"///")"<!--" | /* see bug710917 */
<SkipCurly>"}" {
//addToBody(yytext);
- if( curlyCount )
+ if( yyextra->curlyCount )
{
- --curlyCount ;
+ --yyextra->curlyCount ;
}
else
{
- if (!current->sli.empty() && previous) // copy special list items
+ if (!yyextra->current->sli.empty() && yyextra->previous) // copy special list items
{
- previous->sli = current->sli;
- current->sli.clear();
+ yyextra->previous->sli = yyextra->current->sli;
+ yyextra->current->sli.clear();
}
- if (previous) previous->endBodyLine=yyLineNr;
- BEGIN( lastCurlyContext ) ;
+ if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
+ BEGIN( yyextra->lastCurlyContext ) ;
}
}
<SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" {
- lineCount();
- if ( curlyCount )
+ lineCount(yyscanner);
+ if ( yyextra->curlyCount )
{
//addToBody(yytext);
- --curlyCount ;
+ --yyextra->curlyCount ;
}
else
{
- current->endBodyLine=yyLineNr;
- // take previous out of current_root and move it into current
- current.swap(tempEntry); // remember current
- current_root->moveFromSubEntry(previous,current);
- previous = 0;
+ yyextra->current->endBodyLine=yyextra->yyLineNr;
+ // take yyextra->previous out of yyextra->current_root and move it into yyextra->current
+ yyextra->tempEntry = yyextra->current; // remember yyextra->current
+ yyextra->current_root->moveFromSubEntry(yyextra->previous.get(),yyextra->current);
+ yyextra->previous.reset();
- docBlockContext = SkipCurlyEndDoc;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = SkipCurlyEndDoc;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
- docBlock.resize(0);
- docBlockTerm = '}';
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
}
<SkipCurlyEndDoc>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { // desc is followed by another one
- docBlockContext = SkipCurlyEndDoc;
- docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ yyextra->docBlockContext = SkipCurlyEndDoc;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
- docBlock.resize(0);
- docBlockTerm = '}';
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
{
- startCommentBlock(TRUE);
+ startCommentBlock(yyscanner,TRUE);
BEGIN( DocLine );
}
else
{
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
}
<SkipCurlyEndDoc>"}" {
//addToBody("}");
- if (tempEntry) // we can only switch back to current if no new item was created
+ if (yyextra->tempEntry) // we can only switch back to yyextra->current if no new item was created
{
- tempEntry.swap(current);
- tempEntry.reset();
+ yyextra->current = yyextra->tempEntry;
+ yyextra->tempEntry.reset();
}
- BEGIN( lastCurlyContext );
+ BEGIN( yyextra->lastCurlyContext );
}
<SkipCurly>\" {
//addToBody(yytext);
- lastStringContext=SkipCurly;
+ yyextra->lastStringContext=SkipCurly;
BEGIN( SkipString );
}
<SkipCurly>^{B}*"#" {
- if (insidePHP)
+ if (yyextra->insidePHP)
REJECT;
//addToBody(yytext);
BEGIN( SkipCurlyCpp );
}
<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
- lineCount();
+ lineCount(yyscanner);
//addToBody(yytext);
}
<SkipCurly,SkipCurlyCpp,ReadInitializer>"<<<" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
{
REJECT;
}
else
{
- lastHereDocContext = YY_START;
+ yyextra->lastHereDocContext = YY_START;
BEGIN(HereDoc);
}
}
<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- g_delimiter = raw.data()+2;
- g_delimiter=g_delimiter.left(g_delimiter.length()-1);
- lastRawStringContext = YY_START;
- dummyRawString.resize(0);
- pCopyRawString = &dummyRawString;
- *pCopyRawString+=yytext;
+ yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
+ yyextra->lastRawStringContext = YY_START;
+ yyextra->dummyRawString.resize(0);
+ yyextra->pCopyRawString = &yyextra->dummyRawString;
+ *yyextra->pCopyRawString+=yytext;
BEGIN(RawString);
}
<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<]+ {
- lineCount(); // for g_column updates
+ lineCount(yyscanner); // for yyextra->column updates
//addToBody(yytext);
}
<SkipCurlyCpp>\n {
//addToBody(yytext);
- lineCount();
- lastCurlyContext = FindMembers;
+ lineCount(yyscanner);
+ yyextra->lastCurlyContext = FindMembers;
BEGIN( SkipCurly );
}
<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
//addToBody(yytext);
- lineCount();
+ lineCount(yyscanner);
}
<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>"/*" {
//addToBody(yytext);
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN(SkipComment);
}
<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>"//" {
//addToBody(yytext);
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
- roundCount=0;
- lastSkipRoundContext=YY_START;
+ yyextra->roundCount=0;
+ yyextra->lastSkipRoundContext=YY_START;
BEGIN(SkipRound);
}
<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
- lastStringContext=YY_START;
+ yyextra->lastStringContext=YY_START;
BEGIN( SkipString );
}
<SkipInits>; {
- warn(yyFileName,yyLineNr,
+ warn(yyextra->yyFileName,yyextra->yyLineNr,
"Found ';' while parsing initializer list! "
"(doxygen could be confused by a macro call without semicolon)"
);
BEGIN( FindMembers );
}
<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
REJECT;
//addToBody(yytext);
- lastCContext = YY_START;
+ yyextra->lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
- if (!insideCS) REJECT;
+ if (!yyextra->insideCS) REJECT;
// C# verbatim string
- lastSkipVerbStringContext=YY_START;
- pSkipVerbString=&current->initializer;
+ yyextra->lastSkipVerbStringContext=YY_START;
+ yyextra->pSkipVerbString=&yyextra->current->initializer;
BEGIN(SkipVerbString);
}
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
- if (insidePHP) REJECT;
+ if (yyextra->insidePHP) REJECT;
}
<SkipInits,SkipCurly,SkipCurlyCpp>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- lastStringContext=YY_START;
+ yyextra->lastStringContext=YY_START;
BEGIN(SkipPHPString);
}
}
<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
<SkipString,SkipPHPString>\\. { }
<SkipString>\" {
- BEGIN( lastStringContext );
+ BEGIN( yyextra->lastStringContext );
}
<SkipPHPString>\' {
- BEGIN( lastStringContext );
+ BEGIN( yyextra->lastStringContext );
}
<SkipString,SkipPHPString>"/*"|"*/"|"//" { }
<SkipString,SkipPHPString>\n {
- lineCount();
+ lineCount(yyscanner);
}
<SkipString,SkipPHPString>. { }
<CompoundName>":" { // for "class : public base {} var;" construct, see bug 608359
@@ -5405,243 +5088,243 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(ClassVar);
}
<CompoundName>";" {
- current->section = Entry::EMPTY_SEC ;
- current->type.resize(0) ;
- current->name.resize(0) ;
- current->args.resize(0) ;
- current->argList.clear();
+ yyextra->current->section = Entry::EMPTY_SEC ;
+ yyextra->current->type.resize(0) ;
+ yyextra->current->name.resize(0) ;
+ yyextra->current->args.resize(0) ;
+ yyextra->current->argList.clear();
BEGIN( FindMembers ) ;
}
<Bases>";" {
- if (insideIDL && (current->spec & (Entry::Singleton |
+ if (yyextra->insideIDL && (yyextra->current->spec & (Entry::Singleton |
Entry::Service)))
{
// in UNO IDL a service or singleton may be defined
// completely like this: "service Foo : XFoo;"
- if (!current->name.isEmpty() && !current_root->name.isEmpty())
+ if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
{
- prependScope();
+ prependScope(yyscanner);
}
- current->name = current->name.stripWhiteSpace();
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
// there can be only one base class here
- if (!baseName.isEmpty())
+ if (!yyextra->baseName.isEmpty())
{
- current->extends.push_back(
- BaseInfo(baseName,Public,Normal));
- baseName.resize(0);
+ yyextra->current->extends.push_back(
+ BaseInfo(yyextra->baseName,Public,Normal));
+ yyextra->baseName.resize(0);
}
- current_root->moveToSubEntryAndRefresh( current ) ;
- initEntry();
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
}
else
{
- current->section = Entry::EMPTY_SEC ;
- current->type.resize(0) ;
- current->name.resize(0) ;
- current->args.resize(0) ;
- current->argList.clear();
+ yyextra->current->section = Entry::EMPTY_SEC ;
+ yyextra->current->type.resize(0) ;
+ yyextra->current->name.resize(0) ;
+ yyextra->current->args.resize(0) ;
+ yyextra->current->argList.clear();
}
BEGIN( FindMembers ) ;
}
<CompoundName>{SCOPENAME}/{BN}*"<" {
- sharpCount = 0;
- current->name = yytext ;
- if (current->spec & Entry::Protocol)
+ yyextra->sharpCount = 0;
+ yyextra->current->name = yytext ;
+ if (yyextra->current->spec & Entry::Protocol)
{
- current->name+="-p";
+ yyextra->current->name+="-p";
}
- lineCount();
- lastClassTemplSpecContext = ClassVar;
- if (insideObjC) // protocol list
+ lineCount(yyscanner);
+ yyextra->lastClassTemplSpecContext = ClassVar;
+ if (yyextra->insideObjC) // protocol list
{
BEGIN( ObjCProtocolList );
}
- else if (insideCS) // C# generic class
+ else if (yyextra->insideCS) // C# generic class
{
- //current->name+="-g";
+ //yyextra->current->name+="-g";
BEGIN( CSGeneric );
}
else // C++ template specialization
{
- roundCount=0;
+ yyextra->roundCount=0;
BEGIN( ClassTemplSpec );
}
}
<CSGeneric>"<" {
ArgumentList al;
// check bug 612858 before enabling the next line
- //current->spec |= Entry::Template;
- current->tArgLists.push_back(al);
- currentArgumentList = &current->tArgLists.back();
- templateStr="<";
- current->name += "<";
- fullArgString = templateStr;
- copyArgString = &current->name;
- //copyArgString = &templateStr;
- currentArgumentContext = ClassVar;
+ //yyextra->current->spec |= Entry::Template;
+ yyextra->current->tArgLists.push_back(al);
+ yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
+ yyextra->templateStr="<";
+ yyextra->current->name += "<";
+ yyextra->fullArgString = yyextra->templateStr;
+ yyextra->copyArgString = &yyextra->current->name;
+ //yyextra->copyArgString = &yyextra->templateStr;
+ yyextra->currentArgumentContext = ClassVar;
BEGIN( ReadTempArgs );
}
<ObjCProtocolList>"<" {
- insideProtocolList=TRUE;
+ yyextra->insideProtocolList=TRUE;
BEGIN( Bases );
}
<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
- current->name += yytext;
- lineCount();
- if (roundCount==0 && --sharpCount<=0)
+ yyextra->current->name += yytext;
+ lineCount(yyscanner);
+ if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
- current->name = removeRedundantWhiteSpace(current->name);
- if (current->spec & Entry::Protocol)
+ yyextra->current->name = removeRedundantWhiteSpace(yyextra->current->name);
+ if (yyextra->current->spec & Entry::Protocol)
{ // Objective-C protocol
unput('{'); // fake start of body
BEGIN( ClassVar );
}
else
{
- BEGIN( lastClassTemplSpecContext );
+ BEGIN( yyextra->lastClassTemplSpecContext );
}
}
}
<ClassTemplSpec>"<" {
- current->name += yytext;
- if (roundCount==0) sharpCount++;
+ yyextra->current->name += yytext;
+ if (yyextra->roundCount==0) yyextra->sharpCount++;
}
<ClassTemplSpec>. {
- current->name += yytext;
+ yyextra->current->name += yytext;
}
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
- if (!current->tArgLists.empty())
+ if (!yyextra->current->tArgLists.empty())
{
// found a forward template declaration, this has
// a purpose of its own
- current->name = yytext;
- current->name=current->name.left(current->name.length()-1).stripWhiteSpace();
- //printf("template class declaration for %s!\n",current->name.data());
- QCString rn = current_root->name.copy();
- //printf("cn='%s' rn='%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
- if (!current->name.isEmpty() && !rn.isEmpty())
+ yyextra->current->name = yytext;
+ yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
+ //printf("template class declaration for %s!\n",yyextra->current->name.data());
+ QCString rn = yyextra->current_root->name.copy();
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
+ if (!yyextra->current->name.isEmpty() && !rn.isEmpty())
{
- prependScope();
+ prependScope(yyscanner);
}
- current->spec|=Entry::ForwardDecl;
- current_root->moveToSubEntryAndRefresh(current);
+ yyextra->current->spec|=Entry::ForwardDecl;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
}
- else if (insideIDL &&
- (((current_root->spec & (Entry::Interface |
+ else if (yyextra->insideIDL &&
+ (((yyextra->current_root->spec & (Entry::Interface |
Entry::Service)) &&
- (current->spec & Entry::Interface)) ||
- ((current_root->spec & (Entry::Service |
+ (yyextra->current->spec & Entry::Interface)) ||
+ ((yyextra->current_root->spec & (Entry::Service |
Entry::Singleton)) &&
- (current->spec & Entry::Service))))
+ (yyextra->current->spec & Entry::Service))))
{
- // interface inside of UNO IDL service or interface
- // service inside of UNO IDL service or singleton
+ // interface yyextra->inside of UNO IDL service or interface
+ // service yyextra->inside of UNO IDL service or singleton
// there may be documentation on the member,
// so do not throw it away...
- current->name = yytext;
- current->name=current->name.left(current->name.length()-1).stripWhiteSpace();
- current->section = (current->spec & Entry::Interface)
+ yyextra->current->name = yytext;
+ yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
+ yyextra->current->section = (yyextra->current->spec & Entry::Interface)
? Entry::EXPORTED_INTERFACE_SEC
: Entry::INCLUDED_SERVICE_SEC;
-// current->section = Entry::MEMBERDOC_SEC;
- current->spec &= ~(Entry::Interface|Entry::Service); // FIXME: horrible: Interface == Gettable, so need to clear it - actually we're mixing values from different enums in this case... granted only Optional and Interface are actually valid in this context but urgh...
- current_root->moveToSubEntryAndRefresh(current);
+// yyextra->current->section = Entry::MEMBERDOC_SEC;
+ yyextra->current->spec &= ~(Entry::Interface|Entry::Service); // FIXME: horrible: Interface == Gettable, so need to clear it - actually we're mixing values from different enums in this case... granted only Optional and Interface are actually valid in this context but urgh...
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
}
unput(';');
- current->reset();
- initEntry();
- if (insideObjC) // see bug746361
+ yyextra->current->reset();
+ initEntry(yyscanner);
+ if (yyextra->insideObjC) // see bug746361
{
- language = current->lang = SrcLangExt_Cpp;
- insideObjC = FALSE;
+ yyextra->language = yyextra->current->lang = SrcLangExt_Cpp;
+ yyextra->insideObjC = FALSE;
}
- if (isTypedef) // typedef of a class, put typedef keyword back
+ if (yyextra->isTypedef) // typedef of a class, put typedef keyword back
{
- current->type.prepend("typedef");
+ yyextra->current->type.prepend("typedef");
}
BEGIN( FindMembers );
}
<CompoundName>{SCOPENAME}/{BN}*"(" {
- current->name = yytext ;
- lineCount();
- if (insideCpp && current->name=="alignas") // C++11
+ yyextra->current->name = yytext ;
+ lineCount(yyscanner);
+ if (yyextra->insideCpp && yyextra->current->name=="alignas") // C++11
{
- lastAlignAsContext = YY_START;
+ yyextra->lastAlignAsContext = YY_START;
BEGIN( AlignAs );
}
else
{
- if (current->spec & Entry::Protocol)
+ if (yyextra->current->spec & Entry::Protocol)
{
- current->name += "-p";
+ yyextra->current->name += "-p";
}
BEGIN( ClassVar );
}
}
-<AlignAs>"(" { roundCount=0;
+<AlignAs>"(" { yyextra->roundCount=0;
BEGIN( AlignAsEnd );
}
-<AlignAs>\n { lineCount(); }
+<AlignAs>\n { lineCount(yyscanner); }
<AlignAs>.
-<AlignAsEnd>"(" { roundCount++; }
-<AlignAsEnd>")" { if (--roundCount<0)
+<AlignAsEnd>"(" { yyextra->roundCount++; }
+<AlignAsEnd>")" { if (--yyextra->roundCount<0)
{
- BEGIN( lastAlignAsContext );
+ BEGIN( yyextra->lastAlignAsContext );
}
}
-<AlignAsEnd>\n { lineCount(); }
+<AlignAsEnd>\n { lineCount(yyscanner); }
<AlignAsEnd>.
<CompoundName>{SCOPENAME}/{BN}*"," { // multiple forward declarations on one line
// e.g. @protocol A,B;
- current->reset();
- initEntry();
+ yyextra->current->reset();
+ initEntry(yyscanner);
}
<CompoundName>{SCOPENAME} {
- current->name = yytext ;
- if (insideCpp || insideObjC)
+ yyextra->current->name = yytext ;
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
- lineCount();
- if (current->spec & Entry::Protocol)
+ lineCount(yyscanner);
+ if (yyextra->current->spec & Entry::Protocol)
{
- current->name += "-p";
+ yyextra->current->name += "-p";
}
- if ((current->spec & Entry::Protocol) ||
- current->section == Entry::OBJCIMPL_SEC)
+ if ((yyextra->current->spec & Entry::Protocol) ||
+ yyextra->current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}
BEGIN( ClassVar );
}
<CompoundName>{CSSCOPENAME} { // C# style scope
- current->name = substitute(yytext,".","::");
- lineCount();
+ yyextra->current->name = substitute(yytext,".","::");
+ lineCount(yyscanner);
BEGIN( ClassVar );
}
<ClassVar>{SCOPENAME}{BN}*/"(" {
- if (insideIDL && qstrncmp(yytext,"switch",6)==0 && !isId(yytext[6]))
+ if (yyextra->insideIDL && qstrncmp(yytext,"switch",6)==0 && !isId(yytext[6]))
{
// Corba IDL style union
- roundCount=0;
+ yyextra->roundCount=0;
BEGIN(SkipUnionSwitch);
}
else
{
- addType();
- current->name = yytext;
- current->name = current->name.stripWhiteSpace();
- lineCount();
+ addType(yyscanner);
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ lineCount(yyscanner);
BEGIN( FindMembers );
}
}
<ClassVar>"," {
- if (isTypedef)
+ if (yyextra->isTypedef)
{
// multiple types in one typedef
unput(',');
- current->type.prepend("typedef ");
+ yyextra->current->type.prepend("typedef ");
BEGIN(FindMembers);
}
else
@@ -5650,12 +5333,12 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
- if (insideCli)
+ if (yyextra->insideCli)
{
if (yytext[0]=='s') // sealed
- current->spec |= Entry::SealedClass;
+ yyextra->current->spec |= Entry::SealedClass;
else // abstract
- current->spec |= Entry::AbstractClass;
+ yyextra->current->spec |= Entry::AbstractClass;
BEGIN( ClassVar );
}
else
@@ -5664,66 +5347,66 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<ClassVar>{ID} {
- if (insideCpp || insideObjC)
+ if (yyextra->insideCpp || yyextra->insideObjC)
{
- current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext);
}
- if (insideIDL && qstrcmp(yytext,"switch")==0)
+ if (yyextra->insideIDL && qstrcmp(yytext,"switch")==0)
{
// Corba IDL style union
- roundCount=0;
+ yyextra->roundCount=0;
BEGIN(SkipUnionSwitch);
}
- else if ((insideJava || insidePHP || insideJS || insideSlice) && (qstrcmp(yytext,"implements")==0 || qstrcmp(yytext,"extends")==0))
+ else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (qstrcmp(yytext,"implements")==0 || qstrcmp(yytext,"extends")==0))
{
- current->type.resize(0);
- baseProt=Public;
- baseVirt=Normal;
- baseName.resize(0);
+ yyextra->current->type.resize(0);
+ yyextra->baseProt=Public;
+ yyextra->baseVirt=Normal;
+ yyextra->baseName.resize(0);
BEGIN( BasesProt ) ;
}
- else if (insideCS && qstrcmp(yytext,"where")==0) // C# type constraint
+ else if (yyextra->insideCS && qstrcmp(yytext,"where")==0) // C# type constraint
{
- current->typeConstr.clear();
- current->typeConstr.push_back(Argument());
- lastCSConstraint = YY_START;
+ yyextra->current->typeConstr.clear();
+ yyextra->current->typeConstr.push_back(Argument());
+ yyextra->lastCSConstraint = YY_START;
BEGIN( CSConstraintName );
}
- else if (insideCli && qstrcmp(yytext,"abstract")==0)
+ else if (yyextra->insideCli && qstrcmp(yytext,"abstract")==0)
{
- current->spec|=Entry::Abstract;
+ yyextra->current->spec|=Entry::Abstract;
}
- else if (insideCli && qstrcmp(yytext,"sealed")==0)
+ else if (yyextra->insideCli && qstrcmp(yytext,"sealed")==0)
{
- current->spec|=Entry::Sealed;
+ yyextra->current->spec|=Entry::Sealed;
}
else if (qstrcmp(yytext,"final")==0)
{
- current->spec|=Entry::Final;
+ yyextra->current->spec|=Entry::Final;
}
else
{
- if (current->section == Entry::ENUM_SEC)
+ if (yyextra->current->section == Entry::ENUM_SEC)
{ // found "enum a b" -> variable
- current->section = Entry::VARIABLE_SEC ;
+ yyextra->current->section = Entry::VARIABLE_SEC ;
}
- current->type += ' ' ;
- current->type += current->name ;
- current->name = yytext ;
+ yyextra->current->type += ' ' ;
+ yyextra->current->type += yyextra->current->name ;
+ yyextra->current->name = yytext ;
- if (nameIsOperator(current->name))
+ if (nameIsOperator(yyextra->current->name))
{
BEGIN( Operator );
}
}
}
<ClassVar>[(\[] {
- if (insideObjC && *yytext=='(') // class category
+ if (yyextra->insideObjC && *yytext=='(') // class category
{
- current->name+='(';
- //if (current->section!=Entry::OBJCIMPL_SEC)
+ yyextra->current->name+='(';
+ //if (yyextra->current->section!=Entry::OBJCIMPL_SEC)
//{
- current->spec|=Entry::Category;
+ yyextra->current->spec|=Entry::Category;
//}
BEGIN( ClassCategory );
}
@@ -5736,73 +5419,73 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<CSConstraintType,CSConstraintName>"/**/" { /* empty comment */ }
<CSConstraintType,CSConstraintName>("/*"[*!]|"//"[/!])("<"?) { // special comment
- fullArgString.resize(0);
- lastCopyArgChar='#'; // end marker
- lastCommentInArgContext=YY_START;
+ yyextra->fullArgString.resize(0);
+ yyextra->lastCopyArgChar='#'; // end marker
+ yyextra->lastCommentInArgContext=YY_START;
if (yytext[1]=='/')
BEGIN( CopyArgCommentLine );
else
BEGIN( CopyArgComment );
}
<CSConstraintType,CSConstraintName>"#" { // artificially inserted token to signal end of comment block
- current->typeConstr.back().docs = fullArgString;
+ yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
}
<CSConstraintType>"{" { // end of type constraint reached
// parse documentation of the constraints
- handleParametersCommentBlocks(current->typeConstr);
+ handleParametersCommentBlocks(yyscanner,yyextra->current->typeConstr);
unput('{');
- BEGIN( lastCSConstraint );
+ BEGIN( yyextra->lastCSConstraint );
}
<CSConstraintType,CSConstraintName>";" {
- handleParametersCommentBlocks(current->typeConstr);
+ handleParametersCommentBlocks(yyscanner,yyextra->current->typeConstr);
unput(';');
- BEGIN( lastCSConstraint );
+ BEGIN( yyextra->lastCSConstraint );
}
<CSConstraintName>":" {
BEGIN( CSConstraintType );
}
<CSConstraintName>{ID} {
// parameter name
- current->typeConstr.back().name=yytext;
+ yyextra->current->typeConstr.back().name=yytext;
}
<CSConstraintType>"where" { // another constraint for a different param
- current->typeConstr.push_back(Argument());
+ yyextra->current->typeConstr.push_back(Argument());
BEGIN( CSConstraintName );
}
<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
- if (current->typeConstr.back().type.isEmpty())
+ if (yyextra->current->typeConstr.back().type.isEmpty())
// first type constraint for this parameter
{
- current->typeConstr.back().type=yytext;
+ yyextra->current->typeConstr.back().type=yytext;
}
else // new type constraint for same parameter
{
- QCString name = current->typeConstr.back().name;
- current->typeConstr.push_back(Argument());
- current->typeConstr.back().name=name;
- current->typeConstr.back().type=yytext;
+ QCString name = yyextra->current->typeConstr.back().name;
+ yyextra->current->typeConstr.push_back(Argument());
+ yyextra->current->typeConstr.back().name=name;
+ yyextra->current->typeConstr.back().type=yytext;
}
}
<CSConstraintName,CSConstraintType>\n {
- lineCount();
+ lineCount(yyscanner);
}
<CSConstraintName,CSConstraintType>. {
}
<ClassCategory>{ID} {
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<ClassCategory>")"/{BN}*"{" {
- current->name+=')';
+ yyextra->current->name+=')';
BEGIN( ClassVar );
}
<ClassCategory>")"/{BN}*"<" {
- current->name+=')';
+ yyextra->current->name+=')';
BEGIN( ObjCProtocolList );
}
<ClassCategory>")" {
- current->name+=')';
- if ((current->section & Entry::Protocol) ||
- current->section == Entry::OBJCIMPL_SEC)
+ yyextra->current->name+=')';
+ if ((yyextra->current->section & Entry::Protocol) ||
+ yyextra->current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}
@@ -5814,61 +5497,61 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( ClassVar );
}
<ClassVar>":" {
- if (current->section==Entry::VARIABLE_SEC) // enum A B:2, see bug 748208
+ if (yyextra->current->section==Entry::VARIABLE_SEC) // enum A B:2, see bug 748208
{
- current->bitfields+=":";
- current->args.resize(0);
+ yyextra->current->bitfields+=":";
+ yyextra->current->args.resize(0);
BEGIN(BitFields);
}
- else if (current->section==Entry::ENUM_SEC) // enum E:2, see bug 313527,
+ else if (yyextra->current->section==Entry::ENUM_SEC) // enum E:2, see bug 313527,
// or C++11 style enum: 'E : unsigned int {...}'
{
- current->args.resize(0);
+ yyextra->current->args.resize(0);
BEGIN(EnumBaseType);
}
else
{
- current->type.resize(0);
- if ((current->spec & Entry::Interface) ||
- (current->spec & Entry::Struct) ||
- (current->spec & Entry::Ref) ||
- (current->spec & Entry::Value) ||
- insidePHP || insideCS || insideD || insideObjC || insideIDL
+ yyextra->current->type.resize(0);
+ if ((yyextra->current->spec & Entry::Interface) ||
+ (yyextra->current->spec & Entry::Struct) ||
+ (yyextra->current->spec & Entry::Ref) ||
+ (yyextra->current->spec & Entry::Value) ||
+ yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
)
- baseProt=Public;
+ yyextra->baseProt=Public;
else
- baseProt=Private;
- baseVirt=Normal;
- baseName.resize(0);
+ yyextra->baseProt=Private;
+ yyextra->baseVirt=Normal;
+ yyextra->baseName.resize(0);
BEGIN( BasesProt ) ;
}
}
<ClassVar>[;=*&] {
unput(*yytext);
- if (isTypedef) // typedef of a class, put typedef keyword back
+ if (yyextra->isTypedef) // typedef of a class, put typedef keyword back
{
- current->type.prepend("typedef");
+ yyextra->current->type.prepend("typedef");
}
if ((yytext[0]=='*' || yytext[0]=='&') &&
- current->section == Entry::ENUM_SEC)
+ yyextra->current->section == Entry::ENUM_SEC)
{ // found "enum a *b" -> variable
- current->section = Entry::VARIABLE_SEC ;
+ yyextra->current->section = Entry::VARIABLE_SEC ;
}
BEGIN( FindMembers );
}
<Bases,ClassVar>"///"/[^/] {
- if (!insideObjC)
+ if (!yyextra->insideObjC)
{
REJECT;
}
else
{
- lineCount();
- current->program+=yytext;
- current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- curlyCount=0;
+ lineCount(yyscanner);
+ yyextra->current->program+=yytext;
+ yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->curlyCount=0;
BEGIN( ReadBodyIntf );
}
}
@@ -5876,56 +5559,56 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<Bases,ClassVar>("//"{B}*)?"/*!" |
<Bases,ClassVar>"//!" |
<Bases,ClassVar>[\-+]{BN}* {
- if (!insideObjC)
+ if (!yyextra->insideObjC)
{
REJECT;
}
else
{
- lineCount();
- current->program+=yytext;
- current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- curlyCount=0;
+ lineCount(yyscanner);
+ yyextra->current->program+=yytext;
+ yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->curlyCount=0;
BEGIN( ReadBodyIntf );
}
}
<CompoundName,ClassVar>{B}*"{"{B}* {
- current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- current->name = removeRedundantWhiteSpace(current->name);
- if (current->name.isEmpty() && !isTypedef) // anonymous compound
+ yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->name = removeRedundantWhiteSpace(yyextra->current->name);
+ if (yyextra->current->name.isEmpty() && !yyextra->isTypedef) // anonymous compound
{
- if (current->section==Entry::NAMESPACE_SEC) // allow reopening of anonymous namespaces
+ if (yyextra->current->section==Entry::NAMESPACE_SEC) // allow reopening of anonymous namespaces
{
if (Config_getBool(EXTRACT_ANON_NSPACES)) // use visible name
{
- current->name="anonymous_namespace{"+stripPath(current->fileName)+"}";
+ yyextra->current->name="anonymous_namespace{"+stripPath(yyextra->current->fileName)+"}";
}
else // use invisible name
{
- current->name.sprintf("@%d",anonNSCount);
+ yyextra->current->name.sprintf("@%d",yyextra->anonNSCount);
}
}
else
{
- current->name.sprintf("@%d",anonCount++);
+ yyextra->current->name.sprintf("@%d",yyextra->anonCount++);
}
}
- curlyCount=0;
- if (current_root && // not a nested struct inside an @interface section
- !(current_root->spec & Entry::Interface) &&
- ((current->spec & (Entry::Interface | Entry::Protocol | Entry::Category) ||
- current->section==Entry::OBJCIMPL_SEC)
+ yyextra->curlyCount=0;
+ if (yyextra->current_root && // not a nested struct yyextra->inside an @interface section
+ !(yyextra->current_root->spec & Entry::Interface) &&
+ ((yyextra->current->spec & (Entry::Interface | Entry::Protocol | Entry::Category) ||
+ yyextra->current->section==Entry::OBJCIMPL_SEC)
) &&
- insideObjC
+ yyextra->insideObjC
)
{ // ObjC body that ends with @end
BEGIN( ReadBodyIntf );
}
- else if (current->section==Entry::NAMESPACE_SEC)
+ else if (yyextra->current->section==Entry::NAMESPACE_SEC)
{ // namespace body
BEGIN( ReadNSBody );
}
@@ -5934,60 +5617,60 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( ReadBody ) ;
}
}
-<BasesProt>"virtual"{BN}+ { lineCount(); baseVirt = Virtual; }
-<BasesProt>"public"{BN}+ { lineCount(); baseProt = Public; }
-<BasesProt>"protected"{BN}+ { lineCount(); baseProt = Protected; }
-<BasesProt>"internal"{BN}+ { if (!insideCli) REJECT ; lineCount(); baseProt = Package; }
-<BasesProt>"private"{BN}+ { lineCount(); baseProt = Private; }
-<BasesProt>{BN} { lineCount(); }
+<BasesProt>"virtual"{BN}+ { lineCount(yyscanner); yyextra->baseVirt = Virtual; }
+<BasesProt>"public"{BN}+ { lineCount(yyscanner); yyextra->baseProt = Public; }
+<BasesProt>"protected"{BN}+ { lineCount(yyscanner); yyextra->baseProt = Protected; }
+<BasesProt>"internal"{BN}+ { if (!yyextra->insideCli) REJECT ; lineCount(yyscanner); yyextra->baseProt = Package; }
+<BasesProt>"private"{BN}+ { lineCount(yyscanner); yyextra->baseProt = Private; }
+<BasesProt>{BN} { lineCount(yyscanner); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); }
<Bases>("\\")?({ID}"\\")*{ID} { // PHP namespace token, not sure if interspacing is allowed but it gives problems (see bug 640847)
- if (!insidePHP)
+ if (!yyextra->insidePHP)
{
REJECT;
}
else // PHP base class of the form \Ns\Cl or Ns\Cl
{
- lineCount();
+ lineCount(yyscanner);
QCString bn=yytext;
bn = substitute(bn,"\\","::");
- baseName += bn;
- current->args += ' ';
- current->args += yytext;
+ yyextra->baseName += bn;
+ yyextra->current->args += ' ';
+ yyextra->current->args += yytext;
}
}
<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} {
- lineCount();
+ lineCount(yyscanner);
QCString baseScope = yytext;
- if (insideCS && baseScope.stripWhiteSpace()=="where")
+ if (yyextra->insideCS && baseScope.stripWhiteSpace()=="where")
{
// type constraint for a class
- current->typeConstr.clear();
- current->typeConstr.push_back(Argument());
- lastCSConstraint = YY_START;
+ yyextra->current->typeConstr.clear();
+ yyextra->current->typeConstr.push_back(Argument());
+ yyextra->lastCSConstraint = YY_START;
BEGIN( CSConstraintName );
}
else
{
- baseName+=yytext;
- current->args += ' ';
- current->args += yytext;
+ yyextra->baseName+=yytext;
+ yyextra->current->args += ' ';
+ yyextra->current->args += yytext;
}
}
<Bases>{BN}*{ID}("."{ID})* { // Java style class
QCString name = substitute(yytext,".","::");
- baseName += name;
- current->args += ' ';
- current->args += name;
+ yyextra->baseName += name;
+ yyextra->current->args += ' ';
+ yyextra->current->args += name;
}
<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
- if (!insideObjC)
+ if (!yyextra->insideObjC)
{
REJECT;
}
else
{
- lineCount();
+ lineCount(yyscanner);
unput('{');
}
}
@@ -5999,53 +5682,53 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
unput('}');
unput('{');
}
-<ClassVar>"<" { current->name += *yytext;
- sharpCount=1;
- roundCount=0;
- lastSkipSharpContext = YY_START;
- specName = &current->name;
+<ClassVar>"<" { yyextra->current->name += *yytext;
+ yyextra->sharpCount=1;
+ yyextra->roundCount=0;
+ yyextra->lastSkipSharpContext = YY_START;
+ yyextra->specName = &yyextra->current->name;
BEGIN ( Specialization );
}
<Bases>{BN}*"<" {
- lineCount();
- sharpCount=1;
- roundCount=0;
- lastSkipSharpContext = YY_START;
- if (insideObjC) // start of protocol list
+ lineCount(yyscanner);
+ yyextra->sharpCount=1;
+ yyextra->roundCount=0;
+ yyextra->lastSkipSharpContext = YY_START;
+ if (yyextra->insideObjC) // start of protocol list
{
unput(',');
}
else // template specialization
{
- //if (insideCS) // generic
+ //if (yyextra->insideCS) // generic
//{
- // baseName+="-g";
+ // yyextra->baseName+="-g";
//}
- templateStr = yytext;
- specName = &templateStr;
+ yyextra->templateStr = yytext;
+ yyextra->specName = &yyextra->templateStr;
BEGIN ( Specialization );
}
}
-<Specialization>"<" { *specName += *yytext;
- if (roundCount==0) sharpCount++;
+<Specialization>"<" { *yyextra->specName += *yytext;
+ if (yyextra->roundCount==0) yyextra->sharpCount++;
}
<Specialization>">" {
- *specName += *yytext;
- if (roundCount==0 && --sharpCount<=0)
+ *yyextra->specName += *yytext;
+ if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
- baseName+=removeRedundantWhiteSpace(*specName);
- BEGIN(lastSkipSharpContext);
+ yyextra->baseName+=removeRedundantWhiteSpace(*yyextra->specName);
+ BEGIN(yyextra->lastSkipSharpContext);
}
}
-<Specialization>{BN}+ { lineCount(); *specName +=' '; }
-<Specialization>"<<" { *specName += yytext; }
+<Specialization>{BN}+ { lineCount(yyscanner); *yyextra->specName +=' '; }
+<Specialization>"<<" { *yyextra->specName += yytext; }
<Specialization>">>"/{B}*"::" { // M$ C++ extension to allow >> to close a template...
unput('>');
unput(' ');
unput('>');
}
<Specialization>">>" {
- if (insideCS) // for C# >> ends a nested template
+ if (yyextra->insideCS) // for C# >> ends a nested template
{
REJECT;
}
@@ -6055,9 +5738,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
// We require the bitshift to be enclosed in braces.
// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
{
- if (roundCount>0)
+ if (yyextra->roundCount>0)
{
- *specName += yytext;
+ *yyextra->specName += yytext;
}
else
{
@@ -6067,64 +5750,64 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
}
-<Specialization>"typename"{BN}+ { lineCount(); }
-<Specialization>"(" { *specName += *yytext; roundCount++; }
-<Specialization>")" { *specName += *yytext; roundCount--; }
-
-<Specialization>"\\\\" { *specName += *yytext;}
-<Specialization>"\\'" { *specName += *yytext;}
-<Specialization>"\\\"" { *specName += *yytext;}
-<Specialization>"'" { *specName += *yytext;BEGIN(SpecializationSingleQuote);}
-<Specialization>"\"" { *specName += *yytext;BEGIN(SpecializationDoubleQuote);}
-<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *specName += *yytext;}
-<SpecializationSingleQuote>"\\'" { *specName += *yytext;}
-<SpecializationSingleQuote>"'" { *specName += *yytext; BEGIN(Specialization);}
-<SpecializationDoubleQuote>"\\\"" { *specName += *yytext;}
-<SpecializationDoubleQuote>"\"" { *specName += *yytext; BEGIN(Specialization);}
-<SpecializationSingleQuote,SpecializationDoubleQuote>. { *specName += *yytext;}
+<Specialization>"typename"{BN}+ { lineCount(yyscanner); }
+<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
+<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
+
+<Specialization>"\\\\" { *yyextra->specName += *yytext;}
+<Specialization>"\\'" { *yyextra->specName += *yytext;}
+<Specialization>"\\\"" { *yyextra->specName += *yytext;}
+<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
+<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
+<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
+<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
+<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
+<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
+<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
+<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
<Specialization>. {
- *specName += *yytext;
+ *yyextra->specName += *yytext;
}
-<SkipRound>"(" { ++roundCount; }
-<SkipRound>")" { if (--roundCount<0)
- BEGIN ( lastSkipRoundContext );
+<SkipRound>"(" { ++yyextra->roundCount; }
+<SkipRound>")" { if (--yyextra->roundCount<0)
+ BEGIN ( yyextra->lastSkipRoundContext );
}
<SkipRound>\" {
- lastStringContext=SkipRound;
+ yyextra->lastStringContext=SkipRound;
BEGIN(SkipString);
}
-<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) { lineCount();
- if (insideProtocolList)
+<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) { lineCount(yyscanner);
+ if (yyextra->insideProtocolList)
{
- baseName+="-p";
+ yyextra->baseName+="-p";
}
else
{
- current->args += ',' ;
+ yyextra->current->args += ',' ;
}
- current->name = removeRedundantWhiteSpace(current->name);
- if (!baseName.isEmpty())
+ yyextra->current->name = removeRedundantWhiteSpace(yyextra->current->name);
+ if (!yyextra->baseName.isEmpty())
{
- current->extends.push_back(
- BaseInfo(baseName,baseProt,baseVirt)
+ yyextra->current->extends.push_back(
+ BaseInfo(yyextra->baseName,yyextra->baseProt,yyextra->baseVirt)
);
}
- if ((current->spec & (Entry::Interface|Entry::Struct)) ||
- insideJava || insidePHP || insideCS ||
- insideD || insideObjC || insideIDL || insideSlice)
+ if ((yyextra->current->spec & (Entry::Interface|Entry::Struct)) ||
+ yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
+ yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
{
- baseProt=Public;
+ yyextra->baseProt=Public;
}
else
{
- baseProt=Private;
+ yyextra->baseProt=Private;
}
- baseVirt=Normal;
- baseName.resize(0);
+ yyextra->baseVirt=Normal;
+ yyextra->baseName.resize(0);
if (*yytext=='>')
{ // end of a ObjC protocol list
- insideProtocolList=FALSE;
+ yyextra->insideProtocolList=FALSE;
if (yyleng==1)
{
unput('{'); // dummy start body
@@ -6136,23 +5819,23 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
else
{
- if (*yytext==',' && insideObjC) // Begin of protocol list
+ if (*yytext==',' && yyextra->insideObjC) // Begin of protocol list
{
- insideProtocolList=TRUE;
+ yyextra->insideProtocolList=TRUE;
}
BEGIN(BasesProt);
}
}
-<Bases>{B}*"{"{B}* { current->fileName = yyFileName ;
- current->startLine = yyLineNr ;
- current->startColumn = yyColNr;
- current->name = removeRedundantWhiteSpace(current->name);
- if (!baseName.isEmpty())
- current->extends.push_back(
- BaseInfo(baseName,baseProt,baseVirt)
+<Bases>{B}*"{"{B}* { yyextra->current->fileName = yyextra->yyFileName ;
+ yyextra->current->startLine = yyextra->yyLineNr ;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->name = removeRedundantWhiteSpace(yyextra->current->name);
+ if (!yyextra->baseName.isEmpty())
+ yyextra->current->extends.push_back(
+ BaseInfo(yyextra->baseName,yyextra->baseProt,yyextra->baseVirt)
);
- curlyCount=0;
- if (insideObjC)
+ yyextra->curlyCount=0;
+ if (yyextra->insideObjC)
{
BEGIN( ReadBodyIntf );
}
@@ -6162,217 +5845,214 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<SkipUnionSwitch>{B}*"(" {
- roundCount++;
+ yyextra->roundCount++;
}
<SkipUnionSwitch>")" {
- if (--roundCount==0)
+ if (--yyextra->roundCount==0)
{
BEGIN(ClassVar);
}
}
-<SkipUnionSwitch>\n { lineCount(); }
+<SkipUnionSwitch>\n { lineCount(yyscanner); }
<SkipUnionSwitch>.
-<Comment>{BN}+ { current->program += yytext ;
- lineCount() ;
+<Comment>{BN}+ { yyextra->current->program += yytext ;
+ lineCount(yyscanner) ;
}
-<Comment>"/*" { current->program += yytext ; }
-<Comment>"//" { current->program += yytext ; }
+<Comment>"/*" { yyextra->current->program += yytext ; }
+<Comment>"//" { yyextra->current->program += yytext ; }
<Comment>{CMD}("code"|"verbatim") {
- insideCode=TRUE;
- current->program += yytext ;
+ yyextra->insideCode=TRUE;
+ yyextra->current->program += yytext ;
}
<Comment>{CMD}("endcode"|"endverbatim") {
- insideCode=FALSE;
- current->program += yytext ;
+ yyextra->insideCode=FALSE;
+ yyextra->current->program += yytext ;
}
-<Comment>[^ \.\t\r\n\/\*]+ { current->program += yytext ; }
-<Comment>"*/" { current->program += yytext ;
- if (!insideCode) BEGIN( lastContext ) ;
+<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program += yytext ; }
+<Comment>"*/" { yyextra->current->program += yytext ;
+ if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
}
-<Comment>. { current->program += *yytext ; }
+<Comment>. { yyextra->current->program += *yytext ; }
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>("//"{B}*)?"/*!" {
- //printf("Start doc block at %d\n",yyLineNr);
- removeSlashes=(yytext[1]=='/');
- tmpDocType=-1;
- if (!current->doc.isEmpty())
+ //printf("Start doc block at %d\n",yyextra->yyLineNr);
+ if (!yyextra->current->doc.isEmpty())
{
- current->doc+="\n\n";
+ yyextra->current->doc+="\n\n";
}
else
{
- current->docLine = yyLineNr;
- current->docFile = yyFileName;
+ yyextra->current->docLine = yyextra->yyLineNr;
+ yyextra->current->docFile = yyextra->yyFileName;
}
- lastDocContext = YY_START;
- if (current_root->section & Entry::SCOPE_MASK)
+ yyextra->lastDocContext = YY_START;
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- current->inside = current_root->name+"::";
+ yyextra->current->inside = yyextra->current_root->name+"::";
}
- docBlockContext = YY_START;
- docBlockInBody = YY_START==SkipCurly;
- docBlockAutoBrief = Config_getBool(QT_AUTOBRIEF);
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = YY_START==SkipCurly;
+ yyextra->docBlockAutoBrief = Config_getBool(QT_AUTOBRIEF);
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
- if (docBlockAutoBrief)
+ if (yyextra->docBlockAutoBrief)
{
- current->briefLine = yyLineNr;
- current->briefFile = yyFileName;
+ yyextra->current->briefLine = yyextra->yyLineNr;
+ yyextra->current->briefFile = yyextra->yyFileName;
}
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>"/**"[*]+{BL} {
+ bool javadocBanner = Config_getBool(JAVADOC_BANNER);
+ lineCount(yyscanner);
- static bool javadocBanner = Config_getBool(JAVADOC_BANNER);
-
- if( javadocBanner ) {
- lastDocContext = YY_START;
+ if( javadocBanner )
+ {
+ yyextra->lastDocContext = YY_START;
- //printf("Found comment banner at %s:%d\n",yyFileName,yyLineNr);
- if (current_root->section & Entry::SCOPE_MASK)
- {
- current->inside = current_root->name+"::";
- }
- current->docLine = yyLineNr;
- current->docFile = yyFileName;
- docBlockContext = YY_START;
- docBlockInBody = YY_START==SkipCurly;
- static bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF);
- docBlockAutoBrief = javadocAutoBrief;
+ //printf("Found comment banner at %s:%d\n",yyextra->yyFileName,yyextra->yyLineNr);
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
+ {
+ yyextra->current->inside = yyextra->current_root->name+"::";
+ }
+ yyextra->current->docLine = yyextra->yyLineNr;
+ yyextra->current->docFile = yyextra->yyFileName;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = YY_START==SkipCurly;
+ bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF);
+ yyextra->docBlockAutoBrief = javadocAutoBrief;
- QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
- if (docBlockAutoBrief)
- {
- current->briefLine = yyLineNr;
- current->briefFile = yyFileName;
- }
- startCommentBlock(FALSE);
- BEGIN( DocBlock );
- } else {
- current->program += yytext ;
- lastContext = YY_START ;
- BEGIN( Comment ) ;
+ if (yyextra->docBlockAutoBrief)
+ {
+ yyextra->current->briefLine = yyextra->yyLineNr;
+ yyextra->current->briefFile = yyextra->yyFileName;
+ }
+ startCommentBlock(yyscanner,FALSE);
+ BEGIN( DocBlock );
+ }
+ else
+ {
+ yyextra->current->program += yytext ;
+ yyextra->lastContext = YY_START ;
+ BEGIN( Comment ) ;
}
-
}
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>("//"{B}*)?"/**"/[^/*] {
- removeSlashes=(yytext[1]=='/');
- lastDocContext = YY_START;
+ yyextra->lastDocContext = YY_START;
- //printf("Found comment block at %s:%d\n",yyFileName,yyLineNr);
- if (current_root->section & Entry::SCOPE_MASK)
+ //printf("Found comment block at %s:%d\n",yyextra->yyFileName,yyextra->yyLineNr);
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- current->inside = current_root->name+"::";
+ yyextra->current->inside = yyextra->current_root->name+"::";
}
- current->docLine = yyLineNr;
- current->docFile = yyFileName;
- docBlockContext = YY_START;
- docBlockInBody = YY_START==SkipCurly;
- static bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF);
- docBlockAutoBrief = javadocAutoBrief;
+ yyextra->current->docLine = yyextra->yyLineNr;
+ yyextra->current->docFile = yyextra->yyFileName;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = YY_START==SkipCurly;
+ bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF);
+ yyextra->docBlockAutoBrief = javadocAutoBrief;
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
- if (docBlockAutoBrief)
+ if (yyextra->docBlockAutoBrief)
{
- current->briefLine = yyLineNr;
- current->briefFile = yyFileName;
+ yyextra->current->briefLine = yyextra->yyLineNr;
+ yyextra->current->briefFile = yyextra->yyFileName;
}
- startCommentBlock(FALSE);
+ startCommentBlock(yyscanner,FALSE);
BEGIN( DocBlock );
}
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"//!" {
- tmpDocType=-1;
- lastDocContext = YY_START;
- if (current_root->section & Entry::SCOPE_MASK)
+ yyextra->lastDocContext = YY_START;
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- current->inside = current_root->name+"::";
+ yyextra->current->inside = yyextra->current_root->name+"::";
}
- docBlockContext = YY_START;
- docBlockInBody = YY_START==SkipCurly;
- docBlockAutoBrief = FALSE;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = YY_START==SkipCurly;
+ yyextra->docBlockAutoBrief = FALSE;
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
- startCommentBlock(current->brief.isEmpty());
+ startCommentBlock(yyscanner,yyextra->current->brief.isEmpty());
BEGIN( DocLine );
}
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"///"/[^/] {
- tmpDocType=-1;
- lastDocContext = YY_START;
- if (current_root->section & Entry::SCOPE_MASK)
+ yyextra->lastDocContext = YY_START;
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- current->inside = current_root->name+"::";
+ yyextra->current->inside = yyextra->current_root->name+"::";
}
- docBlockContext = YY_START;
- docBlockInBody = YY_START==SkipCurly;
- docBlockAutoBrief = FALSE;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = YY_START==SkipCurly;
+ yyextra->docBlockAutoBrief = FALSE;
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock=indent;
- startCommentBlock(current->brief.isEmpty());
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock=indent;
+ startCommentBlock(yyscanner,yyextra->current->brief.isEmpty());
BEGIN( DocLine );
}
<FindMembers>"extern"{BN}*"\"C"("++")?"\""{BN}*("{")? {
- lineCount();
- externC=TRUE;
+ lineCount(yyscanner);
+ yyextra->externC=TRUE;
}
<FindMembers>"{" {
- if (externC)
+ if (yyextra->externC)
{
- externC=FALSE;
+ yyextra->externC=FALSE;
}
- else if (insideCS &&
- !current->name.isEmpty() &&
- !current->type.isEmpty())
+ else if (yyextra->insideCS &&
+ !yyextra->current->name.isEmpty() &&
+ !yyextra->current->type.isEmpty())
{
- if (containsWord(current->type,"event")) // event
+ if (containsWord(yyextra->current->type,"event")) // event
{
- current->mtype = mtype = Event;
+ yyextra->current->mtype = yyextra->mtype = Event;
}
else // property
{
- current->mtype = mtype = Property;
+ yyextra->current->mtype = yyextra->mtype = Property;
}
- current->bodyLine = yyLineNr;
- curlyCount=0;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->curlyCount=0;
BEGIN( CSAccessorDecl );
}
- else if (insideIDL && (current->spec & Entry::Attribute))
+ else if (yyextra->insideIDL && (yyextra->current->spec & Entry::Attribute))
{
// UNO IDL: attributes may have setter and getter
// exception specifications
- current->exception = " {";
+ yyextra->current->exception = " {";
BEGIN(UNOIDLAttributeBlock);
}
else
{
- if ((insideJava || insideCS || insideD) &&
- current->name.isEmpty()
+ if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
+ yyextra->current->name.isEmpty()
)
{
// static Java initializer
- needsSemi = FALSE;
- if (current->stat)
+ yyextra->needsSemi = FALSE;
+ if (yyextra->current->stat)
{
- current->name="[static initializer]";
- current->type.resize(0);
+ yyextra->current->name="[static initializer]";
+ yyextra->current->type.resize(0);
}
else
{
- current->name="[instance initializer]";
+ yyextra->current->name="[instance initializer]";
}
unput(*yytext);
BEGIN( Function );
@@ -6380,122 +6060,122 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else
{
// pre C++11 code -> ignore the initializer
- //needsSemi = TRUE;
- //current->type.resize(0);
- //current->name.resize(0);
- //current->args.resize(0);
- //current->argList.clear();
- //curlyCount=0;
+ //yyextra->needsSemi = TRUE;
+ //yyextra->current->type.resize(0);
+ //yyextra->current->name.resize(0);
+ //yyextra->current->args.resize(0);
+ //yyextra->current->argList.clear();
+ //yyextra->curlyCount=0;
//BEGIN( SkipCurlyBlock );
// C++11 style initializer list
- current->bodyLine = yyLineNr;
- current->initializer = yytext;
- lastInitializerContext = YY_START;
- initBracketCount=1;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->initializer = yytext;
+ yyextra->lastInitializerContext = YY_START;
+ yyextra->initBracketCount=1;
BEGIN(ReadInitializer);
}
}
}
-<CSAccessorDecl>"{" { curlyCount++; }
+<CSAccessorDecl>"{" { yyextra->curlyCount++; }
<CSAccessorDecl>"}"{B}*"=" {
// fall back to next rule if it's not the right bracket
- if (curlyCount != 0) REJECT;
- current->initializer = "=";
- current->endBodyLine=yyLineNr;
- lastInitializerContext = FindMembers;
+ if (yyextra->curlyCount != 0) REJECT;
+ yyextra->current->initializer = "=";
+ yyextra->current->endBodyLine=yyextra->yyLineNr;
+ yyextra->lastInitializerContext = FindMembers;
BEGIN(ReadInitializer);
}
<CSAccessorDecl>"}" {
- if (curlyCount)
+ if (yyextra->curlyCount)
{
- curlyCount--;
+ yyextra->curlyCount--;
}
else
{
- mtype = Method;
- virt = Normal;
+ yyextra->mtype = Method;
+ yyextra->virt = Normal;
// not really important, but while we are at it
- current->endBodyLine=yyLineNr;
+ yyextra->current->endBodyLine=yyextra->yyLineNr;
unput(';');
BEGIN(FindMembers);
}
}
-<CSAccessorDecl>"private "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::PrivateSettable; }
-<CSAccessorDecl>"protected "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::ProtectedSettable; }
-<CSAccessorDecl>"private "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::PrivateGettable; }
-<CSAccessorDecl>"protected "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::ProtectedGettable; }
-<CSAccessorDecl>"set" { if (curlyCount==0) current->spec |= Entry::Settable; }
-<CSAccessorDecl>"get" { if (curlyCount==0) current->spec |= Entry::Gettable; }
-<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
-<CSAccessorDecl>"remove" { if (curlyCount==0) current->spec |= Entry::Removable; }
-<CSAccessorDecl>"raise" { if (curlyCount==0) current->spec |= Entry::Raisable; }
+<CSAccessorDecl>"private "{BN}*"set" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::PrivateSettable; }
+<CSAccessorDecl>"protected "{BN}*"set" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::ProtectedSettable; }
+<CSAccessorDecl>"private "{BN}*"get" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::PrivateGettable; }
+<CSAccessorDecl>"protected "{BN}*"get" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::ProtectedGettable; }
+<CSAccessorDecl>"set" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::Settable; }
+<CSAccessorDecl>"get" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::Gettable; }
+<CSAccessorDecl>"add" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::Addable; }
+<CSAccessorDecl>"remove" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::Removable; }
+<CSAccessorDecl>"raise" { if (yyextra->curlyCount==0) yyextra->current->spec |= Entry::Raisable; }
<CSAccessorDecl>"\"" { BEGIN(CSString);}
<CSAccessorDecl>"." {}
-<CSAccessorDecl>\n { lineCount(); }
+<CSAccessorDecl>\n { lineCount(yyscanner); }
<CSString>"\"" { BEGIN(CSAccessorDecl);}
<CSString>"//" {} // Otherwise the rule <*>"//" will kick in
<CSString>"/*" {} // Otherwise the rule <*>"/*" will kick in
-<CSString>\n { lineCount(); }
+<CSString>\n { lineCount(yyscanner); }
<CSString>"." {}
/* ---- Slice-specific rules ------ */
<SliceSequence>{SCOPENAME} {
- if (current->spec&Entry::Local)
+ if (yyextra->current->spec&Entry::Local)
{
- current->type = "local ";
+ yyextra->current->type = "local ";
}
- current->type += "sequence<";
- current->type += yytext;
- current->type += ">";
+ yyextra->current->type += "sequence<";
+ yyextra->current->type += yytext;
+ yyextra->current->type += ">";
}
<SliceSequence>{BN}*">"{BN}* {
- lineCount();
+ lineCount(yyscanner);
BEGIN(SliceSequenceName);
}
<SliceSequenceName>{ID}{BN}* {
- lineCount();
- current->name = yytext ;
- current->name = current->name.stripWhiteSpace();
+ lineCount(yyscanner);
+ yyextra->current->name = yytext ;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
}
<SliceSequenceName>";" {
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(FindMembers);
}
<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
- lineCount();
- if (current->spec&Entry::Local)
+ lineCount(yyscanner);
+ if (yyextra->current->spec&Entry::Local)
{
- current->type = "local ";
+ yyextra->current->type = "local ";
}
- current->type += "dictionary<";
- current->type += yytext;
- current->type += ">";
- current->type = current->type.simplifyWhiteSpace();
+ yyextra->current->type += "dictionary<";
+ yyextra->current->type += yytext;
+ yyextra->current->type += ">";
+ yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
}
<SliceDictionary>{BN}*">"{BN}* {
- lineCount();
+ lineCount(yyscanner);
BEGIN(SliceDictionaryName);
}
<SliceDictionaryName>{ID}{BN}* {
- lineCount();
- current->name = yytext ;
- current->name = current->name.stripWhiteSpace();
+ lineCount(yyscanner);
+ yyextra->current->name = yytext ;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
}
<SliceDictionaryName>";" {
- current->section = Entry::VARIABLE_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(FindMembers);
}
@@ -6505,100 +6185,100 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
/* ---- Single line comments ------ */
<DocLine>[^\n]*"\n"[ \t]*"//"[/!][<]? { // continuation of multiline C++-style comment
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
int markerLen = yytext[yyleng-1]=='<' ? 4 : 3;
- docBlock.resize(docBlock.length() - markerLen);
- lineCount();
+ yyextra->docBlock.resize(yyextra->docBlock.length() - markerLen);
+ lineCount(yyscanner);
}
<DocLine>{B}*"///"[/]+{B}*/"\n" { // ignore marker line (see bug700345)
- handleCommentBlock(docBlock.data(),current->brief.isEmpty());
- BEGIN( docBlockContext );
+ handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ BEGIN( yyextra->docBlockContext );
}
<DocLine>[^\n]*/"\n"{B}*"//"[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
- docBlock+=yytext;
- handleCommentBlock(docBlock.data(),current->brief.isEmpty());
- BEGIN( docBlockContext );
+ yyextra->docBlock+=yytext;
+ handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ BEGIN( yyextra->docBlockContext );
}
<DocLine>[^\n]*/"\n" { // whole line
- docBlock+=yytext;
- handleCommentBlock(docBlock.data(),current->brief.isEmpty());
- BEGIN( docBlockContext );
+ yyextra->docBlock+=yytext;
+ handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ BEGIN( yyextra->docBlockContext );
}
/* ---- Comments blocks ------ */
<DocBlock>"*"*"*/" { // end of comment block
- handleCommentBlock(docBlock.data(),FALSE);
- BEGIN(docBlockContext);
+ handleCommentBlock(yyscanner,yyextra->docBlock.data(),FALSE);
+ BEGIN(yyextra->docBlockContext);
}
<DocBlock>^{B}*"*"+/[^/] {
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock+=indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock+=indent;
}
<DocBlock>^{B}*("//")?{B}*"*"+/[^//a-z_A-Z0-9*] { // start of a comment line
QCString indent;
- indent.fill(' ',computeIndent(yytext,g_column));
- docBlock+=indent;
+ indent.fill(' ',computeIndent(yytext,yyextra->column));
+ yyextra->docBlock+=indent;
}
<DocBlock>^{B}*("//"){B}* { // strip embedded C++ comments if at the start of a line
}
<DocBlock>"//" { // slashes in the middle of a comment block
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocBlock>"/*" { // start of a new comment in the
// middle of a comment block
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocBlock>{CMD}("f$"|"f["|"f{") {
- docBlock+=yytext;
- docBlockName=&yytext[1];
- if (docBlockName.at(1)=='{')
+ yyextra->docBlock+=yytext;
+ yyextra->docBlockName=&yytext[1];
+ if (yyextra->docBlockName.at(1)=='{')
{
- docBlockName.at(1)='}';
+ yyextra->docBlockName.at(1)='}';
}
- g_fencedSize=0;
- g_nestedComment=FALSE;
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{B}*"<"{PRE}">" {
- docBlock+=yytext;
- docBlockName="<pre>";
- g_fencedSize=0;
- g_nestedComment=FALSE;
+ yyextra->docBlock+=yytext;
+ yyextra->docBlockName="<pre>";
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
- docBlock+=yytext;
- docBlockName=&yytext[1];
- g_fencedSize=0;
- g_nestedComment=FALSE;
+ yyextra->docBlock+=yytext;
+ yyextra->docBlockName=&yytext[1];
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- docBlock+=substitute(yytext,"*"," ");
- docBlockName="~~~";
- g_fencedSize=yyleng;
- g_nestedComment=FALSE;
+ yyextra->docBlock+=substitute(yytext,"*"," ");
+ yyextra->docBlockName="~~~";
+ yyextra->fencedSize=yyleng;
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- docBlock+=substitute(yytext,"*"," ");
- docBlockName="```";
- g_fencedSize=yyleng;
- g_nestedComment=FALSE;
+ yyextra->docBlock+=substitute(yytext,"*"," ");
+ yyextra->docBlockName="```";
+ yyextra->fencedSize=yyleng;
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{B}*"<code>" {
- if (insideCS)
+ if (yyextra->insideCS)
{
- docBlock+=yytext;
- docBlockName="<code>";
- g_nestedComment=FALSE;
+ yyextra->docBlock+=yytext;
+ yyextra->docBlockName="<code>";
+ yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
else
@@ -6607,49 +6287,49 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocBlock>\n { // newline
- lineCount();
- docBlock+=*yytext;
+ lineCount(yyscanner);
+ yyextra->docBlock+=*yytext;
}
<DocBlock>. { // command block
- docBlock+=*yytext;
+ yyextra->docBlock+=*yytext;
}
/* ---- Copy verbatim sections ------ */
<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
- docBlock+=yytext;
- if (docBlockName=="<pre>")
+ yyextra->docBlock+=yytext;
+ if (yyextra->docBlockName=="<pre>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
- docBlock+=yytext;
- if (docBlockName=="<code>")
+ yyextra->docBlock+=yytext;
+ if (yyextra->docBlockName=="<code>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}") {
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
BEGIN(DocBlock);
}
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
- docBlock+=yytext;
- if (&yytext[4]==docBlockName)
+ yyextra->docBlock+=yytext;
+ if (&yytext[4]==yyextra->docBlockName)
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
- if (docBlockName=="verbatim")
+ if (yyextra->docBlockName=="verbatim")
{
REJECT;
}
- else if (docBlockName=="code")
+ else if (yyextra->docBlockName=="code")
{
REJECT;
}
@@ -6657,15 +6337,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
QCString indent;
indent.fill(' ',computeIndent(yytext,0));
- docBlock+=indent;
+ yyextra->docBlock+=indent;
}
}
<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
- if (docBlockName=="code")
+ if (yyextra->docBlockName=="code")
{
QCString indent;
indent.fill(' ',computeIndent(yytext,0));
- docBlock+=indent;
+ yyextra->docBlock+=indent;
}
else
{
@@ -6673,11 +6353,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
- if (docBlockName=="code")
+ if (yyextra->docBlockName=="code")
{
QCString indent;
indent.fill(' ',computeIndent(yytext,-1));
- docBlock+=indent+"*";
+ yyextra->docBlock+=indent+"*";
}
else
{
@@ -6685,18 +6365,18 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<DocCopyBlock>^{B}*"*"+/{BN}* { // start of a comment line with one *
- if (docBlockName=="code")
+ if (yyextra->docBlockName=="code")
{
QCString indent;
- if (g_nestedComment) // keep * it is part of the code
+ if (yyextra->nestedComment) // keep * it is part of the code
{
indent.fill(' ',computeIndent(yytext,-1));
- docBlock+=indent+"*";
+ yyextra->docBlock+=indent+"*";
}
else // remove * it is part of the comment block
{
indent.fill(' ',computeIndent(yytext,0));
- docBlock+=indent;
+ yyextra->docBlock+=indent;
}
}
else
@@ -6705,45 +6385,45 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- docBlock+=substitute(yytext,"*"," ");
- if (g_fencedSize==yyleng)
+ yyextra->docBlock+=substitute(yytext,"*"," ");
+ if (yyextra->fencedSize==yyleng)
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- docBlock+=substitute(yytext,"*"," ");
- if (g_fencedSize==yyleng)
+ yyextra->docBlock+=substitute(yytext,"*"," ");
+ if (yyextra->fencedSize==yyleng)
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[^\<@/*\]~\$\\\n]+ { // any character that is not special
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocCopyBlock>"/*"|"*/"|"//" {
if (yytext[1]=='*')
{
- g_nestedComment=TRUE;
+ yyextra->nestedComment=TRUE;
}
else if (yytext[0]=='*')
{
- g_nestedComment=FALSE;
+ yyextra->nestedComment=FALSE;
}
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
<DocCopyBlock>\n { // newline
- docBlock+=*yytext;
- lineCount();
+ yyextra->docBlock+=*yytext;
+ lineCount(yyscanner);
}
<DocCopyBlock>. { // any other character
- docBlock+=*yytext;
+ yyextra->docBlock+=*yytext;
}
<DocCopyBlock><<EOF>> {
- warn(yyFileName,yyLineNr,
+ warn(yyextra->yyFileName,yyextra->yyLineNr,
"reached end of file while inside a '%s' block!\n"
"The command that should end the block seems to be missing!\n",
- docBlockName.data());
+ yyextra->docBlockName.data());
yyterminate();
}
@@ -6751,69 +6431,69 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
/* ------------- Prototype parser -------------- */
<Prototype>"operator"{B}*"("{B}*")" {
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<Prototype>"(" {
- current->args+=*yytext;
- currentArgumentContext = PrototypeQual;
- fullArgString = current->args.copy();
- copyArgString = &current->args;
+ yyextra->current->args+=*yytext;
+ yyextra->currentArgumentContext = PrototypeQual;
+ yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
<Prototype>"("({ID}"::")*({B}*[&*])+ {
- current->type+=current->name+yytext;
- current->name.resize(0);
+ yyextra->current->type+=yyextra->current->name+yytext;
+ yyextra->current->name.resize(0);
BEGIN( PrototypePtr );
}
<PrototypePtr>{SCOPENAME} {
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<PrototypePtr>"(" {
- current->args+=*yytext;
- currentArgumentContext = PrototypeQual;
- fullArgString = current->args.copy();
- copyArgString = &current->args;
+ yyextra->current->args+=*yytext;
+ yyextra->currentArgumentContext = PrototypeQual;
+ yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
<PrototypePtr>")" {
- current->type+=')';
+ yyextra->current->type+=')';
BEGIN( Prototype );
}
<PrototypePtr>. {
- current->name+=yytext;
+ yyextra->current->name+=yytext;
}
<PrototypeQual>"{" {
BEGIN( PrototypeSkipLine);
}
<PrototypeQual>{B}*"const"{B}* {
- current->args += " const ";
- current->argList.constSpecifier=TRUE;
+ yyextra->current->args += " const ";
+ yyextra->current->argList.constSpecifier=TRUE;
}
<PrototypeQual>{B}*"volatile"{B}* {
- current->args += " volatile ";
- current->argList.volatileSpecifier=TRUE;
+ yyextra->current->args += " volatile ";
+ yyextra->current->argList.volatileSpecifier=TRUE;
}
<PrototypeQual>{B}*"="{B}*"0"{B}* {
- current->args += " = 0";
- current->virt = Pure;
- current->argList.pureSpecifier=TRUE;
+ yyextra->current->args += " = 0";
+ yyextra->current->virt = Pure;
+ yyextra->current->argList.pureSpecifier=TRUE;
}
<PrototypeQual>"throw"{B}*"(" {
- current->exception = "throw(";
+ yyextra->current->exception = "throw(";
BEGIN(PrototypeExc);
}
<PrototypeExc>")" {
- current->exception += ')';
+ yyextra->current->exception += ')';
BEGIN(PrototypeQual);
}
<PrototypeExc>. {
- current->exception += *yytext;
+ yyextra->current->exception += *yytext;
}
<PrototypeQual>. {
- current->args += *yytext;
+ yyextra->current->args += *yytext;
}
<Prototype>. {
- current->name += *yytext;
+ yyextra->current->name += *yytext;
}
<PrototypeSkipLine>. {
}
@@ -6822,149 +6502,475 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<SkipCxxComment>.*"\\\n" { // line continuation
- if (insideCS)
+ if (yyextra->insideCS)
{
REJECT;
}
else
{
- lineCount();
+ lineCount(yyscanner);
}
}
<SkipCxxComment>.*/\n {
- BEGIN( lastCContext ) ;
+ BEGIN( yyextra->lastCContext ) ;
}
<SkipComment>[^\*\n]+
/* ------------ Generic rules -------------- */
<*>"[[" { // C++11 attribute
- if (!insideCpp) REJECT;
+ if (!yyextra->insideCpp) REJECT;
if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
- lastC11AttributeContext = YY_START;
+ yyextra->lastC11AttributeContext = YY_START;
BEGIN( SkipC11Attribute );
}
-<*>\n { lineCount(); }
+<*>\n { lineCount(yyscanner); }
<*>\" {
- if (insideIDL && insideCppQuote)
+ if (yyextra->insideIDL && yyextra->insideCppQuote)
{
BEGIN(EndCppQuote);
}
}
<*>"#" {
- if (!insidePHP)
+ if (!yyextra->insidePHP)
REJECT;
- lastCContext = YY_START ;
+ yyextra->lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
}
<*>\' {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- lastStringContext=YY_START;
+ yyextra->lastStringContext=YY_START;
BEGIN(SkipPHPString);
}
}
<*>\" {
- if (insidePHP)
+ if (yyextra->insidePHP)
{
- lastStringContext=YY_START;
+ yyextra->lastStringContext=YY_START;
BEGIN(SkipString);
}
}
<*>\? {
- if (insideCS && (YY_START != SkipRound))
+ if (yyextra->insideCS && (YY_START != SkipRound))
{
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- if (current->name.isEmpty())
- current->name="?";
+ if (yyextra->current->name.isEmpty())
+ yyextra->current->name="?";
else
- current->name+="?";
+ yyextra->current->name+="?";
}
else
{
- current->type+="?";
+ yyextra->current->type+="?";
}
}
}
<*>.
<SkipComment>"//"|"/*"
-<*>"/*" { lastCContext = YY_START ;
+<*>"/*" { yyextra->lastCContext = YY_START ;
BEGIN( SkipComment ) ;
}
-<SkipComment>{B}*"*/" { BEGIN( lastCContext ) ; }
+<SkipComment>{B}*"*/" { BEGIN( yyextra->lastCContext ) ; }
<*>"//" {
- lastCContext = YY_START ;
+ yyextra->lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
}
%%
//----------------------------------------------------------------------------
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int c=0;
+ while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
+ {
+ *buf = yyextra->inputString[yyextra->inputPosition++] ;
+ //printf("%d (%c)\n",*buf,*buf);
+ c++; buf++;
+ }
+ return c;
+}
+
+
+static void initParser(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->outerScopeEntries.clear();
+ yyextra->baseName.resize(0);
+ yyextra->protection = Public;
+ yyextra->baseProt = Public;
+ yyextra->sharpCount = 0;
+ yyextra->roundCount = 0;
+ yyextra->curlyCount = 0;
+ yyextra->mtype = Method;
+ yyextra->stat = FALSE;
+ yyextra->virt = Normal;
+ yyextra->baseVirt = Normal;
+ yyextra->isTypedef = FALSE;
+ yyextra->autoGroupStack.clear();
+ yyextra->insideTryBlock = FALSE;
+ yyextra->autoGroupStack.setAutoDelete(TRUE);
+ yyextra->insideFormula = FALSE;
+ yyextra->insideCode=FALSE;
+ yyextra->insideCli=Config_getBool(CPP_CLI_SUPPORT);
+ yyextra->previous = 0;
+ yyextra->firstTypedefEntry.reset();
+ yyextra->memspecEntry.reset();
+}
-static void startCommentBlock(bool brief)
+static void initEntry(yyscan_t yyscanner)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->insideJava)
+ {
+ yyextra->protection = (yyextra->current_root->spec & (Entry::Interface|Entry::Enum)) ? Public : Package;
+ }
+ yyextra->current->protection = yyextra->protection ;
+ yyextra->current->mtype = yyextra->mtype;
+ yyextra->current->virt = yyextra->virt;
+ yyextra->current->stat = yyextra->stat;
+ yyextra->current->lang = yyextra->language;
+ //printf("*** initEntry(yyscanner) yyextra->language=%d\n",yyextra->language);
+ Doxygen::docGroup.initGroupInfo(yyextra->current.get());
+ yyextra->isTypedef=FALSE;
+}
+
+
+//-----------------------------------------------------------------------------
+
+static void lineCount(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int tabSize = Config_getInt(TAB_SIZE);
+ const char *p;
+ for (p = yytext ; *p ; ++p )
+ {
+ if (*p=='\n')
+ {
+ yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
+ }
+ else if (*p=='\t')
+ {
+ yyextra->column+=tabSize - (yyextra->column%tabSize);
+ }
+ else
+ {
+ yyextra->column++,yyextra->yyColNr++;
+ }
+ }
+ //printf("lineCount()=%d\n",yyextra->column);
+}
+
+static inline int computeIndent(const char *s,int startIndent)
+{
+ int col=startIndent;
+ int tabSize=Config_getInt(TAB_SIZE);
+ const char *p=s;
+ char c;
+ while ((c=*p++))
+ {
+ if (c=='\t') col+=tabSize-(col%tabSize);
+ else if (c=='\n') col=0;
+ else col++;
+ }
+ return col;
+}
+
+static void addType(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ uint tl=yyextra->current->type.length();
+ if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!='.')
+ {
+ yyextra->current->type += ' ' ;
+ }
+ yyextra->current->type += yyextra->current->name ;
+ yyextra->current->name.resize(0) ;
+ tl=yyextra->current->type.length();
+ if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!='.')
+ {
+ yyextra->current->type += ' ' ;
+ }
+ yyextra->current->type += yyextra->current->args ;
+ yyextra->current->args.resize(0) ;
+ yyextra->current->argList.clear();
+}
+
+
+static QCString stripQuotes(const char *s)
+{
+ QCString name;
+ if (s==0 || *s==0) return name;
+ name=s;
+ if (name.at(0)=='"' && name.at(name.length()-1)=='"')
+ {
+ name=name.mid(1,name.length()-2);
+ }
+ return name;
+}
+
+//-----------------------------------------------------------------
+
+static bool nameIsOperator(QCString &name)
+{
+ int i=name.find("operator");
+ if (i==-1) return FALSE;
+ if (i==0 && !isId(name.at(8))) return TRUE; // case operator ::X
+ if (i>0 && !isId(name.at(i-1)) && !isId(name.at(i+8))) return TRUE; // case X::operator
+ return FALSE; // case TEXToperatorTEXT
+}
+
+//-----------------------------------------------------------------------------
+
+static void setContext(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->language = getLanguageFromFileName(yyextra->yyFileName);
+ yyextra->insideIDL = yyextra->language==SrcLangExt_IDL;
+ yyextra->insideJava = yyextra->language==SrcLangExt_Java;
+ yyextra->insideCS = yyextra->language==SrcLangExt_CSharp;
+ yyextra->insideD = yyextra->language==SrcLangExt_D;
+ yyextra->insidePHP = yyextra->language==SrcLangExt_PHP;
+ yyextra->insideObjC = yyextra->language==SrcLangExt_ObjC;
+ yyextra->insideJS = yyextra->language==SrcLangExt_JS;
+ yyextra->insideSlice = yyextra->language==SrcLangExt_Slice;
+ yyextra->insideCpp = yyextra->language==SrcLangExt_Cpp;
+ //printf("setContext(%s) yyextra->insideIDL=%d yyextra->insideJava=%d yyextra->insideCS=%d "
+ // "yyextra->insideD=%d yyextra->insidePHP=%d yyextra->insideObjC=%d\n",
+ // yyextra->yyFileName.data(),yyextra->insideIDL,yyextra->insideJava,yyextra->insideCS,yyextra->insideD,yyextra->insidePHP,yyextra->insideObjC
+ // );
+}
+
+//-----------------------------------------------------------------------------
+
+static void prependScope(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->current_root->section & Entry::SCOPE_MASK)
+ {
+ //printf("--- prependScope %s to %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ yyextra->current->name.prepend(yyextra->current_root->name+"::");
+ //printf("prependScope #=%d #yyextra->current=%d\n",yyextra->current_root->tArgLists->count(),yyextra->current->tArgLists->count());
+ for (const ArgumentList &srcAl : yyextra->current_root->tArgLists)
+ {
+ yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+/*! Returns TRUE iff the yyextra->current entry could be a K&R style C function */
+static bool checkForKnRstyleC(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (((QCString)yyextra->yyFileName).right(2).lower()!=".c") return FALSE; // must be a C file
+ if (yyextra->current->argList.empty()) return FALSE; // must have arguments
+ for (const Argument &a : yyextra->current->argList)
+ {
+ // in K&R style argument do not have a type, but doxygen expects a type
+ // so it will think the argument has no name
+ if (a.type.isEmpty() || !a.name.isEmpty()) return FALSE;
+ }
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------
+
+static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &oldStyleArgName)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int si = yyextra->current->args.length();
+ if (yyextra->oldStyleArgType.isEmpty()) // new argument
+ {
+ static QRegExp re("([^)]*)");
+ int bi1 = yyextra->current->args.findRev(re);
+ int bi2 = bi1!=-1 ? yyextra->current->args.findRev(re,bi1-1) : -1;
+ char c;
+ if (bi1!=-1 && bi2!=-1) // found something like "int (*func)(int arg)"
+ {
+ int s=bi2+1;
+ yyextra->oldStyleArgType = yyextra->current->args.left(s);
+ int i=s;
+ while (i<si && ((c=yyextra->current->args.at(i))=='*' || isspace((uchar)c))) i++;
+ yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
+ s=i;
+ while (i<si && isId(yyextra->current->args.at(i))) i++;
+ oldStyleArgName = yyextra->current->args.mid(s,i-s);
+ yyextra->oldStyleArgType+=yyextra->current->args.mid(i);
+ }
+ else if (bi1!=-1) // redundant braces like in "int (*var)"
+ {
+ int s=bi1;
+ yyextra->oldStyleArgType = yyextra->current->args.left(s);
+ s++;
+ int i=s+1;
+ while (i<si && ((c=yyextra->current->args.at(i))=='*' || isspace((uchar)c))) i++;
+ yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
+ s=i;
+ while (i<si && isId(yyextra->current->args.at(i))) i++;
+ oldStyleArgName = yyextra->current->args.mid(s,i-s);
+ }
+ else // normal "int *var"
+ {
+ int l=si,i=l-1,j;
+ char c;
+ // look for start of name in "type *name"
+ while (i>=0 && isId(yyextra->current->args.at(i))) i--;
+ j=i+1;
+ // look for start of *'s
+ while (i>=0 && ((c=yyextra->current->args.at(i))=='*' || isspace((uchar)c))) i--;
+ i++;
+ if (i!=l)
+ {
+ yyextra->oldStyleArgType=yyextra->current->args.left(i);
+ oldStyleArgPtr=yyextra->current->args.mid(i,j-i);
+ oldStyleArgName=yyextra->current->args.mid(j).stripWhiteSpace();
+ }
+ else
+ {
+ oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ }
+ }
+ }
+ else // continuation like *arg2 in "int *args,*arg2"
+ {
+ int l=si,j=0;
+ char c;
+ while (j<l && ((c=yyextra->current->args.at(j))=='*' || isspace((uchar)c))) j++;
+ if (j>0)
+ {
+ oldStyleArgPtr=yyextra->current->args.left(j);
+ oldStyleArgName=yyextra->current->args.mid(j).stripWhiteSpace();
+ }
+ else
+ {
+ oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+/*! Update the argument \a name with additional \a type info. For K&R style
+ * function the type is found \e after the argument list, so this routine
+ * in needed to fix up.
+ */
+static void addKnRArgInfo(yyscan_t yyscanner,const QCString &type,const QCString &name,
+ const QCString &brief,const QCString &docs)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ for (Argument &a : yyextra->current->argList)
+ {
+ if (a.type==name)
+ {
+ a.type=type.stripWhiteSpace();
+ if (a.type.left(9)=="register ") // strip keyword
+ {
+ a.type=a.type.mid(9);
+ }
+ a.name=name.stripWhiteSpace();
+ if (!brief.isEmpty() && !docs.isEmpty())
+ {
+ a.docs=brief+"\n\n"+docs;
+ }
+ else if (!brief.isEmpty())
+ {
+ a.docs=brief;
+ }
+ else
+ {
+ a.docs=docs;
+ }
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+
+void fixArgumentListForJavaScript(ArgumentList &al)
+{
+ for (Argument &a : al)
+ {
+ if (!a.type.isEmpty() && a.name.isEmpty())
+ { // a->type is actually the (typeless) parameter name, so move it
+ a.name=a.type;
+ a.type.resize(0);
+ }
+ }
+}
+
+
+static void startCommentBlock(yyscan_t yyscanner,bool brief)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (brief)
{
- current->briefFile = yyFileName;
- current->briefLine = yyLineNr;
+ yyextra->current->briefFile = yyextra->yyFileName;
+ yyextra->current->briefLine = yyextra->yyLineNr;
}
else
{
- current->docFile = yyFileName;
- current->docLine = yyLineNr;
+ yyextra->current->docFile = yyextra->yyFileName;
+ yyextra->current->docLine = yyextra->yyLineNr;
}
}
//----------------------------------------------------------------------------
-static void newEntry()
+static void newEntry(yyscan_t yyscanner)
{
- if (tempEntry==0) // if temp entry is not 0, it holds current,
- // and current is actually replaced by previous which was
- // already added to current_root, so we should not add it again
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->tempEntry==0) // if temp entry is not 0, it holds yyextra->current,
+ // and yyextra->current is actually replaced by yyextra->previous which was
+ // already added to yyextra->current_root, so we should not add it again
// (see bug723314)
{
- previous = current.get();
- current_root->moveToSubEntryAndRefresh(current);
+ yyextra->previous = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
}
else
{
- previous = current.get();
- tempEntry.swap(current);
- tempEntry.reset();
+ yyextra->previous = yyextra->current;
+ yyextra->current = yyextra->tempEntry;
+ yyextra->tempEntry.reset();
}
- initEntry();
+ initEntry(yyscanner);
}
-static void handleCommentBlock(const QCString &doc,bool brief)
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief)
{
- static bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
- if (docBlockInBody && hideInBodyDocs) return;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
+ if (yyextra->docBlockInBody && hideInBodyDocs) return;
//printf("parseCommentBlock [%s] brief=%d\n",doc.data(),brief);
- int lineNr = brief ? current->briefLine : current->docLine; // line of block start
+ int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; // line of block start
// fill in inbodyFile && inbodyLine the first time, see bug 633891
- Entry *docEntry = docBlockInBody && previous ? previous : current.get();
- if (docBlockInBody && docEntry && docEntry->inbodyLine==-1)
+ std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
+ if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
{
- docEntry->inbodyFile = yyFileName;
+ docEntry->inbodyFile = yyextra->yyFileName;
docEntry->inbodyLine = lineNr;
}
int position=0;
bool needsEntry=FALSE;
- QCString processedDoc = preprocessCommentBlock(stripIndentation(doc),yyFileName,lineNr);
+ QCString processedDoc = preprocessCommentBlock(stripIndentation(doc),yyextra->yyFileName,lineNr);
while (parseCommentBlock(
- g_thisParser,
- docBlockInBody && previous ? previous : current.get(),
+ yyextra->thisParser,
+ yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
processedDoc, // text
- yyFileName, // file
+ yyextra->yyFileName, // file
lineNr, // line of block start
- docBlockInBody ? FALSE : brief, // isBrief
- docBlockInBody ? FALSE : docBlockAutoBrief, // isJavaDocStyle
- docBlockInBody, // isInBody
- protection,
+ yyextra->docBlockInBody ? FALSE : brief, // isBrief
+ yyextra->docBlockInBody ? FALSE : yyextra->docBlockAutoBrief, // isJavaDocStyle
+ yyextra->docBlockInBody, // isInBody
+ yyextra->protection,
position,
needsEntry
)
@@ -6973,26 +6979,27 @@ static void handleCommentBlock(const QCString &doc,bool brief)
//printf("parseCommentBlock position=%d [%s]\n",position,doc.data()+position);
if (needsEntry)
{
- QCString docFile = current->docFile;
- newEntry();
- current->docFile = docFile;
- current->docLine = lineNr;
+ QCString docFile = yyextra->current->docFile;
+ newEntry(yyscanner);
+ yyextra->current->docFile = docFile;
+ yyextra->current->docLine = lineNr;
}
}
if (needsEntry)
{
- newEntry();
+ newEntry(yyscanner);
}
- if (docBlockTerm)
+ if (yyextra->docBlockTerm)
{
- unput(docBlockTerm);
- docBlockTerm=0;
+ unput(yyextra->docBlockTerm);
+ yyextra->docBlockTerm=0;
}
}
-static void handleParametersCommentBlocks(ArgumentList &al)
+static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf(">>>>>>> handleParametersCommentBlocks()\n");
for (Argument &a : al)
{
@@ -7004,44 +7011,44 @@ static void handleParametersCommentBlocks(ArgumentList &al)
bool needsEntry;
// save context
- QCString orgDoc = current->doc;
- QCString orgBrief = current->brief;
- int orgDocLine = current->docLine;
- int orgBriefLine = current->briefLine;
+ QCString orgDoc = yyextra->current->doc;
+ QCString orgBrief = yyextra->current->brief;
+ int orgDocLine = yyextra->current->docLine;
+ int orgBriefLine = yyextra->current->briefLine;
- current->doc.resize(0);
- current->brief.resize(0);
+ yyextra->current->doc.resize(0);
+ yyextra->current->brief.resize(0);
//printf("handleParametersCommentBlock [%s]\n",doc.data());
while (parseCommentBlock(
- g_thisParser,
- current.get(),
+ yyextra->thisParser,
+ yyextra->current.get(),
a.docs, // text
- yyFileName, // file
- current->docLine, // line of block start
+ yyextra->yyFileName, // file
+ yyextra->current->docLine, // line of block start
FALSE,
FALSE,
FALSE,
- protection,
+ yyextra->protection,
position,
needsEntry
)
)
{
//printf("handleParametersCommentBlock position=%d [%s]\n",position,doc.data()+position);
- if (needsEntry) newEntry();
+ if (needsEntry) newEntry(yyscanner);
}
if (needsEntry)
{
- newEntry();
+ newEntry(yyscanner);
}
- a.docs = current->doc;
+ a.docs = yyextra->current->doc;
// restore context
- current->doc = orgDoc;
- current->brief = orgBrief;
- current->docLine = orgDocLine;
- current->briefLine = orgBriefLine;
+ yyextra->current->doc = orgDoc;
+ yyextra->current->brief = orgBrief;
+ yyextra->current->docLine = orgDocLine;
+ yyextra->current->briefLine = orgBriefLine;
}
}
}
@@ -7049,8 +7056,9 @@ static void handleParametersCommentBlocks(ArgumentList &al)
//----------------------------------------------------------------------------
-static void parseCompounds(const std::unique_ptr<Entry> &rt)
+static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("parseCompounds(%s)\n",rt->name.data());
for (const auto &ce : rt->children())
{
@@ -7059,29 +7067,28 @@ static void parseCompounds(const std::unique_ptr<Entry> &rt)
//printf("-- %s ---------\n%s\n---------------\n",
// ce->name.data(),ce->program.data());
// init scanner state
- padCount=0;
+ yyextra->padCount=0;
//depthIf = 0;
- g_column=0;
- inputString = ce->program;
- inputPosition = 0;
- scannerYYrestart( scannerYYin ) ;
+ yyextra->column=0;
+ yyextra->inputString = ce->program;
+ yyextra->inputPosition = 0;
if (ce->section==Entry::ENUM_SEC || (ce->spec&Entry::Enum))
BEGIN( FindFields ) ;
else
BEGIN( FindMembers ) ;
- current_root = ce.get() ;
- yyFileName = ce->fileName;
+ yyextra->current_root = ce;
+ yyextra->yyFileName = ce->fileName;
//setContext();
- yyLineNr = ce->startLine ;
- yyColNr = ce->startColumn ;
- insideObjC = ce->lang==SrcLangExt_ObjC;
- //printf("---> Inner block starts at line %d objC=%d\n",yyLineNr,insideObjC);
- current = std::make_unique<Entry>();
- gstat = FALSE;
- initEntry();
+ yyextra->yyLineNr = ce->startLine ;
+ yyextra->yyColNr = ce->startColumn ;
+ yyextra->insideObjC = ce->lang==SrcLangExt_ObjC;
+ //printf("---> Inner block starts at line %d objC=%d\n",yyextra->yyLineNr,yyextra->insideObjC);
+ yyextra->current = std::make_shared<Entry>();
+ yyextra->stat = FALSE;
+ initEntry(yyscanner);
// deep copy group list from parent (see bug 727732)
- static bool autoGroupNested = Config_getBool(GROUP_NESTED_COMPOUNDS);
+ bool autoGroupNested = Config_getBool(GROUP_NESTED_COMPOUNDS);
if (autoGroupNested && ce->section!=Entry::ENUM_SEC && !(ce->spec&Entry::Enum))
{
ce->groups = rt->groups;
@@ -7091,182 +7098,180 @@ static void parseCompounds(const std::unique_ptr<Entry> &rt)
// set default protection based on the compound type
if( ce->section==Entry::CLASS_SEC ) // class
{
- if (insidePHP || insideD || insideJS || insideIDL || insideSlice)
+ if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
{
- current->protection = protection = Public ;
+ yyextra->current->protection = yyextra->protection = Public ;
}
- else if (insideJava)
+ else if (yyextra->insideJava)
{
- current->protection = protection = (ce->spec & (Entry::Interface|Entry::Enum)) ? Public : Package;
+ yyextra->current->protection = yyextra->protection = (ce->spec & (Entry::Interface|Entry::Enum)) ? Public : Package;
}
else if (ce->spec&(Entry::Interface | Entry::Ref | Entry::Value | Entry::Struct | Entry::Union))
{
if (ce->lang==SrcLangExt_ObjC)
{
- current->protection = protection = Protected ;
+ yyextra->current->protection = yyextra->protection = Protected ;
}
else
{
- current->protection = protection = Public ;
+ yyextra->current->protection = yyextra->protection = Public ;
}
}
else
{
- current->protection = protection = Private ;
+ yyextra->current->protection = yyextra->protection = Private ;
}
}
else if (ce->section == Entry::ENUM_SEC ) // enum
{
- current->protection = protection = ce->protection;
+ yyextra->current->protection = yyextra->protection = ce->protection;
}
else if (!ce->name.isEmpty() && ce->name.at(ni)=='@') // unnamed union or namespace
{
if (ce->section == Entry::NAMESPACE_SEC ) // unnamed namespace
{
- current->stat = gstat = TRUE;
+ yyextra->current->stat = yyextra->stat = TRUE;
}
- current->protection = protection = ce->protection;
+ yyextra->current->protection = yyextra->protection = ce->protection;
}
else // named struct, union, protocol, category
{
- current->protection = protection = Public ;
+ yyextra->current->protection = yyextra->protection = Public ;
}
- mtype = Method;
- virt = Normal;
- //printf("name=%s current->stat=%d gstat=%d\n",ce->name.data(),current->stat,gstat);
+ yyextra->mtype = Method;
+ yyextra->virt = Normal;
+ //printf("name=%s yyextra->current->stat=%d yyextra->stat=%d\n",ce->name.data(),yyextra->current->stat,yyextra->stat);
//memberGroupId = DOX_NOGROUP;
//memberGroupRelates.resize(0);
//memberGroupInside.resize(0);
QCString name = ce->name;
- Doxygen::docGroup.enterCompound(yyFileName,yyLineNr,name);
+ Doxygen::docGroup.enterCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
- scannerYYlex() ;
- g_lexInit=TRUE;
+ scannerYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
//forceEndGroup();
- Doxygen::docGroup.leaveCompound(yyFileName,yyLineNr,name);
+ Doxygen::docGroup.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
ce->program.resize(0);
//if (depthIf>0)
//{
- // warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
+ // warn(yyextra->yyFileName,yyextra->yyLineNr,"Documentation block ended in the middle of a conditional section!");
//}
}
- parseCompounds(ce);
+ parseCompounds(yyscanner,ce);
}
}
//----------------------------------------------------------------------------
-static void parseMain(const char *fileName,
+static void parseMain(yyscan_t yyscanner,
+ const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &rt,
+ const std::shared_ptr<Entry> &rt,
bool sameTranslationUnit,
QStrList & filesInSameTranslationUnit)
{
- initParser();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ initParser(yyscanner);
- inputString = fileBuf;
- inputPosition = 0;
- g_column = 0;
+ yyextra->inputString = fileBuf;
+ yyextra->inputPosition = 0;
+ yyextra->column = 0;
+ scannerYYrestart(0,yyscanner);
- //anonCount = 0; // don't reset per file
+ //yyextra->anonCount = 0; // don't reset per file
//depthIf = 0;
- protection = Public;
- mtype = Method;
- gstat = FALSE;
- virt = Normal;
- current_root = rt.get();
- global_root = rt.get();
- inputFile.setName(fileName);
- if (inputFile.open(IO_ReadOnly))
+ yyextra->protection = Public;
+ yyextra->mtype = Method;
+ yyextra->stat = FALSE;
+ yyextra->virt = Normal;
+ yyextra->current_root = rt;
+ yyextra->yyLineNr = 1 ;
+ yyextra->yyBegLineNr = 1;
+ yyextra->yyBegColNr = 0;
+ yyextra->yyFileName = fileName;
+ setContext(yyscanner);
+ bool processWithClang = yyextra->insideCpp || yyextra->insideObjC;
+ if (processWithClang)
{
- yyLineNr= 1 ;
- yyFileName = fileName;
- setContext();
- bool processWithClang = insideCpp || insideObjC;
- if (processWithClang)
- {
- if (!sameTranslationUnit) // new file
- {
- ClangParser::instance()->start(fileName,filesInSameTranslationUnit);
- }
- else
- {
- ClangParser::instance()->switchToFile(fileName);
- }
- }
- rt->lang = language;
- msg("Parsing file %s...\n",yyFileName.data());
-
- current_root = rt.get() ;
- initParser();
- Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
- current = std::make_unique<Entry>();
- //printf("current=%p current_root=%p\n",current,current_root);
- int sec=guessSection(yyFileName);
- if (sec)
+ if (!sameTranslationUnit) // new file
{
- current->name = yyFileName;
- current->section = sec;
- current_root->moveToSubEntryAndRefresh(current);
- }
- current->reset();
- initEntry();
- scannerYYrestart( scannerYYin );
- if ( insidePHP )
- {
- BEGIN( FindMembersPHP );
+ ClangParser::instance()->start(fileName,filesInSameTranslationUnit);
}
else
{
- BEGIN( FindMembers );
- }
-
- scannerYYlex();
- g_lexInit=TRUE;
-
- if (YY_START==Comment)
- {
- warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ ClangParser::instance()->switchToFile(fileName);
}
+ }
+ rt->lang = yyextra->language;
+ msg("Parsing file %s...\n",yyextra->yyFileName.data());
+
+ yyextra->current_root = rt;
+ initParser(yyscanner);
+ Doxygen::docGroup.enterFile(yyextra->yyFileName,yyextra->yyLineNr);
+ yyextra->current = std::make_shared<Entry>();
+ //printf("yyextra->current=%p yyextra->current_root=%p\n",yyextra->current,yyextra->current_root);
+ int sec=guessSection(yyextra->yyFileName);
+ if (sec)
+ {
+ yyextra->current->name = yyextra->yyFileName;
+ yyextra->current->section = sec;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ }
+ yyextra->current->reset();
+ initEntry(yyscanner);
+ if ( yyextra->insidePHP )
+ {
+ BEGIN( FindMembersPHP );
+ }
+ else
+ {
+ BEGIN( FindMembers );
+ }
- //forceEndGroup();
- Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
+ scannerYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
- rt->program.resize(0);
+ if (YY_START==Comment)
+ {
+ warn(yyextra->yyFileName,yyextra->yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ }
- parseCompounds(rt);
+ //forceEndGroup();
+ Doxygen::docGroup.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
- inputFile.close();
+ rt->program.resize(0);
- anonNSCount++;
+ parseCompounds(yyscanner,rt);
- // add additional entries that were created during processing
- for (auto &kv: g_outerScopeEntries)
- {
- //printf(">>> adding '%s' to scope '%s'\n",kv.second->name.data(),kv.first->name.data());
- kv.first->moveToSubEntryAndKeep(kv.second);
- }
- g_outerScopeEntries.clear();
+ yyextra->anonNSCount++;
+ // add additional entries that were created during processing
+ for (auto &kv: yyextra->outerScopeEntries)
+ {
+ //printf(">>> adding '%s' to scope '%s'\n",kv.second->name.data(),kv.first->name.data());
+ kv.first->moveToSubEntryAndKeep(kv.second);
}
+ yyextra->outerScopeEntries.clear();
+
}
//----------------------------------------------------------------------------
-static void parsePrototype(const QCString &text)
+static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("**** parsePrototype(%s) begin\n",text.data());
if (text.isEmpty())
{
- warn(yyFileName,yyLineNr,"Empty prototype found!");
+ warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
return;
}
- if (!current) // nothing to store (see bug683516)
+ if (!yyextra->current) // nothing to store (see bug683516)
{
return;
}
@@ -7277,44 +7282,34 @@ static void parsePrototype(const QCString &text)
// save scanner state
orgState = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_create_buffer(scannerYYin, YY_BUF_SIZE));
- orgInputString = inputString;
- orgInputPosition = inputPosition;
+ yy_switch_to_buffer(yy_create_buffer(0, YY_BUF_SIZE, yyscanner), yyscanner);
+ orgInputString = yyextra->inputString;
+ orgInputPosition = yyextra->inputPosition;
// set new string
- inputString = text;
- inputPosition = 0;
- g_column = 0;
- scannerYYrestart( scannerYYin );
+ yyextra->inputString = text;
+ yyextra->inputPosition = 0;
+ yyextra->column = 0;
+ scannerYYrestart(0, yyscanner);
BEGIN(Prototype);
- scannerYYlex();
- g_lexInit=TRUE;
+ scannerYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
- current->name = current->name.stripWhiteSpace();
- if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty())
- current->section = Entry::VARIABLEDOC_SEC;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ if (yyextra->current->section == Entry::MEMBERDOC_SEC && yyextra->current->args.isEmpty())
+ yyextra->current->section = Entry::VARIABLEDOC_SEC;
// restore original scanner state
YY_BUFFER_STATE tmpState = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(orgState);
- yy_delete_buffer(tmpState);
- inputString = orgInputString;
- inputPosition = orgInputPosition;
+ yy_switch_to_buffer(orgState, yyscanner);
+ yy_delete_buffer(tmpState, yyscanner);
+ yyextra->inputString = orgInputString;
+ yyextra->inputPosition = orgInputPosition;
//printf("**** parsePrototype end\n");
}
-void scanFreeScanner()
-{
-#if defined(YY_FLEX_SUBMINOR_VERSION)
- if (g_lexInit)
- {
- scannerYYlex_destroy();
- }
-#endif
-}
-
//static void handleGroupStartCommand(const char *header)
//{
// memberGroupHeader=header;
@@ -7324,62 +7319,63 @@ void scanFreeScanner()
//static void handleGroupEndCommand()
//{
// endGroup();
-// previous=0;
+// g_previous=0;
//}
//----------------------------------------------------------------------------
-void CLanguageScanner::startTranslationUnit(const char *)
+struct COutlineParser::Private
{
+ yyscan_t yyscanner;
+ scannerYY_state state;
+};
+
+COutlineParser::COutlineParser() : p(std::make_unique<COutlineParser::Private>())
+{
+ scannerYYlex_init_extra(&p->state,&p->yyscanner);
+#ifdef FLEX_DEBUG
+ scannerYYset_debug(1,p->yyscanner);
+#endif
}
-void CLanguageScanner::finishTranslationUnit()
+COutlineParser::~COutlineParser()
{
- bool processWithClang = insideCpp || insideObjC;
+ scannerYYlex_destroy(p->yyscanner);
+}
+
+void COutlineParser::startTranslationUnit(const char *)
+{
+}
+
+void COutlineParser::finishTranslationUnit()
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ bool processWithClang = yyextra->insideCpp || yyextra->insideObjC;
if (processWithClang)
{
ClangParser::instance()->finish();
}
}
-void CLanguageScanner::parseInput(const char *fileName,
+void COutlineParser::parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList & filesInSameTranslationUnit)
{
- g_thisParser = this;
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->thisParser = this;
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- ::parseMain(fileName,fileBuf,root,
+ ::parseMain(p->yyscanner, fileName,fileBuf,root,
sameTranslationUnit,filesInSameTranslationUnit);
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
-void CLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
- const char * scopeName,
- const QCString & input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char * exampleName,
- FileDef * fileDef,
- int startLine,
- int endLine,
- bool inlineFragment,
- const MemberDef *memberDef,
- bool showLineNumbers,
- const Definition *searchCtx,
- bool collectXRefs
- )
-{
- ::parseCCode(codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs);
-}
-bool CLanguageScanner::needsPreprocessing(const QCString &extension) const
+bool COutlineParser::needsPreprocessing(const QCString &extension) const
{
QCString fe=extension.lower();
SrcLangExt lang = getLanguageFromFileName(extension);
@@ -7389,23 +7385,11 @@ bool CLanguageScanner::needsPreprocessing(const QCString &extension) const
);
}
-void CLanguageScanner::resetCodeParserState()
+void COutlineParser::parsePrototype(const char *text)
{
- ::resetCCodeParserState();
-}
-
-void CLanguageScanner::parsePrototype(const char *text)
-{
- ::parsePrototype(text);
+ ::parsePrototype(p->yyscanner,text);
}
//----------------------------------------------------------------------------
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void scannerYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "scanner.l.h"
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 849dd1d..eee1aa1 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -426,7 +426,7 @@ struct SearchIndexExternal::Private
{
Private() : docEntries(12251) {}
SDict<SearchDocEntry> docEntries;
- SearchDocEntry *current;
+ SearchDocEntry *current = 0;
};
SearchIndexExternal::SearchIndexExternal() : SearchIndexIntf(External)
diff --git a/src/sqlcode.h b/src/sqlcode.h
index d8a09b7..20e20f7 100644
--- a/src/sqlcode.h
+++ b/src/sqlcode.h
@@ -19,7 +19,7 @@
#ifndef SQLCODE_H
#define SQLCODE_H
-#include "types.h"
+#include "parserintf.h"
class CodeOutputInterface;
class FileDef;
@@ -27,11 +27,28 @@ class MemberDef;
class QCString;
class Definition;
-extern void parseSqlCode(CodeOutputInterface &,const char *,const QCString &,
- bool ,const char *,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectXRefs);
-extern void resetSqlCodeParserState();
+/** SQL scanner. Only support syntax highlighting of code at the moment.
+ */
+class SQLCodeParser : public CodeParserInterface
+{
+ public:
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ );
+ void resetCodeParserState();
+};
+
#endif
diff --git a/src/sqlcode.l b/src/sqlcode.l
index 2685c46..02c2c14 100644
--- a/src/sqlcode.l
+++ b/src/sqlcode.l
@@ -383,7 +383,7 @@ void parseSqlCode(
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
#ifdef FLEX_DEBUG
- yyset_debug(1,yyscanner);
+ sqlcodeYYset_debug(1,yyscanner);
#endif
printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
@@ -454,12 +454,34 @@ void resetSqlCodeParserState()
yyextra->currentMemberDef = 0;
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void sqlcodeYYdummy() { yy_flex_realloc(0,0); }
+//---------------------------------------------------------------------------------
+
+void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt,
+ bool isExampleBlock,
+ const char *exampleName,
+ FileDef *fileDef,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool showLineNumbers,
+ const Definition *searchCtx,
+ bool collectXRefs
+ )
+{
+ parseSqlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs);
}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
-#endif
+
+void SQLCodeParser::resetCodeParserState()
+{
+ resetSqlCodeParserState();
+}
+
+//---------------------------------------------------------------------------------
#include "sqlcode.l.h"
diff --git a/src/sqlscanner.h b/src/sqlscanner.h
deleted file mode 100644
index 694bf80..0000000
--- a/src/sqlscanner.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/******************************************************************************
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef SQLSCANNER_H
-#define SQLSCANNER_H
-
-#include "parserintf.h"
-#include "sqlcode.h"
-
-/** SQL scanner. Only support syntax highlighting of code at the moment.
- */
-class SQLScanner : public ParserInterface
-{
-public:
- SQLScanner() {}
- virtual ~SQLScanner() {}
- void startTranslationUnit(const char *) {}
- void finishTranslationUnit() {}
- void parseInput(const char *, const char *, const std::unique_ptr<Entry> &, bool , QStrList &) {}
- bool needsPreprocessing(const QCString &) const { return FALSE; }
-
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- )
- {
- parseSqlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs);
- }
-
- void resetCodeParserState()
- {
- resetSqlCodeParserState();
- }
-
- void parsePrototype(const char *) {}
-
-private:
-};
-
-#endif
diff --git a/src/stlsupport.cpp b/src/stlsupport.cpp
new file mode 100644
index 0000000..096291a
--- /dev/null
+++ b/src/stlsupport.cpp
@@ -0,0 +1,270 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2019 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include "stlsupport.h"
+#include "entry.h"
+#include "config.h"
+
+/** A struct contained the data for an STL class */
+struct STLInfo
+{
+ const char *className;
+ const char *baseClass1;
+ const char *baseClass2;
+ const char *templType1;
+ const char *templName1;
+ const char *templType2;
+ const char *templName2;
+ bool virtualInheritance;
+ bool iterators;
+};
+
+static STLInfo g_stlinfo[] =
+{
+ // className baseClass1 baseClass2 templType1 templName1 templType2 templName2 virtInheritance // iterators
+ { "allocator", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
+ { "auto_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // deprecated
+ { "smart_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "unique_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "shared_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++14
+ { "weak_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "atomic", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "atomic_ref", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++20
+ { "lock_guard", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "unique_lock", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++11
+ { "shared_lock", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, // C++14
+ { "ios_base", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "error_code", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "error_category", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "system_error", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "error_condition", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "thread", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "jthread", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "mutex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "timed_mutex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "recursive_mutex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "recursive_timed_mutex",0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++11
+ { "shared_mutex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++17
+ { "shared_timed_mutex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, // C++14
+ { "basic_ios", "ios_base", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_istream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE },
+ { "basic_ostream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE },
+ { "basic_iostream", "basic_istream<Char>", "basic_ostream<Char>", "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_ifstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_ofstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_fstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_istringstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_ostringstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "basic_stringstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE },
+ { "ios", "basic_ios<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wios", "basic_ios<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "istream", "basic_istream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wistream", "basic_istream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "ostream", "basic_ostream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wostream", "basic_ostream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "ifstream", "basic_ifstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wifstream", "basic_ifstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "ofstream", "basic_ofstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wofstream", "basic_ofstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "fstream", "basic_fstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wfstream", "basic_fstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "istringstream", "basic_istringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wistringstream", "basic_istringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "ostringstream", "basic_ostringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wostringstream", "basic_ostringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "stringstream", "basic_stringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wstringstream", "basic_stringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "basic_string", 0, 0, "Char", 0, 0, 0, FALSE, TRUE },
+ { "string", "basic_string<char>", 0, 0, 0, 0, 0, FALSE, TRUE },
+ { "wstring", "basic_string<wchar_t>", 0, 0, 0, 0, 0, FALSE, TRUE },
+ { "u8string", "basic_string<char8_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++20
+ { "u16string", "basic_string<char16_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++11
+ { "u32string", "basic_string<char32_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++11
+ { "basic_string_view", 0, 0, "Char", 0, 0, 0, FALSE, TRUE },
+ { "string_view", "basic_string_view<char>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++17
+ { "wstring_view", "basic_string_view<wchar_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++17
+ { "u8string_view", "basic_string_view<char8_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++20
+ { "u16string_view", "basic_string_view<char16_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++17
+ { "u32string_view", "basic_string_view<char32_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, // C++17
+ { "complex", 0, 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "bitset", 0, 0, "Bits", 0, 0, 0, FALSE, FALSE },
+ { "deque", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
+ { "list", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
+ { "forward_list", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, // C++11
+ { "map", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE },
+ { "unordered_map", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, // C++11
+ { "multimap", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE },
+ { "unordered_multimap", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, // C++11
+ { "set", 0, 0, "K", "keys", 0, 0, FALSE, TRUE },
+ { "unordered_set", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, // C++11
+ { "multiset", 0, 0, "K", "keys", 0, 0, FALSE, TRUE },
+ { "unordered_multiset", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, // C++11
+ { "array", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, // C++11
+ { "vector", 0, 0, "T", "elements", 0, 0, FALSE, TRUE },
+ { "span", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, // C++20
+ { "queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
+ { "priority_queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
+ { "stack", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
+ { "valarray", 0, 0, "T", "elements", 0, 0, FALSE, FALSE },
+ { "exception", 0, 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "bad_alloc", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "bad_cast", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "bad_typeid", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "logic_error", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "ios_base::failure", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "runtime_error", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "bad_exception", "exception", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "domain_error", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "invalid_argument", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "length_error", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "out_of_range", "logic_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "range_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "overflow_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "underflow_error", "runtime_error", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { 0, 0, 0, 0, 0, 0, 0, FALSE, FALSE }
+};
+
+static void addSTLMember(const std::shared_ptr<Entry> &root,const char *type,const char *name)
+{
+ std::shared_ptr<Entry> memEntry = std::make_shared<Entry>();
+ memEntry->name = name;
+ memEntry->type = type;
+ memEntry->protection = Public;
+ memEntry->section = Entry::VARIABLE_SEC;
+ memEntry->brief = "STL member";
+ memEntry->hidden = FALSE;
+ memEntry->artificial = TRUE;
+ root->moveToSubEntryAndKeep(memEntry);
+}
+
+static void addSTLIterator(const std::shared_ptr<Entry> &classEntry,const char *name)
+{
+ std::shared_ptr<Entry> iteratorClassEntry = std::make_shared<Entry>();
+ iteratorClassEntry->fileName = "[STL]";
+ iteratorClassEntry->startLine = 1;
+ iteratorClassEntry->name = name;
+ iteratorClassEntry->section = Entry::CLASS_SEC;
+ iteratorClassEntry->brief = "STL iterator class";
+ iteratorClassEntry->hidden = FALSE;
+ iteratorClassEntry->artificial= TRUE;
+ classEntry->moveToSubEntryAndKeep(iteratorClassEntry);
+}
+
+static void addSTLClass(const std::shared_ptr<Entry> &root,const STLInfo *info)
+{
+ //printf("Adding STL class %s\n",info->className);
+ QCString fullName = info->className;
+ fullName.prepend("std::");
+
+ // add fake Entry for the class
+ std::shared_ptr<Entry> classEntry = std::make_shared<Entry>();
+ classEntry->fileName = "[STL]";
+ classEntry->startLine = 1;
+ classEntry->name = fullName;
+ classEntry->section = Entry::CLASS_SEC;
+ classEntry->brief = "STL class";
+ classEntry->hidden = FALSE;
+ classEntry->artificial= TRUE;
+
+ // add template arguments to class
+ if (info->templType1)
+ {
+ ArgumentList al;
+ Argument a;
+ a.type="typename";
+ a.name=info->templType1;
+ al.push_back(a);
+ if (info->templType2) // another template argument
+ {
+ a.type="typename";
+ a.name=info->templType2;
+ al.push_back(a);
+ }
+ classEntry->tArgLists.push_back(al);
+ }
+ // add member variables
+ if (info->templName1)
+ {
+ addSTLMember(classEntry,info->templType1,info->templName1);
+ }
+ if (info->templName2)
+ {
+ addSTLMember(classEntry,info->templType2,info->templName2);
+ }
+ if (fullName=="std::auto_ptr" ||
+ fullName=="std::smart_ptr" ||
+ fullName=="std::shared_ptr" ||
+ fullName=="std::weak_ptr" ||
+ fullName=="std::unique_ptr")
+ {
+ std::shared_ptr<Entry> memEntry = std::make_shared<Entry>();
+ memEntry->name = "operator->";
+ memEntry->args = "()";
+ memEntry->type = "T*";
+ memEntry->protection = Public;
+ memEntry->section = Entry::FUNCTION_SEC;
+ memEntry->brief = "STL member";
+ memEntry->hidden = FALSE;
+ memEntry->artificial = FALSE;
+ classEntry->moveToSubEntryAndKeep(memEntry);
+ }
+ if (info->baseClass1)
+ {
+ classEntry->extends.push_back(BaseInfo(info->baseClass1,Public,info->virtualInheritance?Virtual:Normal));
+ }
+ if (info->baseClass2)
+ {
+ classEntry->extends.push_back(BaseInfo(info->baseClass2,Public,info->virtualInheritance?Virtual:Normal));
+ }
+ if (info->iterators)
+ {
+ // add iterator class
+ addSTLIterator(classEntry,fullName+"::iterator");
+ addSTLIterator(classEntry,fullName+"::const_iterator");
+ addSTLIterator(classEntry,fullName+"::reverse_iterator");
+ addSTLIterator(classEntry,fullName+"::const_reverse_iterator");
+ }
+ root->moveToSubEntryAndKeep(classEntry);
+}
+
+
+static void addSTLClasses(const std::shared_ptr<Entry> &root)
+{
+ std::shared_ptr<Entry> namespaceEntry = std::make_shared<Entry>();
+ namespaceEntry->fileName = "[STL]";
+ namespaceEntry->startLine = 1;
+ namespaceEntry->name = "std";
+ namespaceEntry->section = Entry::NAMESPACE_SEC;
+ namespaceEntry->brief = "STL namespace";
+ namespaceEntry->hidden = FALSE;
+ namespaceEntry->artificial= TRUE;
+
+ STLInfo *info = g_stlinfo;
+ while (info->className)
+ {
+ addSTLClass(namespaceEntry,info);
+ info++;
+ }
+
+ root->moveToSubEntryAndKeep(namespaceEntry);
+}
+
+void addSTLSupport(std::shared_ptr<Entry> &root)
+{
+ if (Config_getBool(BUILTIN_STL_SUPPORT))
+ {
+ addSTLClasses(root);
+ }
+}
diff --git a/src/stlsupport.h b/src/stlsupport.h
new file mode 100644
index 0000000..6712332
--- /dev/null
+++ b/src/stlsupport.h
@@ -0,0 +1,29 @@
+
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2019 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef STLSUPPORT_H
+#define STLSUPPORT_H
+
+#include <memory>
+
+class Entry;
+
+/** Add stub entries for the most used classes in the standard template library
+ * @param root Root of the entry tree to add the entries to.
+ */
+void addSTLSupport(std::shared_ptr<Entry> &root);
+
+#endif
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 65336e3..3f9a7a1 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -496,6 +496,23 @@ class TagFileParser : public QXmlDefaultHandler
void endDocAnchor()
{
+ // Check whether or not the tag is automatically generate, in that case ignore the tag.
+ switch(m_state)
+ {
+ case InClass:
+ case InFile:
+ case InNamespace:
+ case InGroup:
+ case InPage:
+ case InMember:
+ case InPackage:
+ case InDir:
+ if (QString(m_curString).startsWith("autotoc_md")) return;
+ break;
+ default:
+ warn("Unexpected tag 'docanchor' found");
+ return;
+ }
switch(m_state)
{
case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
@@ -506,7 +523,7 @@ class TagFileParser : public QXmlDefaultHandler
case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
- default: warn("Unexpected tag 'docanchor' found"); break;
+ default: break; // will not be reached
}
}
@@ -909,12 +926,12 @@ class TagFileParser : public QXmlDefaultHandler
}
void dump();
- void buildLists(const std::unique_ptr<Entry> &root);
+ void buildLists(const std::shared_ptr<Entry> &root);
void addIncludes();
private:
- void buildMemberList(const std::unique_ptr<Entry> &ce,QList<TagMemberInfo> &members);
- void addDocAnchors(const std::unique_ptr<Entry> &e,const TagAnchorInfoList &l);
+ void buildMemberList(const std::shared_ptr<Entry> &ce,QList<TagMemberInfo> &members);
+ void addDocAnchors(const std::shared_ptr<Entry> &e,const TagAnchorInfoList &l);
QList<TagClassInfo> m_tagFileClasses;
QList<TagFileInfo> m_tagFileFiles;
QList<TagNamespaceInfo> m_tagFileNamespaces;
@@ -1139,7 +1156,7 @@ void TagFileParser::dump()
}
}
-void TagFileParser::addDocAnchors(const std::unique_ptr<Entry> &e,const TagAnchorInfoList &l)
+void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const TagAnchorInfoList &l)
{
QListIterator<TagAnchorInfo> tli(l);
TagAnchorInfo *ta;
@@ -1161,19 +1178,19 @@ void TagFileParser::addDocAnchors(const std::unique_ptr<Entry> &e,const TagAncho
}
}
-void TagFileParser::buildMemberList(const std::unique_ptr<Entry> &ce,QList<TagMemberInfo> &members)
+void TagFileParser::buildMemberList(const std::shared_ptr<Entry> &ce,QList<TagMemberInfo> &members)
{
QListIterator<TagMemberInfo> mii(members);
TagMemberInfo *tmi;
for (;(tmi=mii.current());++mii)
{
- std::unique_ptr<Entry> me = std::make_unique<Entry>();
+ std::shared_ptr<Entry> me = std::make_shared<Entry>();
me->type = tmi->type;
me->name = tmi->name;
me->args = tmi->arglist;
if (!me->args.isEmpty())
{
- stringToArgumentList(me->args,me->argList);
+ stringToArgumentList(SrcLangExt_Cpp,me->args,me->argList);
}
if (tmi->enumValues.count()>0)
{
@@ -1182,7 +1199,7 @@ void TagFileParser::buildMemberList(const std::unique_ptr<Entry> &ce,QList<TagMe
TagEnumValueInfo *evi;
for (evii.toFirst();(evi=evii.current());++evii)
{
- std::unique_ptr<Entry> ev = std::make_unique<Entry>();
+ std::shared_ptr<Entry> ev = std::make_shared<Entry>();
ev->type = "@";
ev->name = evi->name;
ev->id = evi->clangid;
@@ -1296,14 +1313,14 @@ static QCString stripPath(const QCString &s)
* This tree contains the information extracted from the input in a
* "unrelated" form.
*/
-void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
+void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
{
// build class list
QListIterator<TagClassInfo> cit(m_tagFileClasses);
TagClassInfo *tci;
for (cit.toFirst();(tci=cit.current());++cit)
{
- std::unique_ptr<Entry> ce = std::make_unique<Entry>();
+ std::shared_ptr<Entry> ce = std::make_shared<Entry>();
ce->section = Entry::CLASS_SEC;
switch (tci->kind)
{
@@ -1360,7 +1377,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
TagFileInfo *tfi;
for (fit.toFirst();(tfi=fit.current());++fit)
{
- std::unique_ptr<Entry> fe = std::make_unique<Entry>();
+ std::shared_ptr<Entry> fe = std::make_shared<Entry>();
fe->section = guessSection(tfi->name);
fe->name = tfi->name;
addDocAnchors(fe,tfi->docAnchors);
@@ -1396,7 +1413,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
TagNamespaceInfo *tni;
for (nit.toFirst();(tni=nit.current());++nit)
{
- std::unique_ptr<Entry> ne = std::make_unique<Entry>();
+ std::shared_ptr<Entry> ne = std::make_shared<Entry>();
ne->section = Entry::NAMESPACE_SEC;
ne->name = tni->name;
addDocAnchors(ne,tni->docAnchors);
@@ -1414,7 +1431,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
TagPackageInfo *tpgi;
for (pit.toFirst();(tpgi=pit.current());++pit)
{
- std::unique_ptr<Entry> pe = std::make_unique<Entry>();
+ std::shared_ptr<Entry> pe = std::make_shared<Entry>();
pe->section = Entry::PACKAGE_SEC;
pe->name = tpgi->name;
addDocAnchors(pe,tpgi->docAnchors);
@@ -1431,7 +1448,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
TagGroupInfo *tgi;
for (git.toFirst();(tgi=git.current());++git)
{
- std::unique_ptr<Entry> ge = std::make_unique<Entry>();
+ std::shared_ptr<Entry> ge = std::make_shared<Entry>();
ge->section = Entry::GROUPDOC_SEC;
ge->name = tgi->name;
ge->type = tgi->title;
@@ -1455,7 +1472,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
//for (eli.toFirst();(childNode=eli.current());++eli)
const auto &children = root->children();
auto i = std::find_if(children.begin(),children.end(),
- [&](const std::unique_ptr<Entry> &e) { return e->name = *it; });
+ [&](const std::shared_ptr<Entry> &e) { return e->name = *it; });
if (i!=children.end())
{
(*i)->groups.push_back(Grouping(tgi->name,Grouping::GROUPING_INGROUP));
@@ -1468,7 +1485,7 @@ void TagFileParser::buildLists(const std::unique_ptr<Entry> &root)
TagPageInfo *tpi;
for (pgit.toFirst();(tpi=pgit.current());++pgit)
{
- std::unique_ptr<Entry> pe = std::make_unique<Entry>();
+ std::shared_ptr<Entry> pe = std::make_shared<Entry>();
pe->section = tpi->filename=="index" ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
pe->name = tpi->name;
pe->args = tpi->title;
@@ -1527,7 +1544,7 @@ void TagFileParser::addIncludes()
}
}
-void parseTagFile(const std::unique_ptr<Entry> &root,const char *fullName)
+void parseTagFile(const std::shared_ptr<Entry> &root,const char *fullName)
{
QFileInfo fi(fullName);
if (!fi.exists()) return;
diff --git a/src/tagreader.h b/src/tagreader.h
index 4c09a04..454060b 100644
--- a/src/tagreader.h
+++ b/src/tagreader.h
@@ -23,6 +23,6 @@ class Entry;
#include <memory>
-void parseTagFile(const std::unique_ptr<Entry> &root,const char *fullPathName);
+void parseTagFile(const std::shared_ptr<Entry> &root,const char *fullPathName);
#endif
diff --git a/src/tclscanner.h b/src/tclscanner.h
index 94da68b..cdd56d8 100644
--- a/src/tclscanner.h
+++ b/src/tclscanner.h
@@ -25,18 +25,23 @@
*
* This is the Tcl language parser for doxygen.
*/
-class TclLanguageScanner : public ParserInterface
+class TclOutlineParser : public OutlineParserInterface
{
public:
- virtual ~TclLanguageScanner() {}
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char *fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &extension) const;
+ void parsePrototype(const char *text);
+};
+
+class TclCodeParser : public CodeParserInterface
+{
+ public:
void parseCode(CodeOutputInterface &codeOutIntf,
const char *scopeName,
const QCString &input,
@@ -53,7 +58,6 @@ class TclLanguageScanner : public ParserInterface
bool collectXRefs=TRUE
);
void resetCodeParserState();
- void parsePrototype(const char *text);
};
#endif
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 37eef0d..a4709ce 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -429,7 +429,7 @@ static struct
QCString input_string; // file contents
int input_position; // position in file
QCString file_name; // name of used file
- ParserInterface *this_parser; // myself
+ OutlineParserInterface *this_parser; // myself
int command; // true if command was found
int comment; // set true if comment was scanned
int brace_level; // bookkeeping of braces
@@ -1503,7 +1503,7 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
{
tcl_inf("-> %s\n",(const char *)tcl.string_comment);
int myPos=0;
- bool myNew=0;
+ bool myNew=false;
int myLine=tcl.line_comment;
BufStr myI(1024);
BufStr myO(1024);
@@ -2964,9 +2964,9 @@ static void tcl_parse(const QCString ns, const QCString cls)
}
//! Parse text file and build up entry tree.
-void TclLanguageScanner::parseInput(const char *fileName,
+void TclOutlineParser::parseInput(const char *fileName,
const char *input,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
@@ -2995,8 +2995,40 @@ tcl_inf("%s\n",fileName);
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
+
+bool TclOutlineParser::needsPreprocessing(const QCString &extension) const
+{
+ (void)extension;
+ return FALSE;
+}
+
+void TclOutlineParser::parsePrototype(const char *text)
+{
+ (void)text;
+}
+
+static int yyread(char *buf,int max_size)
+{
+ int c=0;
+
+ *buf = '\0';
+ while ( c < max_size && tcl.input_string.at(tcl.input_position) )
+ {
+ *buf = tcl.input_string.at(tcl.input_position++) ;
+ c++; buf++;
+ }
+ //printf("Read from=%d size=%d max=%d c=%d\n",tcl.input_position,strlen(&tcl.input_string[tcl.input_position]),max_size,c);
+ return c;
+}
+
+//----------------------------------------------------------------------------
+
+void TclCodeParser::resetCodeParserState()
+{
+}
+
//! Parse file and codify.
-void TclLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
+void TclCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
const char * scopeName,
const QCString & input,
SrcLangExt lang,
@@ -3100,36 +3132,6 @@ tcl_inf("%s (%d,%d) %d %d\n",myStr.data(),startLine,endLine,isExampleBlock,inlin
tcl.entry.clear();
printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
}
-
-bool TclLanguageScanner::needsPreprocessing(const QCString &extension) const
-{
- (void)extension;
- return FALSE;
-}
-
-void TclLanguageScanner::resetCodeParserState()
-{
-}
-
-void TclLanguageScanner::parsePrototype(const char *text)
-{
- (void)text;
-}
-
-static int yyread(char *buf,int max_size)
-{
- int c=0;
-
- *buf = '\0';
- while ( c < max_size && tcl.input_string.at(tcl.input_position) )
- {
- *buf = tcl.input_string.at(tcl.input_position++) ;
- c++; buf++;
- }
- //printf("Read from=%d size=%d max=%d c=%d\n",tcl.input_position,strlen(&tcl.input_string[tcl.input_position]),max_size,c);
- return c;
-}
-
//----------------------------------------------------------------------------
// to avoid a warning
@@ -3138,11 +3140,4 @@ void tclDummy()
yy_top_state();
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void tclscannerYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "tclscanner.l.h"
diff --git a/src/template.cpp b/src/template.cpp
index 173df74..ca28c73 100644
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -245,7 +245,7 @@ class TemplateStruct::Private
Private() : fields(17), refCount(0)
{ fields.setAutoDelete(TRUE); }
QDict<TemplateVariant> fields;
- int refCount;
+ int refCount = 0;
};
TemplateStruct::TemplateStruct()
@@ -306,8 +306,8 @@ class TemplateList::Private
public:
Private() : index(-1), refCount(0) {}
QValueList<TemplateVariant> elems;
- int index;
- int refCount;
+ int index = -1;
+ int refCount = 0;
};
@@ -398,7 +398,7 @@ class TemplateListConstIterator : public TemplateListIntf::ConstIterator
private:
const TemplateList &m_list;
QValueList<TemplateVariant>::ConstIterator m_it;
- int m_index;
+ int m_index = 0;
};
TemplateListIntf::ConstIterator *TemplateList::createIterator() const
@@ -565,21 +565,21 @@ class TemplateContextImpl : public TemplateContext
void addIndexEntry(const QCString &indexName,const QValueList<TemplateKeyValue> &arguments);
private:
- const TemplateEngine *m_engine;
+ const TemplateEngine *m_engine = 0;
QCString m_templateName;
- int m_line;
+ int m_line = 0;
QCString m_outputDir;
QList< QDict<TemplateVariant> > m_contextStack;
TemplateBlockContext m_blockContext;
QDict<TemplateEscapeIntf*> m_escapeIntfDict;
- TemplateEscapeIntf *m_activeEscapeIntf;
- TemplateSpacelessIntf *m_spacelessIntf;
- bool m_spacelessEnabled;
- bool m_tabbingEnabled;
+ TemplateEscapeIntf *m_activeEscapeIntf = 0;
+ TemplateSpacelessIntf *m_spacelessIntf = 0;
+ bool m_spacelessEnabled = false;
+ bool m_tabbingEnabled = false;
TemplateAutoRef<TemplateStruct> m_indices;
QDict< QStack<TemplateVariant> > m_indexStacks;
QCString m_encoding;
- void *m_fromUtf8;
+ void *m_fromUtf8 = 0;
};
//-----------------------------------------------------------------------------
@@ -1445,7 +1445,7 @@ class ExprAstNumber : public ExprAst
int number() const { return m_number; }
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_number); }
private:
- int m_number;
+ int m_number = 0;
};
/** @brief Class representing a variable in the AST */
@@ -1497,7 +1497,7 @@ class ExprAstFunctionVariable : public ExprAst
return v;
}
private:
- ExprAst *m_var;
+ ExprAst *m_var = 0;
QList<ExprAst> m_args;
};
@@ -1526,7 +1526,7 @@ class ExprAstFilter : public ExprAst
}
private:
QCString m_name;
- ExprAst *m_arg;
+ ExprAst *m_arg = 0;
};
/** @brief Class representing a filter applied to an expression in the AST */
@@ -1542,7 +1542,7 @@ class ExprAstFilterAppl : public ExprAst
return m_filter->apply(m_expr->resolve(c),c);
}
private:
- ExprAst *m_expr;
+ ExprAst *m_expr = 0;
ExprAstFilter *m_filter;
};
@@ -1568,7 +1568,7 @@ class ExprAstNegate : public ExprAst
virtual TemplateVariant resolve(TemplateContext *c)
{ return TemplateVariant(!m_expr->resolve(c).toBool()); }
private:
- ExprAst *m_expr;
+ ExprAst *m_expr = 0;
};
class ExprAstUnary : public ExprAst
@@ -1589,8 +1589,8 @@ class ExprAstUnary : public ExprAst
}
}
private:
- Operator::Type m_operator;
- ExprAst *m_exp;
+ Operator::Type m_operator = Operator::Or;
+ ExprAst *m_exp = 0;
};
/** @brief Class representing a binary operator in the AST */
@@ -1696,9 +1696,9 @@ class ExprAstBinary : public ExprAst
}
}
private:
- Operator::Type m_operator;
- ExprAst *m_lhs;
- ExprAst *m_rhs;
+ Operator::Type m_operator = Operator::Or;
+ ExprAst *m_lhs = 0;
+ ExprAst *m_rhs = 0;
};
//----------------------------------------------------------
@@ -1715,7 +1715,7 @@ class TemplateNode
TemplateNode *parent() { return m_parent; }
private:
- TemplateNode *m_parent;
+ TemplateNode *m_parent = 0;
};
//----------------------------------------------------------
@@ -1736,7 +1736,7 @@ class TemplateParser
QCString templateName() const { return m_templateName; }
void warn(const char *fileName,int line,const char *fmt,...) const;
private:
- const TemplateEngine *m_engine;
+ const TemplateEngine *m_engine = 0;
QCString m_templateName;
QList<TemplateToken> &m_tokens;
};
@@ -2282,9 +2282,9 @@ class ExpressionParser
return TRUE;
}
- const TemplateParser *m_parser;
+ const TemplateParser *m_parser = 0;
ExprToken m_curToken;
- int m_line;
+ int m_line = 0;
const char *m_tokenStream;
};
@@ -2296,9 +2296,9 @@ class TemplateToken
public:
enum Type { Text, Variable, Block };
TemplateToken(Type t,const char *d,int l) : type(t), data(d), line(l) {}
- Type type;
+ Type type = Text;
QCString data;
- int line;
+ int line = 0;
};
//----------------------------------------------------------
@@ -2339,7 +2339,7 @@ class TemplateImpl : public TemplateNode, public Template
TemplateBlockContext *blockContext() { return &m_blockContext; }
private:
- TemplateEngine *m_engine;
+ TemplateEngine *m_engine = 0;
QCString m_name;
TemplateNodeList m_nodes;
TemplateBlockContext m_blockContext;
@@ -2358,8 +2358,8 @@ class TemplateStructWeakRef : public TemplateStructIntf
virtual int addRef() { return ++m_refCount; }
virtual int release() { int count=--m_refCount; if (count<=0) { delete this; } return count; }
private:
- TemplateStructIntf *m_ref;
- int m_refCount;
+ TemplateStructIntf *m_ref = 0;
+ int m_refCount = 0;
};
//----------------------------------------------------------
@@ -2789,8 +2789,8 @@ class TemplateNodeVariable : public TemplateNode
private:
QCString m_templateName;
- int m_line;
- ExprAst *m_var;
+ int m_line = 0;
+ ExprAst *m_var = 0;
QList<ExprAst> m_args;
};
@@ -2853,7 +2853,7 @@ template<class T> class TemplateNodeCreator : public TemplateNode
}
}
QCString m_templateName;
- int m_line;
+ int m_line = 0;
};
//----------------------------------------------------------
@@ -2950,8 +2950,8 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
{
GuardedNodes() : guardAst(0) {}
~GuardedNodes() { delete guardAst; }
- int line;
- ExprAst *guardAst;
+ int line = 0;
+ ExprAst *guardAst = 0;
TemplateNodeList trueNodes;
};
QList<GuardedNodes> m_ifGuardedNodes;
@@ -3009,7 +3009,7 @@ class TemplateNodeRepeat : public TemplateNodeCreator<TemplateNodeRepeat>
}
private:
TemplateNodeList m_repeatNodes;
- ExprAst *m_expr;
+ ExprAst *m_expr = 0;
};
//----------------------------------------------------------
@@ -3175,9 +3175,9 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
}
private:
- bool m_down;
- ExprAst *m_startExpr;
- ExprAst *m_endExpr;
+ bool m_down = false;
+ ExprAst *m_startExpr = 0;
+ ExprAst *m_endExpr = 0;
QCString m_var;
TemplateNodeList m_loopNodes;
};
@@ -3332,8 +3332,8 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
}
private:
- bool m_reversed;
- ExprAst *m_expr;
+ bool m_reversed = false;
+ ExprAst *m_expr = 0;
QValueList<QCString> m_vars;
TemplateNodeList m_loopNodes;
TemplateNodeList m_emptyNodes;
@@ -3534,7 +3534,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
}
private:
- ExprAst *m_extendExpr;
+ ExprAst *m_extendExpr = 0;
TemplateNodeList m_nodes;
};
@@ -3591,7 +3591,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
}
private:
- ExprAst *m_includeExpr;
+ ExprAst *m_includeExpr = 0;
};
//----------------------------------------------------------
@@ -3724,8 +3724,8 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
}
private:
- ExprAst *m_templateExpr;
- ExprAst *m_fileExpr;
+ ExprAst *m_templateExpr = 0;
+ ExprAst *m_fileExpr = 0;
};
//----------------------------------------------------------
@@ -3839,7 +3839,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
}
private:
- ExprAst *m_treeExpr;
+ ExprAst *m_treeExpr = 0;
TemplateNodeList m_treeNodes;
};
@@ -3853,7 +3853,7 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry
Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {}
~Mapping() { delete value; }
QCString name;
- ExprAst *value;
+ ExprAst *value = 0;
};
public:
TemplateNodeIndexEntry(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
@@ -4128,7 +4128,7 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
}
}
private:
- uint m_index;
+ uint m_index = 0;
QList<ExprAst> m_args;
};
@@ -4142,7 +4142,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {}
~Mapping() { delete value; }
QCString name;
- ExprAst *value;
+ ExprAst *value = 0;
};
public:
TemplateNodeSet(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
@@ -4175,7 +4175,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
}
}
private:
- Mapping *m_mapping;
+ Mapping *m_mapping = 0;
};
//----------------------------------------------------------
@@ -4323,8 +4323,8 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
private:
TemplateNodeList m_nodes;
QCString m_var;
- ExprAst *m_listExpr;
- ExprAst *m_patternExpr;
+ ExprAst *m_listExpr = 0;
+ ExprAst *m_patternExpr = 0;
};
//----------------------------------------------------------
@@ -4427,8 +4427,8 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
}
}
private:
- ExprAst *m_resExpr;
- ExprAst *m_asExpr;
+ ExprAst *m_resExpr = 0;
+ ExprAst *m_asExpr = 0;
};
//----------------------------------------------------------
@@ -4645,11 +4645,11 @@ class TemplateLexer
const char *data,int line,int startPos,int endPos,
TemplateToken::Type type);
void reset();
- const TemplateEngine *m_engine;
+ const TemplateEngine *m_engine = 0;
QCString m_fileName;
QCString m_data;
- char m_openChar;
- char m_closeChar;
+ char m_openChar = 0;
+ char m_closeChar = 0;
};
TemplateLexer::TemplateLexer(const TemplateEngine *engine,const QCString &fileName,const QCString &data) :
@@ -5070,10 +5070,10 @@ class TemplateEngine::Private
int line() const { return m_line; }
private:
- Type m_type;
+ Type m_type = Template;
QCString m_fileName;
QCString m_blockName;
- int m_line;
+ int m_line = 0;
};
public:
Private(TemplateEngine *engine) : m_templateCache(17) /*, m_indent(0)*/, m_engine(engine)
@@ -5185,7 +5185,7 @@ class TemplateEngine::Private
private:
QDict<Template> m_templateCache;
//mutable int m_indent;
- TemplateEngine *m_engine;
+ TemplateEngine *m_engine = 0;
QList<IncludeEntry> m_includeStack;
QCString m_extension;
QCString m_templateDirName;
diff --git a/src/util.cpp b/src/util.cpp
index 5042edc..9c46516 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1397,7 +1397,7 @@ static const ClassDef *getResolvedClassRec(const Definition *scope,
ArgumentList actTemplParams;
if (!strippedTemplateParams.isEmpty()) // template part that was stripped
{
- stringToArgumentList(strippedTemplateParams,actTemplParams);
+ stringToArgumentList(scope->getLanguage(),strippedTemplateParams,actTemplParams);
}
int qualifierIndex = computeQualifiedIndex(name);
@@ -2428,7 +2428,7 @@ static QCString getFilterFromList(const char *name,const QStrList &filterList,bo
if (i_equals!=-1)
{
QCString filterPattern = fs.left(i_equals);
- QRegExp fpat(filterPattern,portable_fileSystemIsCaseSensitive(),TRUE);
+ QRegExp fpat(filterPattern,Portable::fileSystemIsCaseSensitive(),TRUE);
if (fpat.match(name)!=-1)
{
// found a match!
@@ -2589,7 +2589,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
static QDateTime getCurrentDateTime()
{
QDateTime current = QDateTime::currentDateTime();
- QCString sourceDateEpoch = portable_getenv("SOURCE_DATE_EPOCH");
+ QCString sourceDateEpoch = Portable::getenv("SOURCE_DATE_EPOCH");
if (!sourceDateEpoch.isEmpty())
{
bool ok;
@@ -3874,7 +3874,7 @@ static void findMembersWithSpecificName(MemberName *mn,
{
const ArgumentList &mdAl = md->argumentList();
ArgumentList argList;
- stringToArgumentList(args,argList);
+ stringToArgumentList(md->getLanguage(),args,argList);
match=matchArguments2(
md->getOuterScope(),fd,mdAl,
Doxygen::globalScope,fd,argList,
@@ -4005,7 +4005,7 @@ bool getDefs(const QCString &scName,
ArgumentList argList;
if (args)
{
- stringToArgumentList(args,argList);
+ stringToArgumentList(fcd->getLanguage(),args,argList);
}
for (mmli.toFirst();(mmd=mmli.current());++mmli)
{
@@ -4124,7 +4124,7 @@ bool getDefs(const QCString &scName,
if (args)
{
- stringToArgumentList(args, argList);
+ stringToArgumentList(SrcLangExt_Cpp, args, argList);
}
for (mmli.toFirst(); (mmd = mmli.current()); ++mmli)
@@ -4227,7 +4227,7 @@ bool getDefs(const QCString &scName,
if (args && qstrcmp(args,"()")!=0)
{
const ArgumentList &mmdAl = mmd->argumentList();
- stringToArgumentList(args,argList);
+ stringToArgumentList(mmd->getLanguage(),args,argList);
match=matchArguments2(
mmd->getOuterScope(),mmd->getFileDef(),mmdAl,
fnd,mmd->getFileDef(),argList,
@@ -4283,7 +4283,7 @@ bool getDefs(const QCString &scName,
int ni=namespaceName.findRev("::");
//printf("namespaceName=%s ni=%d\n",namespaceName.data(),ni);
bool notInNS = tmd && ni==-1 && tmd->getNamespaceDef()==0 && (mScope.isEmpty() || mScope==tmd->name());
- bool sameNS = tmd && tmd->getNamespaceDef() && namespaceName.left(ni)==tmd->getNamespaceDef()->name();
+ bool sameNS = tmd && tmd->getNamespaceDef() && namespaceName.left(ni)==tmd->getNamespaceDef()->name() && namespaceName.mid(ni+2)==tmd->name();
//printf("notInNS=%d sameNS=%d\n",notInNS,sameNS);
if (tmd && tmd->isStrong() && // C++11 enum class
(notInNS || sameNS) &&
@@ -7928,14 +7928,22 @@ void stackTrace()
p += sprintf(p,"%p ", backtraceFrames[x]);
}
fprintf(stderr,"========== STACKTRACE START ==============\n");
- if (FILE *fp = popen(cmd, "r"))
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+ if (FILE *fp = _popen(cmd, "r"))
+ #else
+ if (FILE *fp = ::popen(cmd, "r"))
+ #endif
{
char resBuf[512];
while (size_t len = fread(resBuf, 1, sizeof(resBuf), fp))
{
fwrite(resBuf, 1, len, stderr);
}
- pclose(fp);
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+ _pclose(fp);
+ #else
+ ::pclose(fp);
+ #endif
}
fprintf(stderr,"============ STACKTRACE END ==============\n");
//fprintf(stderr,"%s\n", frameStrings[x]);
@@ -7950,10 +7958,9 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
void *cd = portable_iconv_open(outputEncoding,inputEncoding);
if (cd==(void *)(-1))
{
- err("unsupported character conversion: '%s'->'%s': %s\n"
+ term("unsupported character conversion: '%s'->'%s': %s\n"
"Check the INPUT_ENCODING setting in the config file!\n",
inputEncoding,outputEncoding,strerror(errno));
- exit(1);
}
int tmpBufSize=size*4+1;
BufStr tmpBuf(tmpBufSize);
@@ -7971,9 +7978,8 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
}
else
{
- err("%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
+ term("%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
fileName,inputEncoding,outputEncoding);
- exit(1);
}
portable_iconv_close(cd);
return newSize;
@@ -8011,7 +8017,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
{
QCString cmd=filterName+" \""+fileName+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
- FILE *f=portable_popen(cmd,"r");
+ FILE *f=Portable::popen(cmd,"r");
if (!f)
{
err("could not execute filter %s\n",filterName.data());
@@ -8025,7 +8031,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
//printf(">>>>>>>>Reading %d bytes\n",numRead);
inBuf.addArray(buf,numRead),size+=numRead;
}
- portable_pclose(f);
+ Portable::pclose(f);
inBuf.at(inBuf.curPos()) ='\0';
Debug::print(Debug::FilterOutput, 0, "Filter output\n");
Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(inBuf));
@@ -8033,13 +8039,18 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
int start=0;
if (size>=2 &&
- (((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) || // Little endian BOM
- ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM
- )
- ) // UCS-2 encoded file
+ ((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) // Little endian BOM
+ ) // UCS-2LE encoded file
+ {
+ transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
+ "UCS-2LE","UTF-8");
+ }
+ else if (size>=2 &&
+ ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM
+ ) // UCS-2BE encoded file
{
transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
- "UCS-2","UTF-8");
+ "UCS-2BE","UTF-8");
}
else if (size>=3 &&
(uchar)inBuf.at(0)==0xEF &&
diff --git a/src/vhdlcode.h b/src/vhdlcode.h
index a7b4687..b79e2ab 100644
--- a/src/vhdlcode.h
+++ b/src/vhdlcode.h
@@ -1,16 +1,35 @@
#ifndef VHDLCODE_H
#define VHDLCODE_H
+#include "parserintf.h"
+
class CodeOutputInterface;
class FileDef;
class MemberDef;
-void parseVhdlCode(CodeOutputInterface &,const char *,const QCString &,
- bool ,const char *,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectXRefs);
-void resetVhdlCodeParserState();
void codeFreeVhdlScanner();
+class VHDLCodeParser : public CodeParserInterface
+{
+ public:
+ virtual ~VHDLCodeParser() {}
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt lang,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ );
+ void resetCodeParserState() {}
+};
+
+
#endif
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 9f128ea..fe5a8d9 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -33,6 +33,7 @@
#include <qdir.h>
#include <qcstringlist.h>
+#include "vhdlcode.h"
#include "entry.h"
#include "doxygen.h"
#include "message.h"
@@ -1530,17 +1531,26 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
/*@ ----------------------------------------------------------------------------
*/
-void resetVhdlCodeParserState()
+static void resetVhdlCodeParserState()
{
g_vhdlKeyDict.setAutoDelete(TRUE);
g_vhdlKeyDict.clear();
}
-void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString &s,
- bool exBlock, const char *exName,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool,const Definition *searchCtx,
- bool /* collectXRefs */)
+void VHDLCodeParser::parseCode(CodeOutputInterface &od,
+ const char *className,
+ const QCString &s,
+ SrcLangExt,
+ bool exBlock,
+ const char *exName,
+ FileDef *fd,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool,
+ const Definition *searchCtx,
+ bool /* collectXRefs */)
{
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
if (s.isEmpty()) return;
@@ -1634,13 +1644,5 @@ void codeFreeVhdlScanner()
#endif
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void vhdlcodeYYdummy() { yy_flex_realloc(0,0); }
-}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
-#endif
-
#include "vhdlcode.l.h"
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index fc8460a..3c30174 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -72,7 +72,7 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStri
static void writeUCFLink(const MemberDef* mdef,OutputList &ol);
static void assignBinding(VhdlConfNode* conf);
static void addInstance(ClassDef* entity, ClassDef* arch, ClassDef *inst,
- const std::unique_ptr<Entry> &cur);
+ const std::shared_ptr<Entry> &cur);
//---------- create svg -------------------------------------------------------------
static void createSVG();
@@ -169,7 +169,7 @@ static void createSVG()
QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
- if (portable_system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
+ if (Portable::system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
{
err("could not create dot file");
}
@@ -2379,7 +2379,7 @@ void VhdlDocGen::writeStringLink(const MemberDef *mdef,QCString mem, OutputList&
void VhdlDocGen::writeSource(const MemberDef *mdef,OutputList& ol,const QCString & cname)
{
- ParserInterface *pIntf = Doxygen::parserManager->getParser(".vhd");
+ CodeParserInterface &intf = Doxygen::parserManager->getCodeParser(".vhd");
// pIntf->resetCodeParserState();
QCString codeFragment=mdef->documentation();
@@ -2405,7 +2405,7 @@ void VhdlDocGen::writeSource(const MemberDef *mdef,OutputList& ol,const QCString
codeFragment.prepend("\n");
ol.pushGeneratorState();
ol.startCodeFragment();
- pIntf->parseCode(ol, // codeOutIntf
+ intf.parseCode( ol, // codeOutIntf
0, // scope
codeFragment, // input
SrcLangExt_VHDL, // lang
@@ -2535,7 +2535,7 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr
qcs.stripPrefix("=");
- std::unique_ptr<Entry> current = std::make_unique<Entry>();
+ std::shared_ptr<Entry> current = std::make_shared<Entry>();
current->spec=VhdlDocGen::UCF_CONST;
current->section=Entry::VARIABLE_SEC;
current->bodyLine=line;
@@ -2900,7 +2900,7 @@ void VhdlDocGen::computeVhdlComponentRelations()
}
static void addInstance(ClassDef* classEntity, ClassDef* ar,
- ClassDef *cd , const std::unique_ptr<Entry> &cur)
+ ClassDef *cd , const std::shared_ptr<Entry> &cur)
{
QCString bName,n1;
@@ -3134,13 +3134,13 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef)
bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
if (!b) return;
- VHDLLanguageScanner *pIntf =(VHDLLanguageScanner*) Doxygen::parserManager->getParser(".vhd");
+ VHDLOutlineParser &intf =dynamic_cast<VHDLOutlineParser&>(Doxygen::parserManager->getOutlineParser(".vhd"));
VhdlDocGen::setFlowMember(mdef);
- std::unique_ptr<Entry> root = std::make_unique<Entry>();
+ std::shared_ptr<Entry> root = std::make_shared<Entry>();
QStrList filesInSameTu;
- pIntf->startTranslationUnit("");
- pIntf->parseInput("",codeFragment.data(),root,FALSE,filesInSameTu);
- pIntf->finishTranslationUnit();
+ intf.startTranslationUnit("");
+ intf.parseInput("",codeFragment.data(),root,FALSE,filesInSameTu);
+ intf.finishTranslationUnit();
}
void VhdlDocGen::resetCodeVhdlParserState()
@@ -3796,7 +3796,7 @@ void FlowChart::createSVG()
QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
- if (portable_system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
+ if (Portable::system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
{
err("could not create dot file");
}
@@ -4312,42 +4312,3 @@ void FlowChart::writeFlowLinks(FTextStream &t)
} //writeFlowLinks
-void VHDLLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt, // lang
- bool isExampleBlock,
- const char *exampleName,
- FileDef *fileDef,
- int startLine,
- int endLine,
- bool inlineFragment,
- const MemberDef *memberDef,
- bool showLineNumbers,
- const Definition *searchCtx,
- bool collectXRefs
- )
-{
-
-parseVhdlCode(codeOutIntf,
- scopeName,
- input,
- isExampleBlock,
- exampleName,
- fileDef,
- startLine,
- endLine,
- inlineFragment,
- memberDef,
- showLineNumbers,
- searchCtx,
- collectXRefs
-
-);
-
-
-
-
-
-
-}// class
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 1d9397b..6203196 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -307,11 +307,11 @@ class FlowChart
~FlowChart();
private:
- int id;
- int stamp;
- int type;
+ int id = 0;
+ int stamp = 0;
+ int type = 0;
- int line;
+ int line = 0;
QCString label;
QCString text;
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index d6e3ac3..5dfa9f6 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -29,11 +29,12 @@
#include "arguments.h"
#include "types.h"
#include "VhdlParserIF.h"
+#include "growbuf.h"
using namespace vhdl::parser;
using namespace std;
-static ParserInterface *g_thisParser;
+static OutlineParserInterface *g_thisParser;
static QCString yyFileName;
static int yyLineNr = 1;
@@ -48,16 +49,15 @@ static Entry* oldEntry;
static bool varr=FALSE;
static QCString varName;
-static std::vector< std::unique_ptr<Entry> > instFiles;
-static std::vector< std::unique_ptr<Entry> > libUse;
+static std::vector< std::shared_ptr<Entry> > instFiles;
+static std::vector< std::shared_ptr<Entry> > libUse;
static std::vector<Entry*> lineEntry;
-Entry* VhdlParser::currentCompound=0;
Entry* VhdlParser::tempEntry=0;
Entry* VhdlParser::lastEntity=0 ;
Entry* VhdlParser::lastCompound=0 ;
Entry* VhdlParser::current_root = 0;
-std::unique_ptr<Entry> VhdlParser::current=0;
+std::shared_ptr<Entry> VhdlParser::current=0;
QCString VhdlParser::compSpec;
QCString VhdlParser::currName;
QCString VhdlParser::confName;
@@ -90,7 +90,7 @@ static void insertEntryAtLine(const Entry* ce,int line);
//-------------------------------------
const QList<VhdlConfNode>& getVhdlConfiguration() { return configL; }
-const std::vector<std::unique_ptr<Entry> > &getVhdlInstList() { return instFiles; }
+const std::vector<std::shared_ptr<Entry> > &getVhdlInstList() { return instFiles; }
Entry* getVhdlCompound()
{
@@ -105,8 +105,8 @@ bool isConstraintFile(const QCString &fileName,const QCString &ext)
}
-void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,
- const std::unique_ptr<Entry> &root, bool ,QStrList&)
+void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
+ const std::shared_ptr<Entry> &root, bool ,QStrList&)
{
g_thisParser=this;
bool inLine=false;
@@ -140,10 +140,9 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,
VhdlParser::current_root=root.get();
VhdlParser::lastCompound=0;
VhdlParser::lastEntity=0;
- VhdlParser::currentCompound=0;
VhdlParser::lastEntity=0;
oldEntry = 0;
- VhdlParser::current=std::make_unique<Entry>();
+ VhdlParser::current=std::make_shared<Entry>();
VhdlParser::initEntry(VhdlParser::current.get());
Doxygen::docGroup.enterFile(fileName,yyLineNr);
vhdlFileName = fileName;
@@ -171,7 +170,7 @@ void VhdlParser::lineCount(const char* text)
{
for (const char* c=text ; *c ; ++c )
{
- yyLineNr += (*c == '\n') ;
+ if (*c == '\n') yyLineNr++;
}
}
@@ -321,7 +320,7 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
strComment.resize(0);
}
-void VHDLLanguageScanner::parsePrototype(const char *text)
+void VHDLOutlineParser::parsePrototype(const char *text)
{
varName=text;
varr=TRUE;
@@ -355,10 +354,10 @@ void VhdlParser::addCompInst(const char *n, const char* instName, const char* co
if (true) // !findInstant(current->type))
{
initEntry(current.get());
- instFiles.emplace_back(std::make_unique<Entry>(*current));
+ instFiles.emplace_back(std::make_shared<Entry>(*current));
}
- current=std::make_unique<Entry>();
+ current=std::make_shared<Entry>();
}
else
{
@@ -396,7 +395,7 @@ void VhdlParser::addVhdlType(const char *n,int startLine,int section,
if (!lastCompound && (section==Entry::VARIABLE_SEC) && (spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) )
{
- libUse.emplace_back(std::make_unique<Entry>(*current));
+ libUse.emplace_back(std::make_shared<Entry>(*current));
current->reset();
}
newEntry();
@@ -746,3 +745,35 @@ const char *getVhdlFileName(void)
{
return vhdlFileName;
}
+
+QCString filter2008VhdlComment(const char *s)
+{
+ GrowBuf growBuf;
+ const char *p=s+3; // skip /*!
+ char c='\0';
+ while (*p == ' ' || *p == '\t') p++;
+ while ((c=*p++))
+ {
+ growBuf.addChar(c);
+ if (c == '\n')
+ {
+ // special handling of space followed by * at beginning of line
+ while (*p == ' ' || *p == '\t') p++;
+ while (*p == '*') p++;
+ // special attention in case character at end is /
+ if (*p == '/') p++;
+ }
+ }
+ // special attention in case */ at end of last line
+ int len = growBuf.getPos();
+ if (growBuf.at(len-1) == '/' && growBuf.at(len-2) == '*')
+ {
+ len -= 2;
+ while (growBuf.at(len-1) == '*') len--;
+ c = growBuf.at(len-1);
+ while ((c = growBuf.at(len-1)) == ' ' || c == '\t') len--;
+ growBuf.setPos(len);
+ }
+ growBuf.addChar(0);
+ return growBuf.get();
+}
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index 56444ba..f3e7d70 100644
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -39,36 +39,20 @@ struct VhdlConfNode;
*
* This is the VHDL language parser for doxygen.
*/
-class VHDLLanguageScanner : public ParserInterface
+class VHDLOutlineParser : public OutlineParserInterface
{
public:
- virtual ~VHDLLanguageScanner() {}
+ virtual ~VHDLOutlineParser() {}
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char * fileName,
const char *fileBuf,
- const std::unique_ptr<Entry> &root,
+ const std::shared_ptr<Entry> &root,
bool sameTranslationUnit,
QStrList &filesInSameTranslationUnit);
-
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt lang,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- );
- bool needsPreprocessing(const QCString &) const { return TRUE; }
- void resetCodeParserState(){};
- void parsePrototype(const char *text);
+
+ bool needsPreprocessing(const QCString &) const { return TRUE; }
+ void parsePrototype(const char *text);
};
struct VhdlConfNode
@@ -89,15 +73,15 @@ struct VhdlConfNode
QCString arch;
QCString binding;
QCString compSpec;
- int level;
- bool isLeaf;
- bool isInlineConf;
+ int level = 0;
+ bool isLeaf = false;
+ bool isInlineConf = false;
};
void vhdlscanFreeScanner();
const QList<VhdlConfNode>& getVhdlConfiguration();
-const std::vector<std::unique_ptr<Entry> >&getVhdlInstList();
-
+const std::vector<std::shared_ptr<Entry> >&getVhdlInstList();
+QCString filter2008VhdlComment(const char *s);
#endif
diff --git a/src/xmlcode.h b/src/xmlcode.h
index e463866..4cada9b 100644
--- a/src/xmlcode.h
+++ b/src/xmlcode.h
@@ -19,7 +19,7 @@
#ifndef XMLCODE_H
#define XMLCODE_H
-#include "types.h"
+#include "parserintf.h"
class CodeOutputInterface;
class FileDef;
@@ -27,11 +27,28 @@ class MemberDef;
class QCString;
class Definition;
-extern void parseXmlCode(CodeOutputInterface &,const char *,const QCString &,
- bool ,const char *,FileDef *fd,
- int startLine,int endLine,bool inlineFragment,
- const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
- bool collectXRefs);
-extern void resetXmlCodeParserState();
+/** XML scanner. Only support syntax highlighting of code at the moment.
+ */
+class XMLCodeParser : public CodeParserInterface
+{
+ public:
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ const MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ const Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ );
+ void resetCodeParserState();
+};
+
#endif
diff --git a/src/xmlcode.l b/src/xmlcode.l
index bd6e8a8..94548f8 100644
--- a/src/xmlcode.l
+++ b/src/xmlcode.l
@@ -407,12 +407,32 @@ void resetXmlCodeParserState()
g_currentMemberDef = 0;
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void xmlcodeYYdummy() { yy_flex_realloc(0,0); }
+//----------------------------------------------------------------------------
+
+void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt,
+ bool isExampleBlock,
+ const char *exampleName,
+ FileDef *fileDef,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool showLineNumbers,
+ const Definition *searchCtx,
+ bool collectXRefs
+ )
+{
+ parseXmlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs);
+}
+
+void XMLCodeParser::resetCodeParserState()
+{
+ resetXmlCodeParserState();
}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
-#endif
#include "xmlcode.l.h"
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index a0afa9d..828c265 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -251,8 +251,8 @@ void XmlDocVisitor::visit(DocVerbatim *s)
m_t << " filename=\"" << lang << "\">";
else
m_t << ">";
- Doxygen::parserManager->getParser(lang)
- ->parseCode(m_ci,s->context(),s->text(),langExt,
+ Doxygen::parserManager->getCodeParser(lang)
+ .parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
m_t << "</programlisting>";
break;
@@ -306,8 +306,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
m_t << "<programlisting filename=\"" << inc->file() << "\">";
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -325,8 +325,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
break;
case DocInclude::Include:
m_t << "<programlisting filename=\"" << inc->file() << "\">";
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,inc->context(),
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,inc->context(),
inc->text(),
langExt,
inc->isExample(),
@@ -367,8 +367,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
break;
case DocInclude::Snippet:
m_t << "<programlisting filename=\"" << inc->file() << "\">";
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -382,8 +382,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
m_t << "<programlisting filename=\"" << inc->file() << "\">";
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getParser(inc->extension())
- ->parseCode(m_ci,
+ Doxygen::parserManager->getCodeParser(inc->extension())
+ .parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -436,8 +436,8 @@ void XmlDocVisitor::visit(DocIncOperator *op)
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getParser(locLangExt)
- ->parseCode(m_ci,op->context(),
+ Doxygen::parserManager->getCodeParser(locLangExt)
+ .parseCode(m_ci,op->context(),
op->text(),langExt,op->isExample(),
op->exampleFile(),
fd, // fileDef
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 9e76d6f..bf5af84 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -417,11 +417,11 @@ static void writeXMLDocBlock(FTextStream &t,
void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
{
- ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
+ CodeParserInterface &intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
SrcLangExt langExt = getLanguageFromFileName(fd->getDefFileExtension());
- pIntf->resetCodeParserState();
+ intf.resetCodeParserState();
XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
- pIntf->parseCode(*xmlGen, // codeOutIntf
+ intf.parseCode(*xmlGen, // codeOutIntf
0, // scopeName
fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
langExt, // lang
@@ -980,7 +980,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
if (md->getDefLine()!=-1)
{
t << " <location file=\""
- << stripFromPath(md->getDefFileName()) << "\" line=\""
+ << convertToXML(stripFromPath(md->getDefFileName())) << "\" line=\""
<< md->getDefLine() << "\" column=\""
<< md->getDefColumn() << "\"" ;
if (md->getStartBodyLine()!=-1)
@@ -988,14 +988,14 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
FileDef *bodyDef = md->getBodyDef();
if (bodyDef)
{
- t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
+ t << " bodyfile=\"" << convertToXML(stripFromPath(bodyDef->absFilePath())) << "\"";
}
t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\""
<< md->getEndBodyLine() << "\"";
}
if (md->getDeclLine()!=-1)
{
- t << " declfile=\"" << stripFromPath(md->getDeclFileName()) << "\" declline=\""
+ t << " declfile=\"" << convertToXML(stripFromPath(md->getDeclFileName())) << "\" declline=\""
<< md->getDeclLine() << "\" declcolumn=\""
<< md->getDeclColumn() << "\"";
}
@@ -1418,7 +1418,7 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
t << " </collaborationgraph>" << endl;
}
t << " <location file=\""
- << stripFromPath(cd->getDefFileName()) << "\" line=\""
+ << convertToXML(stripFromPath(cd->getDefFileName())) << "\" line=\""
<< cd->getDefLine() << "\"" << " column=\""
<< cd->getDefColumn() << "\"" ;
if (cd->getStartBodyLine()!=-1)
@@ -1426,7 +1426,7 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
FileDef *bodyDef = cd->getBodyDef();
if (bodyDef)
{
- t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
+ t << " bodyfile=\"" << convertToXML(stripFromPath(bodyDef->absFilePath())) << "\"";
}
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
<< cd->getEndBodyLine() << "\"";
@@ -1506,7 +1506,7 @@ static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti)
writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
t << " </detaileddescription>" << endl;
t << " <location file=\""
- << stripFromPath(nd->getDefFileName()) << "\" line=\""
+ << convertToXML(stripFromPath(nd->getDefFileName())) << "\" line=\""
<< nd->getDefLine() << "\"" << " column=\""
<< nd->getDefColumn() << "\"/>" << endl ;
t << " </compounddef>" << endl;
@@ -1648,7 +1648,7 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
writeXMLCodeBlock(t,fd);
t << " </programlisting>" << endl;
}
- t << " <location file=\"" << stripFromPath(fd->getDefFileName()) << "\"/>" << endl;
+ t << " <location file=\"" << convertToXML(stripFromPath(fd->getDefFileName())) << "\"/>" << endl;
t << " </compounddef>" << endl;
t << "</doxygen>" << endl;
@@ -1762,7 +1762,7 @@ static void generateXMLForDir(DirDef *dd,FTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
t << " </detaileddescription>" << endl;
- t << " <location file=\"" << stripFromPath(dd->name()) << "\"/>" << endl;
+ t << " <location file=\"" << convertToXML(stripFromPath(dd->name())) << "\"/>" << endl;
t << " </compounddef>" << endl;
t << "</doxygen>" << endl;
diff --git a/src/xmlscanner.h b/src/xmlscanner.h
deleted file mode 100644
index 0fe01a7..0000000
--- a/src/xmlscanner.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/******************************************************************************
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef XMLSCANNER_H
-#define XMLSCANNER_H
-
-#include "parserintf.h"
-#include "xmlcode.h"
-
-/** XML scanner. Only support syntax highlighting of code at the moment.
- */
-class XMLScanner : public ParserInterface
-{
-public:
- XMLScanner() {}
- virtual ~XMLScanner() {}
- void startTranslationUnit(const char *) {}
- void finishTranslationUnit() {}
- void parseInput(const char *, const char *, const std::unique_ptr<Entry> &, bool , QStrList &) {}
- bool needsPreprocessing(const QCString &) const { return FALSE; }
-
- void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
- const QCString &input,
- SrcLangExt,
- bool isExampleBlock,
- const char *exampleName=0,
- FileDef *fileDef=0,
- int startLine=-1,
- int endLine=-1,
- bool inlineFragment=FALSE,
- const MemberDef *memberDef=0,
- bool showLineNumbers=TRUE,
- const Definition *searchCtx=0,
- bool collectXRefs=TRUE
- )
- {
- parseXmlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
- fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs);
- }
-
- void resetCodeParserState()
- {
- resetXmlCodeParserState();
- }
-
- void parsePrototype(const char *) {}
-
-private:
-};
-
-#endif
diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css
index ffba793..2c9dfd5 100644
--- a/templates/html/doxygen.css
+++ b/templates/html/doxygen.css
@@ -66,6 +66,11 @@ p.startli, p.startdd {
margin-top: 2px;
}
+th p.starttd, p.intertd, p.endtd {
+ font-size: 100%;
+ font-weight: 700;
+}
+
p.starttd {
margin-top: 0px;
}
diff --git a/templates/html/resize.js b/templates/html/resize.js
index f5291d9..a0bb5f4 100644
--- a/templates/html/resize.js
+++ b/templates/html/resize.js
@@ -91,6 +91,7 @@ function initResizable()
}
collapsedWidth=width;
}
+ (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
}
function collapseExpand()
diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty
index b930937..78a5254 100644
--- a/templates/latex/doxygen.sty
+++ b/templates/latex/doxygen.sty
@@ -35,9 +35,15 @@
\endgroup%
}
-\newcommand{\DoxyHorRuler}{%
+\newcommand{\DoxyHorRuler}[1]{%
\setlength{\parskip}{0ex plus 0ex minus 0ex}%
- \hrule%
+ \ifthenelse{#1=0}%
+ {%
+ \hrule%
+ }%
+ {%
+ \hrulefilll%
+ }%
}
\newcommand{\DoxyLabelFont}{}
\newcommand{\entrylabel}[1]{%
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd
index 93ff9d7..60a0b09 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -414,6 +414,7 @@
<xsd:element name="underline" type="docMarkupType" />
<xsd:element name="emphasis" type="docMarkupType" />
<xsd:element name="computeroutput" type="docMarkupType" />
+ <xsd:element name="ins" type="docMarkupType" />
<xsd:element name="subscript" type="docMarkupType" />
<xsd:element name="superscript" type="docMarkupType" />
<xsd:element name="center" type="docMarkupType" />
diff --git a/testing/runtests.py b/testing/runtests.py
index fa3c186..a4118b8 100755
--- a/testing/runtests.py
+++ b/testing/runtests.py
@@ -2,9 +2,38 @@
from __future__ import print_function
import argparse, glob, itertools, re, shutil, os, sys
+import subprocess
config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')
+
+def xopen(fname, mode='r', encoding='utf-8'):
+ '''Unified file opening for Python 2 an Python 3.
+
+ Python 2 does not have the encoding argument. Python 3 has one.
+ '''
+
+ if sys.version_info[0] == 2:
+ return open(fname, mode=mode) # Python 2 without encoding
+ else:
+ return open(fname, mode=mode, encoding=encoding) # Python 3 with encoding
+
+def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False):
+ '''Unified file pipe opening for Python 2 an Python 3.
+
+ Python 2 does not have the encoding argument. Python 3 has one. and
+ '''
+
+ if sys.version_info[0] == 2:
+ return os.popen(cmd).read() # Python 2 without encoding
+ else:
+ if (getStderr):
+ proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding
+ return proc.stderr
+ else:
+ proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
+ return proc.stdout.read()
+
class Tester:
def __init__(self,args,test):
self.args = args
@@ -25,7 +54,7 @@ class Tester:
elif not os.path.isfile(expected_file):
return (True,'%s absent' % expected_file)
else:
- diff = os.popen('diff -b -w -u %s %s' % (got_file,expected_file)).read()
+ diff = xpopen('diff -b -w -u %s %s' % (got_file,expected_file))
if diff and not diff.startswith("No differences"):
return (True,'Difference between generated output and reference:\n%s' % diff)
return (False,'')
@@ -67,7 +96,7 @@ class Tester:
def get_config(self):
config = {}
- with open(self.args.inputdir+'/'+self.test,'r') as f:
+ with xopen(self.args.inputdir+'/'+self.test,'r') as f:
for line in f.readlines():
m = config_reg.match(line)
if m:
@@ -84,7 +113,7 @@ class Tester:
shutil.rmtree(self.test_out,ignore_errors=True)
os.mkdir(self.test_out)
shutil.copy(self.args.inputdir+'/Doxyfile',self.test_out)
- with open(self.test_out+'/Doxyfile','a') as f:
+ with xopen(self.test_out+'/Doxyfile','a') as f:
print('INPUT=%s/%s' % (self.args.inputdir,self.test), file=f)
print('STRIP_FROM_PATH=%s' % self.args.inputdir, file=f)
print('EXAMPLE_PATH=%s' % self.args.inputdir, file=f)
@@ -113,6 +142,7 @@ class Tester:
print('HTML_FILE_EXTENSION=.xhtml', file=f)
if (self.args.pdf):
print('GENERATE_LATEX=YES', file=f)
+ print('LATEX_BATCHMODE=YES', file=f)
print('LATEX_OUTPUT=%s/latex' % self.test_out, file=f)
if self.args.subdirs:
print('CREATE_SUBDIRS=YES', file=f)
@@ -154,7 +184,7 @@ class Tester:
print('Non-existing file %s after \'check:\' statement' % check_file)
return
# convert output to canonical form
- data = os.popen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
+ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
if data:
# strip version
data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
@@ -162,7 +192,7 @@ class Tester:
print('Failed to run %s on the doxygen output file %s' % (self.args.xmllint,self.test_out))
return
out_file='%s/%s' % (self.test_out,check)
- with open(out_file,'w') as f:
+ with xopen(out_file,'w') as f:
print(data,file=f)
shutil.rmtree(self.test_out+'/out',ignore_errors=True)
os.remove(self.test_out+'/Doxyfile')
@@ -204,7 +234,7 @@ class Tester:
else:
check_file = check_file[0]
# convert output to canonical form
- data = os.popen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
+ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file))
if data:
# strip version
data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
@@ -212,7 +242,7 @@ class Tester:
msg += ('Failed to run %s on the doxygen output file %s' % (self.args.xmllint,self.test_out),)
break
out_file='%s/%s' % (self.test_out,check)
- with open(out_file,'w') as f:
+ with xopen(out_file,'w') as f:
print(data,file=f)
ref_file='%s/%s/%s' % (self.args.inputdir,self.test_id,check)
(failed_xml,xml_msg) = self.compare_ok(out_file,ref_file,self.test_name)
@@ -235,10 +265,12 @@ class Tester:
index_xsd.append(glob.glob('%s/index.xsd' % (xmlxsd_output)))
index_xsd.append(glob.glob('%s/*/*/index.xsd' % (xmlxsd_output)))
index_xsd = ' '.join(list(itertools.chain.from_iterable(index_xsd))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --noout --schema %s %s %s' % (self.args.xmllint,index_xsd,index_xml,redirx)
+ exe_string = '%s --noout --schema %s %s' % (self.args.xmllint,index_xsd,index_xml)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,xmlxsd_output)
- xmllint_out = os.popen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
if xmllint_out:
xmllint_out = re.sub(r'.*validates','',xmllint_out).rstrip('\n')
else:
@@ -259,10 +291,12 @@ class Tester:
compound_xsd.append(glob.glob('%s/compound.xsd' % (xmlxsd_output)))
compound_xsd.append(glob.glob('%s/*/*/compound.xsd' % (xmlxsd_output)))
compound_xsd = ' '.join(list(itertools.chain.from_iterable(compound_xsd))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --noout --schema %s %s %s' % (self.args.xmllint,compound_xsd,compound_xml,redirx)
+ exe_string = '%s --noout --schema %s %s' % (self.args.xmllint,compound_xsd,compound_xml)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,xmlxsd_output)
- xmllint_out = os.popen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
if xmllint_out:
xmllint_out = re.sub(r'.*validates','',xmllint_out).rstrip('\n')
else:
@@ -292,11 +326,13 @@ class Tester:
tests.append(glob.glob('%s/*.xml' % (docbook_output)))
tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output)))
tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --nonet --postvalid %s %s' % (self.args.xmllint,tests,redirx)
+ exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,docbook_output)
failed_docbook=False
- xmllint_out = os.popen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
xmllint_out = self.cleanup_xmllint_docbook(xmllint_out)
if xmllint_out:
msg += (xmllint_out,)
@@ -310,10 +346,12 @@ class Tester:
redirx=' 2> %s/temp >nul:'%html_output
else:
redirx='2>%s/temp >/dev/null'%html_output
- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml %s %s ' % (self.args.xmllint,html_output,redirx,separ)
- exe_string += 'more "%s/temp"' % (html_output)
+ exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
+ exe_string += ' %s more "%s/temp"' % (separ,html_output)
failed_html=False
- xmllint_out = os.popen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
xmllint_out = self.cleanup_xmllint(xmllint_out)
if xmllint_out:
msg += (xmllint_out,)
@@ -325,15 +363,25 @@ class Tester:
latex_output='%s/latex' % self.test_out
if (sys.platform == 'win32'):
redirl='>nul: 2>temp'
+ mk='make.bat'
else:
redirl='>/dev/null 2>temp'
- exe_string = 'cd %s %s echo "q" | make %s %s' % (latex_output,separ,redirl,separ)
- exe_string += 'more temp'
- latex_out = os.popen(exe_string).read()
+ mk='make'
+ cur_directory = os.getcwd()
+ os.chdir(latex_output)
+ exe_string = mk
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirl)
+ exe_string += ' %s more temp' % (separ)
+ latex_out = xpopen(exe_string,exe_string1,getStderr=True)
+ os.chdir(cur_directory);
if latex_out.find("Error")!=-1:
msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
failed_html=True
- elif open(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1:
+ elif xopen(latex_output + "/refman.log",'r').read().find("Error")!= -1:
+ msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
+ failed_html=True
+ elif xopen(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1:
msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
failed_html=True
elif not self.args.keep:
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt
index ad5af28..43dc74d 100644
--- a/vhdlparser/CMakeLists.txt
+++ b/vhdlparser/CMakeLists.txt
@@ -1,7 +1,7 @@
find_package(Javacc)
if (JAVACC_FOUND)
add_custom_command(
- COMMAND ${JAVACC_EXECUTABLE} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj
+ COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj
DEPENDS ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj
OUTPUT ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.cc ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.h ${CMAKE_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${CMAKE_SOURCE_DIR}/vhdlparser/JavaCC.h ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.cc ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.h ${CMAKE_SOURCE_DIR}/vhdlparser/Token.cc ${CMAKE_SOURCE_DIR}/vhdlparser/Token.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenManager.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h
)
diff --git a/vhdlparser/CharStream.cc b/vhdlparser/CharStream.cc
index 05003ef..65179f5 100644
--- a/vhdlparser/CharStream.cc
+++ b/vhdlparser/CharStream.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "CharStream.h"
@@ -12,8 +12,8 @@ void ArrayCopy(T* src, int src_offset, T* dest, int dest_offset, int len) {
class StringReaderStream : public ReaderStream {
public:
- StringReaderStream(const JJString& str) : str_(str), cur_(0), max_(str.size()) {}
- virtual size_t read(JJChar *bufptr, int offset, size_t len) {
+ StringReaderStream(const JAVACC_STRING_TYPE& str) : str_(str), cur_(0), max_(str.size()) {}
+ virtual size_t read(JAVACC_CHAR_TYPE *bufptr, int offset, size_t len) {
size_t count = str_.copy(bufptr + offset, len > max_ ? max_ : len, cur_);
cur_ += count;
max_ -= count;
@@ -25,7 +25,7 @@ class StringReaderStream : public ReaderStream {
}
private:
- const JJString str_;
+ const JAVACC_STRING_TYPE str_;
size_t cur_;
size_t max_;
};
@@ -33,7 +33,7 @@ class StringReaderStream : public ReaderStream {
namespace vhdl {
namespace parser {
-void CharStream::ReInit(const JJString& str, int startline,
+void CharStream::ReInit(const JAVACC_STRING_TYPE& str, int startline,
int startcolumn, int buffersize) {
StringReaderStream *stream = new StringReaderStream(str);
ReInit(stream, startline, startcolumn, buffersize);
@@ -46,12 +46,12 @@ void CharStream::ReInit(ReaderStream *input_stream, int startline,
delete inputStream;
}
- if (buffer) {
+ if (buffer != NULL) {
DeleteBuffers();
}
available = bufsize = buffersize;
- buffer = new JJChar[buffersize];
+ buffer = new JAVACC_CHAR_TYPE[buffersize];
bufline = new int[buffersize];
bufcolumn = new int[buffersize];
@@ -111,7 +111,7 @@ void CharStream::adjustBeginLineColumn(int newLine, int newCol) {
}
void CharStream::ExpandBuff(bool wrapAround) {
- JJChar *newbuffer = new JJChar[bufsize + 2048];
+ JAVACC_CHAR_TYPE *newbuffer = new JAVACC_CHAR_TYPE[bufsize + 2048];
int *newbufline = new int[bufsize + 2048];
int *newbufcolumn = new int[bufsize + 2048];
@@ -160,7 +160,7 @@ void CharStream::FillBuff() {
}
}
- size_t i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd);
+ int i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd);
if (i > 0) {
maxNextCharInd += i;
} else {
@@ -172,7 +172,7 @@ void CharStream::FillBuff() {
}
}
-void CharStream::UpdateLineColumn(JJChar c) {
+void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) {
column++;
if (prevCharIsLF) {
prevCharIsLF = false;
@@ -209,4 +209,4 @@ void CharStream::UpdateLineColumn(JJChar c) {
}
}
-/* JavaCC - OriginalChecksum=0ba78d6c493d812eba61de6fa794fd15 (do not edit this line) */
+/* JavaCC - OriginalChecksum=ade3c1b57a731a003629de593814ffa6 (do not edit this line) */
diff --git a/vhdlparser/CharStream.h b/vhdlparser/CharStream.h
index 212fadf..69b8ab5 100644
--- a/vhdlparser/CharStream.h
+++ b/vhdlparser/CharStream.h
@@ -1,8 +1,7 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_CHARSTREAM_H_
-#define JAVACC_CHARSTREAM_H_
-
+#ifndef CHARSTREAM_H
+#define CHARSTREAM_H
#include "JavaCC.h"
#ifndef INITIAL_BUFFER_SIZE
@@ -30,10 +29,9 @@ namespace parser {
class CharStream {
public:
- void setTabSize(int i) { tabSize = i; }
- int getTabSize(int i) { return tabSize; }
-
-private:
+ void setTabSize(int i) { tabSize = i; }
+ int getTabSize(int i) { return tabSize; }
+ private:
int getBufcolumn(int pos) {
if (trackLineColumn && pos>=0) {
return bufcolumn[pos];
@@ -48,14 +46,13 @@ private:
return -1;
}
}
-
-public:
- virtual int getColumn() { return getBufcolumn(bufpos); }
- virtual int getLine() { return getBufline(bufpos); }
- virtual int getEndColumn() { return getBufcolumn(bufpos); }
- virtual int getEndLine() { return getBufline(bufpos); }
- virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
- virtual int getBeginLine() { return getBufline(tokenBegin); }
+ public:
+ virtual int getColumn() { return getBufcolumn(bufpos); }
+ virtual int getLine() { return getBufline(bufpos); }
+ virtual int getEndColumn() { return getBufcolumn(bufpos); }
+ virtual int getEndLine() { return getBufline(bufpos); }
+ virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
+ virtual int getBeginLine() { return getBufline(tokenBegin); }
virtual bool getTrackLineColumn() { return trackLineColumn; }
virtual void setTrackLineColumn(bool val) { trackLineColumn = val; }
@@ -79,9 +76,9 @@ public:
* All characters must remain in the buffer between two successive calls
* to this method to implement backup correctly.
*/
- virtual inline JJChar BeginToken() {
+ virtual inline JAVACC_CHAR_TYPE BeginToken() {
tokenBegin = -1;
- JJChar c = readChar();
+ JAVACC_CHAR_TYPE c = readChar();
tokenBegin = bufpos;
return c;
}
@@ -92,7 +89,7 @@ public:
* of selecting the input is the responsibility of the class
* implementing this class.
*/
- virtual inline JJChar readChar() {
+ virtual inline JAVACC_CHAR_TYPE readChar() {
if (inBuf > 0) {
--inBuf;
++bufpos;
@@ -107,7 +104,7 @@ public:
FillBuff();
}
- JJChar c = buffer[bufpos];
+ JAVACC_CHAR_TYPE c = buffer[bufpos];
if (trackLineColumn) {
UpdateLineColumn(c);
@@ -126,11 +123,11 @@ public:
* anything that they want to. For example, for efficiency, one might decide
* to just return NULL, which is a valid implementation.
*/
- virtual JJString GetImage() {
+ virtual JAVACC_STRING_TYPE GetImage() {
if (bufpos >= tokenBegin)
- return JJString(buffer + tokenBegin, bufpos - tokenBegin + 1);
+ return JAVACC_STRING_TYPE(buffer + tokenBegin, bufpos - tokenBegin + 1);
else
- return JJString(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
+ return JAVACC_STRING_TYPE(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
}
/**
@@ -139,11 +136,11 @@ public:
* for use in actions in the case of MORE. A simple and inefficient
* implementation of this is as follows :
*/
- virtual JJString GetSuffix(int len) {
+ virtual JAVACC_STRING_TYPE GetSuffix(int len) {
if ((bufpos + 1) >= len) {
- return JJString(buffer + bufpos - len + 1, len);
+ return JAVACC_STRING_TYPE(buffer + bufpos - len + 1, len);
}
- return JJString(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
+ return JAVACC_STRING_TYPE(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
}
/**
@@ -163,62 +160,62 @@ public:
return inBuf == 0 && bufpos + 1 >= maxNextCharInd && inputStream->endOfInput();
}
- CharStream(const JJChar *buf, int sz, int startline,
+ CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline,
int startcolumn, int buffersize) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
- ReInit(JJString(buf, sz), startline, startcolumn, buffersize);
+ inputStream(NULL), deleteStream(false) {
+ ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, buffersize);
}
- CharStream(const JJChar *buf, int sz, int startline, int startcolumn) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline, int startcolumn) :
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
- ReInit(JJString(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
+ inputStream(NULL), deleteStream(false) {
+ ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
}
- CharStream(const JJString& str, int startline,
+ CharStream(const JAVACC_STRING_TYPE& str, int startline,
int startcolumn, int buffersize) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
+ inputStream(NULL), deleteStream(false) {
ReInit(str, startline, startcolumn, buffersize);
}
- CharStream(const JJString& str, int startline, int startcolumn) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ CharStream(const JAVACC_STRING_TYPE& str, int startline, int startcolumn) :
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
+ inputStream(NULL), deleteStream(false) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream, int startline,
int startcolumn, int buffersize) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
- ReInit(input_stream, startline, startcolumn, buffersize);
+ inputStream(NULL), deleteStream(false) {
+ ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream, int startline, int startcolumn) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
+ inputStream(NULL), deleteStream(false) {
ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream) :
- bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
+ bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(nullptr), deleteStream(false) {
+ inputStream(NULL), deleteStream(false) {
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
@@ -232,22 +229,22 @@ public:
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
- virtual void ReInit(const JJString& str, int startline,
+ virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
int startcolumn, int buffersize);
- virtual void ReInit(const JJString& str, int startline,
+ virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
int startcolumn) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
virtual void adjustBeginLineColumn(int newLine, int newCol);
-protected:
- virtual void UpdateLineColumn(JJChar c);
+ protected:
+ virtual void UpdateLineColumn(JAVACC_CHAR_TYPE c);
int* bufline;
int* bufcolumn;
- JJChar* buffer;
+ JAVACC_CHAR_TYPE* buffer;
int bufpos;
int bufsize;
int tokenBegin;
@@ -266,6 +263,5 @@ protected:
}
}
-
#endif
-/* JavaCC - OriginalChecksum=c5b4b2e72393f865547f405cc9def169 (do not edit this line) */
+/* JavaCC - OriginalChecksum=3f0e693d1617236429891c8c95713d73 (do not edit this line) */
diff --git a/vhdlparser/ErrorHandler.h b/vhdlparser/ErrorHandler.h
index cd63e9e..224500e 100644
--- a/vhdlparser/ErrorHandler.h
+++ b/vhdlparser/ErrorHandler.h
@@ -1,8 +1,7 @@
-/* Generated By:JavaCC: Do not edit this line. ErrorHandler.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. ErrorHandler.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,BUILD_PARSER=true,BUILD_TOKEN_MANAGER=true */
-#ifndef JAVACC_ERRORHANDLER_H
-#define JAVACC_ERRORHANDLER_H
-
+#ifndef ERRORHANDLER_H
+#define ERRORHANDLER_H
#include <stdio.h>
#include <string>
#include "JavaCC.h"
@@ -11,7 +10,7 @@
namespace vhdl {
namespace parser {
-JJSimpleString addUnicodeEscapes(const JJString& str);
+JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
class VhdlParser;
class ErrorHandler {
@@ -25,7 +24,7 @@ JJSimpleString addUnicodeEscapes(const JJString& str);
// expectedKind - token kind that the parser was trying to consume.
// expectedToken - the image of the token - tokenImages[expectedKind].
// actual - the actual token that the parser got instead.
- virtual void handleUnexpectedToken(int expectedKind, const JJString& expectedToken, Token *actual, VhdlParser *parser) {
+ virtual void handleUnexpectedToken(int expectedKind, JAVACC_STRING_TYPE expectedToken, Token *actual, VhdlParser *parser) {
error_count++;
fprintf(stderr, "Expecting %s at: %d:%d but got %s\n", addUnicodeEscapes(expectedToken).c_str(), actual->beginLine, actual->beginColumn, addUnicodeEscapes(actual->image).c_str());
}
@@ -33,14 +32,14 @@ JJSimpleString addUnicodeEscapes(const JJString& str);
// last - the last token successfully parsed.
// unexpected - the token at which the error occurs.
// production - the production in which this error occurs.
- virtual void handleParseError(Token *last, Token *unexpected, const JJSimpleString& production, VhdlParser *parser) {
+ virtual void handleParseError(Token *last, Token *unexpected, JAVACC_SIMPLE_STRING production, VhdlParser *parser) {
error_count++;
fprintf(stderr, "Encountered: %s at: %d:%d while parsing: %s\n", addUnicodeEscapes(unexpected->image).c_str(), unexpected->beginLine, unexpected->beginColumn, production.c_str());
}
virtual int getErrorCount() {
return error_count;
}
- virtual void handleOtherError(const JJString& message, VhdlParser *parser) {
+ virtual void handleOtherError(JAVACC_STRING_TYPE message, VhdlParser *parser) {
fprintf(stderr, "Error: %s\n", (char*)message.c_str());
}
virtual ~ErrorHandler() {}
@@ -63,11 +62,11 @@ JJSimpleString addUnicodeEscapes(const JJString& str);
// errorAfter : prefix that was seen before this error occurred
// curchar : the offending character
//
- virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, VhdlParserTokenManager* token_manager) {
+ virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, VhdlParserTokenManager* token_manager) {
// by default, we just print an error message and return.
fprintf(stderr, "Lexical error at: %d:%d. Encountered: %c after: %s.\n", errorLine, errorColumn, curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
}
- virtual void lexicalError(const JJString& errorMessage, VhdlParserTokenManager* token_manager) {
+ virtual void lexicalError(JAVACC_STRING_TYPE errorMessage, VhdlParserTokenManager* token_manager) {
fprintf(stderr, "%s\n", (char*)errorMessage.c_str());
}
virtual ~TokenManagerErrorHandler() {}
@@ -77,5 +76,4 @@ JJSimpleString addUnicodeEscapes(const JJString& str);
}
#endif
-
-/* JavaCC - OriginalChecksum=5361b31ac6530c6c23511012deb15394 (do not edit this line) */
+/* JavaCC - OriginalChecksum=c18f1105ba178be8e21cc9f279f94496 (do not edit this line) */
diff --git a/vhdlparser/ParseException.cc b/vhdlparser/ParseException.cc
index fa2002e..375ff6c 100644
--- a/vhdlparser/ParseException.cc
+++ b/vhdlparser/ParseException.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.cc Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.cc Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "ParseException.h"
@@ -23,7 +23,7 @@ namespace parser {
*/
ParseException::ParseException(Token currentTokenVal,
int** expectedTokenSequencesVal,
- JJString* tokenImageVal
+ JAVACC_STRING_TYPE* tokenImageVal
)
{
initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal);
@@ -46,7 +46,7 @@ namespace parser {
}
/** Constructor with message. */
- ParseException::ParseException(const JJString& message) {
+ ParseException::ParseException(JAVACC_STRING_TYPE message) {
}
@@ -69,7 +69,7 @@ namespace parser {
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JJString* tokenImage;
+ JAVACC_STRING_TYPE* tokenImage;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
@@ -78,12 +78,12 @@ namespace parser {
* from the parser) the correct error message
* gets displayed.
*/
- JJString ParseException::initialise(Token currentToken,
+ JAVACC_STRING_TYPE ParseException::initialise(Token currentToken,
int** expectedTokenSequences,
- JJString* tokenImage) {
+ JAVACC_STRING_TYPE* tokenImage) {
#if 0
- //JJString eol = System.getProperty("line.separator", "\n");
- expected = new JJString();
+ //JAVACC_STRING_TYPE eol = System.getProperty("line.separator", "\n");
+ expected = new JAVACC_STRING_TYPE();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
@@ -93,39 +93,39 @@ namespace parser {
expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
}
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected.append((JJChar*)"...");
+ expected.append((JAVACC_CHAR_TYPE*)"...");
}
expected.append(eol).append(" ");
}
- JJString retval = (JJChar*)"Encountered \"";
+ JAVACC_STRING_TYPE retval = (JAVACC_CHAR_TYPE*)"Encountered \"";
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += (JJChar*)" ";
+ if (i != 0) retval += (JAVACC_CHAR_TYPE*)" ";
if (tok.kind == 0) {
retval += tokenImage[0];
break;
}
- retval += (JJChar*)" " + tokenImage[tok.kind];
- retval += (JJChar*)" \"";
+ retval += (JAVACC_CHAR_TYPE*)" " + tokenImage[tok.kind];
+ retval += (JAVACC_CHAR_TYPE*)" \"";
retval += add_escapes(tok.image);
- retval += (JJChar*)" \"";
+ retval += (JAVACC_CHAR_TYPE*)" \"";
tok = tok.next;
}
- retval += (JJChar*)"\" at line " + currentToken.next.beginLine + (JJChar*)", column " + currentToken.next.beginColumn;
- retval += (JJChar*)"." + eol;
+ retval += (JAVACC_CHAR_TYPE*)"\" at line " + currentToken.next.beginLine + (JAVACC_CHAR_TYPE*)", column " + currentToken.next.beginColumn;
+ retval += (JAVACC_CHAR_TYPE*)"." + eol;
if (expectedTokenSequences.length == 1) {
- retval += (JJChar*)"Was expecting:" + eol + (JJChar*)" ";
+ retval += (JAVACC_CHAR_TYPE*)"Was expecting:" + eol + (JAVACC_CHAR_TYPE*)" ";
} else {
- retval += (JJChar*)"Was expecting one of:" + eol + (JJChar*)" ";
+ retval += (JAVACC_CHAR_TYPE*)"Was expecting one of:" + eol + (JAVACC_CHAR_TYPE*)" ";
}
retval += expected.toString();
return retval;
#endif
- return (JJChar*)"Parse exception";
+ return (JAVACC_CHAR_TYPE*)"Parse exception";
}
/**
- * The end of line JJString for this machine.
+ * The end of line JAVACC_STRING_TYPE for this machine.
*/
#define eol "\n"
@@ -134,10 +134,10 @@ namespace parser {
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- JJString ParseException::add_escapes(const JJString& str) {
+ JAVACC_STRING_TYPE ParseException::add_escapes(JAVACC_STRING_TYPE str) {
/*
- JJString *retval = new JJString();
- JJChar ch;
+ JAVACC_STRING_TYPE *retval = new JAVACC_STRING_TYPE();
+ JAVACC_CHAR_TYPE ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
{
@@ -167,7 +167,7 @@ namespace parser {
continue;
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- JJString s = "0000" + Integer.toString(ch, 16);
+ JAVACC_STRING_TYPE s = "0000" + Integer.toString(ch, 16);
retval.append("\\u" + s.substring(s.length() - 4, s.length()));
} else {
retval.append(ch);
@@ -181,4 +181,4 @@ namespace parser {
}
}
-/* JavaCC - OriginalChecksum=7a72405661a136830ccf7f3cab0fffdc (do not edit this line) */
+/* JavaCC - OriginalChecksum=9f6af8fd72f5fe3e4210cf02acbd8387 (do not edit this line) */
diff --git a/vhdlparser/ParseException.h b/vhdlparser/ParseException.h
index c852a74..4a22772 100644
--- a/vhdlparser/ParseException.h
+++ b/vhdlparser/ParseException.h
@@ -1,8 +1,7 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_PARSE_EXCEPTION_H
-#define JAVACC_PARSE_EXCEPTION_H
-
+#ifndef _PARSE_EXCEPTION_H
+#define _PARSE_EXCEPTION_H
#include "JavaCC.h"
#include "Token.h"
@@ -29,7 +28,7 @@ class ParseException {
*/
ParseException(Token currentTokenVal,
int** expectedTokenSequencesVal,
- JJString* tokenImageVal
+ JAVACC_STRING_TYPE* tokenImageVal
);
/**
@@ -45,7 +44,7 @@ class ParseException {
ParseException();
/** Constructor with message. */
- ParseException(const JJString& message);
+ ParseException(JAVACC_STRING_TYPE message);
/**
@@ -67,7 +66,7 @@ class ParseException {
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JJString* tokenImage;
+ JAVACC_STRING_TYPE* tokenImage;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
@@ -76,9 +75,9 @@ class ParseException {
* from the parser) the correct error message
* gets displayed.
*/
- private: JJString initialise(Token currentToken,
+ private: JAVACC_STRING_TYPE initialise(Token currentToken,
int** expectedTokenSequences,
- JJString* tokenImage);
+ JAVACC_STRING_TYPE* tokenImage);
/**
* The end of line string for this machine.
@@ -90,12 +89,11 @@ class ParseException {
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- JJString add_escapes(const JJString& str);
+ JAVACC_STRING_TYPE add_escapes(JAVACC_STRING_TYPE str);
};
}
}
-
#endif
-/* JavaCC - OriginalChecksum=6705523c0ea4e83f3c38da57253c0aea (do not edit this line) */
+/* JavaCC - OriginalChecksum=bd87c2fc11a4306bd2c2482fd1025b7c (do not edit this line) */
diff --git a/vhdlparser/Token.cc b/vhdlparser/Token.cc
index d47dc68..735091d 100644
--- a/vhdlparser/Token.cc
+++ b/vhdlparser/Token.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. Token.cc Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. Token.cc Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
#include "Token.h"
@@ -18,46 +18,42 @@ namespace parser {
* override this method as appropriate.
*/
void * Token::getValue() {
- return nullptr;
+ return NULL;
}
/**
* No-argument constructor
*/
- Token::Token() :
- beginLine(0), beginColumn(0), endLine(0), endColumn(0)
- {
- this->next = nullptr;
- this->specialToken = nullptr;
+ Token::Token() {
+ this->next = NULL;
+ this->specialToken = NULL;
}
/**
* Constructs a new token for the specified Image.
*/
- Token::Token(int kind) :
- beginLine(0), beginColumn(0), endLine(0), endColumn(0)
+ Token::Token(int kind)
{
this->kind = kind;
- this->next = nullptr;
- this->specialToken = nullptr;
+ this->next = NULL;
+ this->specialToken = NULL;
}
/**
* Constructs a new token for the specified Image and Kind.
*/
- Token::Token(int kind, const JJString& image)
- : beginLine(0), beginColumn(0), endLine(0), endColumn(0)
+ Token::Token(int kind, JAVACC_STRING_TYPE image)
{
this->kind = kind;
this->image = image;
- this->next = nullptr;
- this->specialToken = nullptr;
+ this->next = NULL;
+ this->specialToken = NULL;
}
/**
* Returns the image.
*/
- const JJString& Token::toString()
+ JAVACC_STRING_TYPE Token::toString()
{
return image;
}
@@ -74,7 +70,7 @@ namespace parser {
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use sit in your lexical actions.
*/
- Token *Token::newToken(int ofKind, const JJString& image)
+ Token *Token::newToken(int ofKind, JAVACC_STRING_TYPE image)
{
switch(ofKind)
{
@@ -84,16 +80,13 @@ namespace parser {
Token *Token::newToken(int ofKind)
{
- return newToken(ofKind, JJString());
+ return newToken(ofKind, JAVACC_STRING_TYPE((JAVACC_CHAR_TYPE*)""));
}
Token::~Token() {
if (specialToken) delete specialToken;
- this->kind = 0;
- this->next = nullptr;
- this->specialToken = nullptr;
}
}
}
-/* JavaCC - OriginalChecksum=01131f3b3906a670aa8fee6224233701 (do not edit this line) */
+/* JavaCC - OriginalChecksum=dcb0f64486aa6455ae5af05d6bb539ec (do not edit this line) */
diff --git a/vhdlparser/Token.h b/vhdlparser/Token.h
index 3575005..040899e 100644
--- a/vhdlparser/Token.h
+++ b/vhdlparser/Token.h
@@ -1,8 +1,7 @@
-/* Generated By:JavaCC: Do not edit this line. Token.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. Token.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
-#ifndef JAVACC_TOKEN_H
-#define JAVACC_TOKEN_H
-
+#ifndef TOKEN_H
+#define TOKEN_H
#include "JavaCC.h"
@@ -36,7 +35,7 @@ class Token
/**
* The string image of the token.
*/
- JJString image;
+ JAVACC_STRING_TYPE image;
/**
* A reference to the next regular (non-special) token from the input
@@ -85,14 +84,14 @@ class Token
/**
* Constructs a new token for the specified Image and Kind.
*/
- Token(int kind, const JJString& image);
+ Token(int kind, JAVACC_STRING_TYPE image);
virtual ~Token();
/**
* Returns the image.
*/
- const JJString& toString();
+ JAVACC_STRING_TYPE toString();
/**
@@ -107,13 +106,12 @@ class Token
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use sit in your lexical actions.
*/
- static Token *newToken(int ofKind, const JJString& image);
+ static Token *newToken(int ofKind, JAVACC_STRING_TYPE image);
static Token *newToken(int ofKind);
};
}
}
-
#endif
-/* JavaCC - OriginalChecksum=8c237423e3d9695c3bfcf539bcf92375 (do not edit this line) */
+/* JavaCC - OriginalChecksum=4748c3d6443aa3445d3c95ab54f14c2a (do not edit this line) */
diff --git a/vhdlparser/TokenManager.h b/vhdlparser/TokenManager.h
index 6b158ae..0c2caa6 100644
--- a/vhdlparser/TokenManager.h
+++ b/vhdlparser/TokenManager.h
@@ -1,12 +1,13 @@
-/* Generated By:JavaCC: Do not edit this line. TokenManager.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenManager.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_TOKENMANAGER_H
-#define JAVACC_TOKENMANAGER_H
-
+#ifndef TOKENMANAGER_H
+#define TOKENMANAGER_H
#include <iostream>
#include "JavaCC.h"
#include "Token.h"
+using namespace std;
+
namespace vhdl {
namespace parser {
/**
@@ -22,15 +23,13 @@ public:
*/
virtual ~TokenManager() { }
virtual Token *getNextToken() = 0;
- virtual void setParser(void* parser) {};
virtual void lexicalError() {
- std::cerr << "Lexical error encountered." << std::endl;
+ cerr << "Lexical error encountered." << endl;
}
};
}
}
-
#endif
-/* JavaCC - OriginalChecksum=c5e389e7ee25f48da34e517ae429ac2a (do not edit this line) */
+/* JavaCC - OriginalChecksum=918e2eba53e028d6c4142283ce3f498f (do not edit this line) */
diff --git a/vhdlparser/TokenMgrError.cc b/vhdlparser/TokenMgrError.cc
index 3560805..74908f0 100644
--- a/vhdlparser/TokenMgrError.cc
+++ b/vhdlparser/TokenMgrError.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "TokenMgrError.h"
@@ -14,17 +14,17 @@ namespace parser {
* errorLine : line number when the error occurred
* errorColumn : column number when the error occurred
* errorAfter : prefix that was seen before this error occurred
- * curJJChar : the offending character
+ * curJAVACC_CHAR_TYPE : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
- JJString TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar) {
+ JAVACC_STRING_TYPE TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar) {
#if 0
- JJString s;
- stringstream<JJString> ss;
+ JAVACC_STRING_TYPE s;
+ stringstream<JAVACC_STRING_TYPE> ss;
ss << "Lexical error at line " << errorLine << " column " << errorColumn
<< ". Encountered: " << curChar << "(" << (int)curChar
<< ") after : \"" << errorAfter.c_str() << "\"";
- return (JJString)ss.rdbuf()->str();
+ return (JAVACC_STRING_TYPE)ss.rdbuf()->str();
#endif
return EMPTY;
}
@@ -38,7 +38,7 @@ namespace parser {
*
* from this method for such cases in the release version of your parser.
*/
- JJString TokenMgrError::getMessage() {
+ JAVACC_STRING_TYPE TokenMgrError::getMessage() {
return message;
}
@@ -51,12 +51,12 @@ namespace parser {
}
/** Constructor with message and reason. */
- TokenMgrError::TokenMgrError(const JJString& message, int reason) {
+ TokenMgrError::TokenMgrError(JAVACC_STRING_TYPE message, int reason) {
errorCode = reason;
}
/** Full Constructor. */
- TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) {
+ TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) {
message = LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar);
errorCode = reason;
}
@@ -64,7 +64,7 @@ namespace parser {
// i < 16 - guaranteed
char hexChar(int i) {
if (i < 10) {
- return i - '0';
+ return i + '0';
}
return 'a' + (i - 10);
}
@@ -73,10 +73,10 @@ char hexChar(int i) {
* Replaces unprintable characters by their escaped (or unicode escaped)
* equivalents in the given string
*/
-JJSimpleString addUnicodeEscapes(const JJString& str) {
- JJSimpleString retval;
+JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str) {
+ JAVACC_SIMPLE_STRING retval;
for (size_t i = 0; i < str.size(); i++) {
- JJChar ch = str[i];
+ JAVACC_CHAR_TYPE ch = str[i];
switch (ch)
{
case '\b':
@@ -115,4 +115,4 @@ JJSimpleString addUnicodeEscapes(const JJString& str) {
}
}
-/* JavaCC - OriginalChecksum=ed66d80b94c73435ce2644e44f7b4d49 (do not edit this line) */
+/* JavaCC - OriginalChecksum=72f292bc267bd0602e63291bf864f942 (do not edit this line) */
diff --git a/vhdlparser/TokenMgrError.h b/vhdlparser/TokenMgrError.h
index 90c7530..abb305d 100644
--- a/vhdlparser/TokenMgrError.h
+++ b/vhdlparser/TokenMgrError.h
@@ -1,8 +1,7 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 7.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_TOKENMGRERROR_H
-#define JAVACC_TOKENMGRERROR_H
-
+#ifndef _TOKENMGRERROR_H
+#define _TOKENMGRERROR_H
#include "JavaCC.h"
@@ -55,10 +54,10 @@ public:
* curchar : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
- JJString LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar);
+ JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar);
private:
- JJString message;
+ JAVACC_STRING_TYPE message;
/**
* You can also modify the body of this method to customize your error messages.
@@ -70,7 +69,7 @@ private:
* from this method for such cases in the release version of your parser.
*/
public:
- JJString getMessage() ;
+ JAVACC_STRING_TYPE getMessage() ;
/*
* Constructors of various flavors follow.
@@ -80,14 +79,13 @@ public:
TokenMgrError() ;
/** Constructor with message and reason. */
- TokenMgrError(const JJString& message, int reason) ;
+ TokenMgrError(JAVACC_STRING_TYPE message, int reason) ;
/** Full Constructor. */
- TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) ;
+ TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) ;
};
}
}
-
#endif
-/* JavaCC - OriginalChecksum=4ab4cdcdef6a3feec22fd9c00ba86e07 (do not edit this line) */
+/* JavaCC - OriginalChecksum=c22a1b25630ec91deb47dcba22b6b39d (do not edit this line) */
diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc
index 2ed30e2..b360217 100644
--- a/vhdlparser/VhdlParser.cc
+++ b/vhdlparser/VhdlParser.cc
@@ -23,31 +23,37 @@ namespace parser {
QCString VhdlParser::abstract_literal() {Token *tok;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DECIMAL_LITERAL:{
- if (!hasError) {
+ case DECIMAL_LITERAL:{if (!hasError) {
+
tok = jj_consume_token(DECIMAL_LITERAL);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case INTEGER:{
- if (!hasError) {
+ case INTEGER:{if (!hasError) {
+
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case BASED_LITERAL:{
- if (!hasError) {
+ case BASED_LITERAL:{if (!hasError) {
+
tok = jj_consume_token(BASED_LITERAL);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -59,13 +65,15 @@ assert(false);
}
-QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;
- if (!hasError) {
+QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;if (!hasError) {
+
tok = jj_consume_token(ACCESS_T);
}
if (!hasError) {
+
str1 = subtype_indication();
}
+
str=tok->image.c_str(); return str+str1;
assert(false);
}
@@ -73,31 +81,37 @@ assert(false);
QCString VhdlParser::actual_designator() {QCString str;Token *t=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OPEN_T:{
- if (!hasError) {
+ case OPEN_T:{if (!hasError) {
+
t = jj_consume_token(OPEN_T);
}
if (!hasError) {
+
return t->image.c_str();
}
+
break;
}
default:
jj_la1[1] = jj_gen;
- if (jj_2_1(2147483647)) {
- if (!hasError) {
+ if (jj_2_1(2147483647)) {if (!hasError) {
+
str = expression();
}
if (!hasError) {
+
return str;
}
- } else if (jj_2_2(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_2(2147483647)) {if (!hasError) {
+
str = name();
}
if (!hasError) {
+
return str;
}
+
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -107,53 +121,63 @@ assert(false);
}
-QCString VhdlParser::actual_parameter_part() {QCString s;
- if (!hasError) {
+QCString VhdlParser::actual_parameter_part() {QCString s;if (!hasError) {
+
s = association_list();
}
+
return s;
assert(false);
}
QCString VhdlParser::actual_part() {QCString s,s1;
- if (jj_2_3(2147483647)) {
- if (!hasError) {
+ if (jj_2_3(2147483647)) {if (!hasError) {
+
s = actual_designator();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BOX_T:{
- if (!hasError) {
+ case BOX_T:{if (!hasError) {
+
jj_consume_token(BOX_T);
}
if (!hasError) {
+
return "<>";
}
+
break;
}
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = actual_designator();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="(";s+=s1+")";return s;
}
+
break;
}
default:
@@ -168,31 +192,37 @@ assert(false);
QCString VhdlParser::adding_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PLUS_T:{
- if (!hasError) {
+ case PLUS_T:{if (!hasError) {
+
jj_consume_token(PLUS_T);
}
if (!hasError) {
+
return "+";
}
+
break;
}
- case MINUS_T:{
- if (!hasError) {
+ case MINUS_T:{if (!hasError) {
+
jj_consume_token(MINUS_T);
}
if (!hasError) {
+
return "-";
}
+
break;
}
- case AMPERSAND_T:{
- if (!hasError) {
+ case AMPERSAND_T:{if (!hasError) {
+
jj_consume_token(AMPERSAND_T);
}
if (!hasError) {
+
return "&";
}
+
break;
}
default:
@@ -204,14 +234,16 @@ assert(false);
}
-QCString VhdlParser::aggregate() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::aggregate() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s = element_association();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -221,49 +253,60 @@ QCString VhdlParser::aggregate() {QCString s,s1,s2;
default:
jj_la1[4] = jj_gen;
goto end_label_1;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = element_association();
}
if (!hasError) {
+
s+=","+s1;
}
+
}
end_label_1: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return "("+s+")";
assert(false);
}
-QCString VhdlParser::alias_declaration() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::alias_declaration() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(ALIAS_T);
}
if (!hasError) {
+
s2 = alias_designator();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COLON_T:{
- if (!hasError) {
+ case COLON_T:{if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
s+=s1;
}
+
break;
}
default:
@@ -272,26 +315,33 @@ s+=s1;
}
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
s+=" is ";
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+=s1;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LBRACKET_T:{
- if (!hasError) {
+ case LBRACKET_T:{if (!hasError) {
+
s1 = signature();
}
if (!hasError) {
+
s+=s1;
}
+
break;
}
default:
@@ -300,8 +350,10 @@ s+=s1;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
addVhdlType(s2.data(),getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
return s2+" "+s+";";
@@ -312,31 +364,37 @@ assert(false);
QCString VhdlParser::alias_designator() {Token *tok=0;QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CHARACTER_LITERAL:{
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
tok = jj_consume_token(CHARACTER_LITERAL);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case STRINGLITERAL:{
- if (!hasError) {
+ case STRINGLITERAL:{if (!hasError) {
+
s = operator_symbol();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -349,22 +407,26 @@ assert(false);
void VhdlParser::allocator() {
- if (jj_2_4(3)) {
- if (!hasError) {
+ if (jj_2_4(3)) {if (!hasError) {
+
jj_consume_token(NEW_T);
}
if (!hasError) {
+
qualified_expression();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case NEW_T:{
- if (!hasError) {
+ case NEW_T:{if (!hasError) {
+
jj_consume_token(NEW_T);
}
if (!hasError) {
+
subtype_indication();
}
+
break;
}
default:
@@ -376,23 +438,28 @@ void VhdlParser::allocator() {
}
-void VhdlParser::architecture_body() {QCString s,s1;
- if (!hasError) {
+void VhdlParser::architecture_body() {QCString s,s1;if (!hasError) {
+
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
QCString t=s1+"::"+s;
genLabels.resize(0);
pushLabel(genLabels,s1);
@@ -400,29 +467,36 @@ QCString t=s1+"::"+s;
addVhdlType(t,getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
if (!hasError) {
- try {
- if (!hasError) {
+
+ try {if (!hasError) {
+
architecture_declarative_part();
}
+
} catch ( ...) {
error_skipto(BEGIN_T);
}
}
if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
architecture_statement_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARCHITECTURE_T:{
- if (!hasError) {
+ case ARCHITECTURE_T:{if (!hasError) {
+
jj_consume_token(ARCHITECTURE_T);
}
+
break;
}
default:
@@ -431,14 +505,16 @@ error_skipto(BEGIN_T);
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -447,14 +523,16 @@ error_skipto(BEGIN_T);
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
lastEntity=0;lastCompound=0; genLabels.resize(0);
}
-void VhdlParser::architecture_declarative_part() {
- if (!hasError) {
+void VhdlParser::architecture_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -481,18 +559,20 @@ void VhdlParser::architecture_declarative_part() {
default:
jj_la1[11] = jj_gen;
goto end_label_2;
- }
- if (!hasError) {
+ }if (!hasError) {
+
block_declarative_item();
}
+
}
end_label_2: ;
}
+
}
-void VhdlParser::architecture_statement_part() {
- if (!hasError) {
+void VhdlParser::architecture_statement_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -512,33 +592,39 @@ void VhdlParser::architecture_statement_part() {
default:
jj_la1[12] = jj_gen;
goto end_label_3;
- }
- if (!hasError) {
+ }if (!hasError) {
+
concurrent_statement();
}
+
}
end_label_3: ;
}
+
}
QCString VhdlParser::array_type_definition() {QCString s;
- if (jj_2_5(2147483647)) {
- if (!hasError) {
+ if (jj_2_5(2147483647)) {if (!hasError) {
+
s = unconstraint_array_definition();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARRAY_T:{
- if (!hasError) {
+ case ARRAY_T:{if (!hasError) {
+
s = constraint_array_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -551,22 +637,26 @@ assert(false);
}
-QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;
- if (!hasError) {
+QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
+
jj_consume_token(ASSERT_T);
}
if (!hasError) {
+
s = condition();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REPORT_T:{
- if (!hasError) {
+ case REPORT_T:{if (!hasError) {
+
t = jj_consume_token(REPORT_T);
}
if (!hasError) {
+
s1 = expression();
}
+
break;
}
default:
@@ -575,14 +665,17 @@ QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SEVERITY_T:{
- if (!hasError) {
+ case SEVERITY_T:{if (!hasError) {
+
t1 = jj_consume_token(SEVERITY_T);
}
if (!hasError) {
+
s2 = expression();
}
+
break;
}
default:
@@ -590,6 +683,7 @@ QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;
;
}
}
+
s.prepend("assert ");
if(t) s1.prepend(" report ");
if(t1) s2.prepend(" report ");
@@ -598,17 +692,19 @@ assert(false);
}
-QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;
- if (!hasError) {
+QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = label();
}
if (!hasError) {
+
t = jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -617,43 +713,51 @@ QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;
}
}
if (!hasError) {
+
s1 = assertion();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(t) s+=":";
return s+s1+";";
assert(false);
}
-QCString VhdlParser::association_element() {QCString s,s1;
- if (!hasError) {
- if (jj_2_6(2147483647)) {
- if (!hasError) {
+QCString VhdlParser::association_element() {QCString s,s1;if (!hasError) {
+
+ if (jj_2_6(2147483647)) {if (!hasError) {
+
s = formal_part();
}
if (!hasError) {
+
jj_consume_token(ARROW_T);
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = actual_part();
}
+
return s+" => "+s1;
assert(false);
}
-QCString VhdlParser::association_list() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::association_list() {QCString s,s1;if (!hasError) {
+
s = association_element();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -663,40 +767,49 @@ QCString VhdlParser::association_list() {QCString s,s1;
default:
jj_la1[17] = jj_gen;
goto end_label_4;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = association_element();
}
if (!hasError) {
+
s+=","+s1;
}
+
}
end_label_4: ;
}
+
return s;
assert(false);
}
-QCString VhdlParser::attribute_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::attribute_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = type_mark();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
return " attribute "+s+":"+s1+";";
assert(false);
@@ -706,22 +819,26 @@ assert(false);
QCString VhdlParser::attribute_designator() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case RANGE_T:{
- if (!hasError) {
+ case RANGE_T:{if (!hasError) {
+
tok = jj_consume_token(RANGE_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -733,34 +850,42 @@ assert(false);
}
-QCString VhdlParser::attribute_name() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::attribute_name() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+="'"+s1;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+"("+s1+")";
}
+
break;
}
default:
@@ -768,33 +893,41 @@ s+"("+s1+")";
;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::attribute_specification() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::attribute_specification() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
+
s = attribute_designator();
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s1 = entity_specification();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
s2 = expression();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCString t= s1+" is "+s2;
addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
return " attribute "+s+" of "+s1+ " is "+s2+";";
@@ -802,70 +935,78 @@ assert(false);
}
-QCString VhdlParser::base() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::base() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(INTEGER);
}
+
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::base_specifier() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::base_specifier() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BASIC_IDENTIFIER);
}
+
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::base_unit_declaration() {QCString s;
- if (!hasError) {
+QCString VhdlParser::base_unit_declaration() {QCString s;if (!hasError) {
+
s = identifier();
}
+
return s;
assert(false);
}
-QCString VhdlParser::based_integer() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::based_integer() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BASIC_IDENTIFIER);
}
+
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::based_literal() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::based_literal() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BASED_LITERAL);
}
+
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::basic_identifier() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::basic_identifier() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BASIC_IDENTIFIER);
}
+
return tok->image.c_str();
assert(false);
}
-void VhdlParser::binding_indication() {
- if (!hasError) {
+void VhdlParser::binding_indication() {if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
jj_consume_token(USE_T);
}
if (!hasError) {
+
entity_aspect();
}
+
break;
}
default:
@@ -874,11 +1015,13 @@ void VhdlParser::binding_indication() {
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
generic_map_aspect();
}
+
break;
}
default:
@@ -887,11 +1030,13 @@ void VhdlParser::binding_indication() {
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
port_map_aspect();
}
+
break;
}
default:
@@ -899,35 +1044,40 @@ void VhdlParser::binding_indication() {
;
}
}
+
}
-QCString VhdlParser::bit_string_literal() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::bit_string_literal() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BIT_STRING_LITERAL);
}
+
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::bit_value() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::bit_value() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(BASIC_IDENTIFIER);
}
+
return tok->image.c_str();
assert(false);
}
-void VhdlParser::block_configuration() {
- if (!hasError) {
+void VhdlParser::block_configuration() {if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
block_specification();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case USE_T:{
@@ -937,14 +1087,16 @@ void VhdlParser::block_configuration() {
default:
jj_la1[23] = jj_gen;
goto end_label_5;
- }
- if (!hasError) {
+ }if (!hasError) {
+
use_clause();
}
+
}
end_label_5: ;
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:{
@@ -954,22 +1106,27 @@ void VhdlParser::block_configuration() {
default:
jj_la1[24] = jj_gen;
goto end_label_6;
- }
- if (!hasError) {
+ }if (!hasError) {
+
configuration_item();
}
+
}
end_label_6: ;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
@@ -978,105 +1135,121 @@ void VhdlParser::block_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
type_declaration();
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
subtype_declaration();
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
constant_declaration();
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
signal_declaration();
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
variable_declaration();
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
file_declaration();
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
alias_declaration();
}
+
break;
}
- case COMPONENT_T:{
- if (!hasError) {
+ case COMPONENT_T:{if (!hasError) {
+
component_declaration();
}
+
break;
}
default:
jj_la1[25] = jj_gen;
- if (jj_2_7(2147483647)) {
- if (!hasError) {
+ if (jj_2_7(2147483647)) {if (!hasError) {
+
attribute_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
configuration_specification();
}
+
break;
}
- case DISCONNECT_T:{
- if (!hasError) {
+ case DISCONNECT_T:{if (!hasError) {
+
disconnection_specification();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
jj_la1[26] = jj_gen;
- if (jj_2_8(3)) {
- if (!hasError) {
+ if (jj_2_8(3)) {if (!hasError) {
+
group_template_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
@@ -1091,8 +1264,8 @@ void VhdlParser::block_declarative_item() {
}
-void VhdlParser::block_declarative_part() {
- if (!hasError) {
+void VhdlParser::block_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -1119,31 +1292,36 @@ void VhdlParser::block_declarative_part() {
default:
jj_la1[28] = jj_gen;
goto end_label_7;
- }
- if (!hasError) {
+ }if (!hasError) {
+
block_declarative_item();
}
+
}
end_label_7: ;
}
+
}
-void VhdlParser::block_header() {
- if (!hasError) {
- if (jj_2_9(2147483647)) {
- if (!hasError) {
+void VhdlParser::block_header() {if (!hasError) {
+
+ if (jj_2_9(2147483647)) {if (!hasError) {
+
generic_clause();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
generic_map_aspect();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -1151,25 +1329,30 @@ void VhdlParser::block_header() {
;
}
}
+
} else {
;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
port_clause();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
port_map_aspect();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -1177,6 +1360,7 @@ void VhdlParser::block_header() {
;
}
}
+
break;
}
default:
@@ -1184,25 +1368,30 @@ void VhdlParser::block_header() {
;
}
}
+
}
-void VhdlParser::block_specification() {
- if (!hasError) {
+void VhdlParser::block_specification() {if (!hasError) {
+
name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
index_specification();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -1210,34 +1399,42 @@ void VhdlParser::block_specification() {
;
}
}
+
}
-void VhdlParser::block_statement() {QCString s;
- if (!hasError) {
+void VhdlParser::block_statement() {QCString s;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
jj_consume_token(BLOCK_T);
}
if (!hasError) {
+
pushLabel(genLabels,s);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -1246,11 +1443,13 @@ pushLabel(genLabels,s);
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
jj_consume_token(IS_T);
}
+
break;
}
default:
@@ -1259,30 +1458,38 @@ pushLabel(genLabels,s);
}
}
if (!hasError) {
+
block_header();
}
if (!hasError) {
+
block_declarative_part();
}
if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
block_statement_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(BLOCK_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -1291,14 +1498,16 @@ pushLabel(genLabels,s);
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
genLabels=popLabel(genLabels);
}
-void VhdlParser::block_statement_part() {
- if (!hasError) {
+void VhdlParser::block_statement_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -1318,27 +1527,31 @@ void VhdlParser::block_statement_part() {
default:
jj_la1[36] = jj_gen;
goto end_label_8;
- }
- if (!hasError) {
+ }if (!hasError) {
+
concurrent_statement();
}
+
}
end_label_8: ;
}
+
}
-void VhdlParser::case_statement() {QCString s;
- if (!hasError) {
+void VhdlParser::case_statement() {QCString s;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -1347,22 +1560,28 @@ void VhdlParser::case_statement() {QCString s;
}
}
if (!hasError) {
+
jj_consume_token(CASE_T);
}
if (!hasError) {
+
s = expression();
}
if (!hasError) {
+
QCString ca="case "+s;
FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
case_statement_alternative();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{
@@ -1372,26 +1591,31 @@ QCString ca="case "+s;
default:
jj_la1[38] = jj_gen;
goto end_label_9;
- }
- if (!hasError) {
+ }if (!hasError) {
+
case_statement_alternative();
}
+
}
end_label_9: ;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(CASE_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -1400,75 +1624,91 @@ QCString ca="case "+s;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
FlowChart::moveToPrevLevel();
FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
}
-void VhdlParser::case_statement_alternative() {QCString s;
- if (!hasError) {
+void VhdlParser::case_statement_alternative() {QCString s;if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
s = choices();
}
if (!hasError) {
+
jj_consume_token(ARROW_T);
}
if (!hasError) {
+
QCString t="when ";
t+=s+"=> ";
FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
}
if (!hasError) {
+
sequence_of_statement();
}
+
FlowChart::moveToPrevLevel();
}
-QCString VhdlParser::character_literal() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::character_literal() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(CHARACTER_LITERAL);
}
+
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::choice() {QCString s;
- if (jj_2_10(2147483647)) {
- if (!hasError) {
+ if (jj_2_10(2147483647)) {if (!hasError) {
+
s = discrete_range();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_11(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_11(2147483647)) {if (!hasError) {
+
s = simple_expression();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_12(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_12(2147483647)) {if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OTHER_T:{
- if (!hasError) {
+ case OTHER_T:{if (!hasError) {
+
jj_consume_token(OTHER_T);
}
if (!hasError) {
+
return " others ";
}
+
break;
}
default:
@@ -1481,11 +1721,12 @@ assert(false);
}
-QCString VhdlParser::choices() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::choices() {QCString s,s1;if (!hasError) {
+
s = choice();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BAR_T:{
@@ -1495,43 +1736,51 @@ QCString VhdlParser::choices() {QCString s,s1;
default:
jj_la1[41] = jj_gen;
goto end_label_10;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(BAR_T);
}
if (!hasError) {
+
s1 = choice();
}
if (!hasError) {
+
s+="|";s+=s1;
}
+
}
end_label_10: ;
}
+
return s;
assert(false);
}
-void VhdlParser::component_configuration() {
- if (!hasError) {
+void VhdlParser::component_configuration() {if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
component_specification();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:
case PORT_T:
case USE_T:
- case SEMI_T:{
- if (!hasError) {
+ case SEMI_T:{if (!hasError) {
+
binding_indication();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -1540,11 +1789,13 @@ void VhdlParser::component_configuration() {
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
block_configuration();
}
+
break;
}
default:
@@ -1553,30 +1804,37 @@ void VhdlParser::component_configuration() {
}
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::component_declaration() {QCString s;
- if (!hasError) {
+void VhdlParser::component_declaration() {QCString s;if (!hasError) {
+
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
jj_consume_token(IS_T);
}
+
break;
}
default:
@@ -1585,14 +1843,17 @@ void VhdlParser::component_declaration() {QCString s;
}
}
if (!hasError) {
+
currP=VhdlDocGen::COMPONENT;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
generic_clause();
}
+
break;
}
default:
@@ -1601,11 +1862,13 @@ currP=VhdlDocGen::COMPONENT;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
port_clause();
}
+
break;
}
default:
@@ -1614,22 +1877,27 @@ currP=VhdlDocGen::COMPONENT;
}
}
if (!hasError) {
+
addVhdlType(s.data(),getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
currP=0;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -1638,22 +1906,27 @@ addVhdlType(s.data(),getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPON
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::component_instantiation_statement() {QCString s,s1;
- if (!hasError) {
+void VhdlParser::component_instantiation_statement() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = instantiation_unit();
}
if (!hasError) {
+
QCString s3;
if (s1.contains("|")) {
s3=VhdlDocGen::getIndexWord(s1.data(),0);
@@ -1663,20 +1936,24 @@ QCString s3;
addCompInst(s.lower().data(),s1.lower().data(),s3.data(),getLine());
}
if (!hasError) {
- if (jj_2_13(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_13(2147483647)) {if (!hasError) {
+
generic_map_aspect();
}
+
} else {
;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
port_map_aspect();
}
+
break;
}
default:
@@ -1685,42 +1962,51 @@ QCString s3;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::component_specification() {
- if (!hasError) {
+void VhdlParser::component_specification() {if (!hasError) {
+
instantiation_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
name();
}
+
}
QCString VhdlParser::composite_type_definition() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARRAY_T:{
- if (!hasError) {
+ case ARRAY_T:{if (!hasError) {
+
s = array_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case RECORD_T:{
- if (!hasError) {
+ case RECORD_T:{if (!hasError) {
+
record_type_definition();
}
if (!hasError) {
+
return s+"#";
}
+
break;
}
default:
@@ -1732,25 +2018,29 @@ assert(false);
}
-void VhdlParser::concurrent_assertion_statement() {
- if (!hasError) {
- if (jj_2_14(2)) {
- if (!hasError) {
+void VhdlParser::concurrent_assertion_statement() {if (!hasError) {
+
+ if (jj_2_14(2)) {if (!hasError) {
+
identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
} else {
;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{
- if (!hasError) {
+ case POSTPONED_T:{if (!hasError) {
+
jj_consume_token(POSTPONED_T);
}
+
break;
}
default:
@@ -1759,33 +2049,40 @@ void VhdlParser::concurrent_assertion_statement() {
}
}
if (!hasError) {
+
assertion();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::concurrent_procedure_call_statement() {
- if (!hasError) {
- if (jj_2_15(2)) {
- if (!hasError) {
+void VhdlParser::concurrent_procedure_call_statement() {if (!hasError) {
+
+ if (jj_2_15(2)) {if (!hasError) {
+
identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
} else {
;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{
- if (!hasError) {
+ case POSTPONED_T:{if (!hasError) {
+
jj_consume_token(POSTPONED_T);
}
+
break;
}
default:
@@ -1794,33 +2091,40 @@ void VhdlParser::concurrent_procedure_call_statement() {
}
}
if (!hasError) {
+
procedure_call();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::concurrent_signal_assignment_statement() {
- if (!hasError) {
- if (jj_2_16(2)) {
- if (!hasError) {
+void VhdlParser::concurrent_signal_assignment_statement() {if (!hasError) {
+
+ if (jj_2_16(2)) {if (!hasError) {
+
identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
} else {
;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{
- if (!hasError) {
+ case POSTPONED_T:{if (!hasError) {
+
jj_consume_token(POSTPONED_T);
}
+
break;
}
default:
@@ -1829,16 +2133,19 @@ void VhdlParser::concurrent_signal_assignment_statement() {
}
}
if (!hasError) {
- if (jj_2_17(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_17(2147483647)) {if (!hasError) {
+
conditional_signal_assignment();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WITH_T:{
- if (!hasError) {
+ case WITH_T:{if (!hasError) {
+
selected_signal_assignment();
}
+
break;
}
default:
@@ -1848,54 +2155,64 @@ void VhdlParser::concurrent_signal_assignment_statement() {
}
}
}
+
}
void VhdlParser::concurrent_statement() {
- if (jj_2_18(2147483647)) {
- if (!hasError) {
+ if (jj_2_18(2147483647)) {if (!hasError) {
+
block_statement();
}
- } else if (jj_2_19(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_19(2147483647)) {if (!hasError) {
+
process_statement();
}
- } else if (jj_2_20(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_20(2147483647)) {if (!hasError) {
+
generate_statement();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CASE_T:{
- if (!hasError) {
+ case CASE_T:{if (!hasError) {
+
case_scheme();
}
+
break;
}
default:
jj_la1[54] = jj_gen;
- if (jj_2_21(2147483647)) {
- if (!hasError) {
+ if (jj_2_21(2147483647)) {if (!hasError) {
+
concurrent_assertion_statement();
}
- } else if (jj_2_22(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_22(2147483647)) {if (!hasError) {
+
concurrent_signal_assignment_statement();
}
- } else if (jj_2_23(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_23(2147483647)) {if (!hasError) {
+
component_instantiation_statement();
}
- } else if (jj_2_24(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_24(2147483647)) {if (!hasError) {
+
concurrent_procedure_call_statement();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VHDL2008TOOLDIR:{
- if (!hasError) {
+ case VHDL2008TOOLDIR:{if (!hasError) {
+
jj_consume_token(VHDL2008TOOLDIR);
}
+
break;
}
default:
@@ -1909,81 +2226,97 @@ void VhdlParser::concurrent_statement() {
}
-QCString VhdlParser::condition() {QCString s;
- if (!hasError) {
+QCString VhdlParser::condition() {QCString s;if (!hasError) {
+
s = expression();
}
+
return s;
assert(false);
}
-QCString VhdlParser::condition_clause() {QCString s;
- if (!hasError) {
+QCString VhdlParser::condition_clause() {QCString s;if (!hasError) {
+
jj_consume_token(UNTIL_T);
}
if (!hasError) {
+
s = condition();
}
+
return " until "+s;
assert(false);
}
-void VhdlParser::conditional_signal_assignment() {
- if (!hasError) {
+void VhdlParser::conditional_signal_assignment() {if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
options();
}
if (!hasError) {
+
conditional_waveforms();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::conditional_waveforms() {
- if (!hasError) {
+void VhdlParser::conditional_waveforms() {if (!hasError) {
+
waveform();
}
if (!hasError) {
+
while (!hasError) {
if (jj_2_25(2147483647)) {
;
} else {
goto end_label_11;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
condition();
}
if (!hasError) {
+
jj_consume_token(ELSE_T);
}
if (!hasError) {
+
waveform();
}
+
}
end_label_11: ;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{
- if (!hasError) {
+ case WHEN_T:{if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
condition();
}
+
break;
}
default:
@@ -1991,44 +2324,55 @@ void VhdlParser::conditional_waveforms() {
;
}
}
+
}
-void VhdlParser::configuration_declaration() {QCString s,s1;
- if (!hasError) {
+void VhdlParser::configuration_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
confName=s+"::"+s1;
addVhdlType(s.data(),getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
}
if (!hasError) {
+
configuration_declarative_part();
}
if (!hasError) {
+
block_configuration();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONFIGURATION_T:{
- if (!hasError) {
+ case CONFIGURATION_T:{if (!hasError) {
+
jj_consume_token(CONFIGURATION_T);
}
+
break;
}
default:
@@ -2037,14 +2381,16 @@ confName=s+"::"+s1;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -2053,30 +2399,35 @@ confName=s+"::"+s1;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
genLabels.resize(0); confName="";
}
void VhdlParser::configuration_declarative_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
@@ -2087,8 +2438,8 @@ void VhdlParser::configuration_declarative_item() {
}
-void VhdlParser::configuration_declarative_part() {
- if (!hasError) {
+void VhdlParser::configuration_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:
@@ -2100,27 +2451,31 @@ void VhdlParser::configuration_declarative_part() {
default:
jj_la1[60] = jj_gen;
goto end_label_12;
- }
- if (!hasError) {
+ }if (!hasError) {
+
configuration_declarative_item();
}
+
}
end_label_12: ;
}
+
}
void VhdlParser::configuration_item() {
- if (jj_2_26(2147483647)) {
- if (!hasError) {
+ if (jj_2_26(2147483647)) {if (!hasError) {
+
component_configuration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
block_configuration();
}
+
break;
}
default:
@@ -2132,44 +2487,54 @@ void VhdlParser::configuration_item() {
}
-void VhdlParser::configuration_specification() {
- if (!hasError) {
+void VhdlParser::configuration_specification() {if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
component_specification();
}
if (!hasError) {
+
binding_indication();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;
- if (!hasError) {
+QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;if (!hasError) {
+
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{
- if (!hasError) {
+ case VARASSIGN_T:{if (!hasError) {
+
t = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
s2 = expression();
}
+
break;
}
default:
@@ -2178,8 +2543,10 @@ QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(t)
s2.prepend(":=");
QCString it=s1+s2;
@@ -2190,26 +2557,30 @@ assert(false);
}
-QCString VhdlParser::constraint_array_definition() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::constraint_array_definition() {QCString s,s1;if (!hasError) {
+
jj_consume_token(ARRAY_T);
}
if (!hasError) {
+
s = index_constraint();
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
+
return s+" "+s1;
assert(false);
}
-void VhdlParser::context_clause() {
- if (!hasError) {
+void VhdlParser::context_clause() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LIBRARY_T:
@@ -2220,31 +2591,37 @@ void VhdlParser::context_clause() {
default:
jj_la1[63] = jj_gen;
goto end_label_13;
- }
- if (!hasError) {
+ }if (!hasError) {
+
context_item();
}
+
}
end_label_13: ;
}
+
}
QCString VhdlParser::constraint() {QCString s;
- if (jj_2_27(2147483647)) {
- if (!hasError) {
+ if (jj_2_27(2147483647)) {if (!hasError) {
+
s = range_constraint();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_28(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_28(2147483647)) {if (!hasError) {
+
s = index_constraint();
}
if (!hasError) {
+
return s;
}
+
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -2255,16 +2632,18 @@ assert(false);
void VhdlParser::context_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LIBRARY_T:{
- if (!hasError) {
+ case LIBRARY_T:{if (!hasError) {
+
library_clause();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
@@ -2275,10 +2654,11 @@ void VhdlParser::context_item() {
}
-QCString VhdlParser::decimal_literal() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::decimal_literal() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(DECIMAL_LITERAL);
}
+
return tok->image.c_str();
assert(false);
}
@@ -2286,29 +2666,34 @@ assert(false);
QCString VhdlParser::delay_mechanism() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TRANSPORT_T:{
- if (!hasError) {
+ case TRANSPORT_T:{if (!hasError) {
+
jj_consume_token(TRANSPORT_T);
}
if (!hasError) {
+
return " transport ";
}
+
break;
}
case INERTIAL_T:
- case REJECT_T:{
- if (!hasError) {
+ case REJECT_T:{if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REJECT_T:{
- if (!hasError) {
+ case REJECT_T:{if (!hasError) {
+
jj_consume_token(REJECT_T);
}
if (!hasError) {
+
s = expression();
}
if (!hasError) {
+
s.prepend(" reject ");
}
+
break;
}
default:
@@ -2317,11 +2702,14 @@ s.prepend(" reject ");
}
}
if (!hasError) {
+
jj_consume_token(INERTIAL_T);
}
if (!hasError) {
+
return s+" inertial ";
}
+
break;
}
default:
@@ -2341,12 +2729,13 @@ void VhdlParser::design_file() {
case ENTITY_T:
case LIBRARY_T:
case PACKAGE_T:
- case USE_T:{
- if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
design_unit();
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
case CONFIGURATION_T:
@@ -2366,14 +2755,17 @@ void VhdlParser::design_file() {
end_label_14: ;
}
if (!hasError) {
+
}
+
break;
}
- case 0:{
- if (!hasError) {
+ case 0:{if (!hasError) {
+
jj_consume_token(0);
}
+
break;
}
default:
@@ -2384,35 +2776,41 @@ void VhdlParser::design_file() {
}
-void VhdlParser::design_unit() {
- if (!hasError) {
+void VhdlParser::design_unit() {if (!hasError) {
+
context_clause();
}
if (!hasError) {
+
library_unit();
}
+
}
QCString VhdlParser::designator() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case STRINGLITERAL:{
- if (!hasError) {
+ case STRINGLITERAL:{if (!hasError) {
+
s = operator_symbol();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -2426,22 +2824,26 @@ assert(false);
QCString VhdlParser::direction() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TO_T:{
- if (!hasError) {
+ case TO_T:{if (!hasError) {
+
tok = jj_consume_token(TO_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case DOWNTO_T:{
- if (!hasError) {
+ case DOWNTO_T:{if (!hasError) {
+
tok = jj_consume_token(DOWNTO_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -2453,53 +2855,65 @@ assert(false);
}
-void VhdlParser::disconnection_specification() {
- if (!hasError) {
+void VhdlParser::disconnection_specification() {if (!hasError) {
+
jj_consume_token(DISCONNECT_T);
}
if (!hasError) {
+
guarded_signal_specificatio();
}
if (!hasError) {
+
jj_consume_token(AFTER_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::guarded_signal_specificatio() {
- if (!hasError) {
+void VhdlParser::guarded_signal_specificatio() {if (!hasError) {
+
signal_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
name();
}
+
}
QCString VhdlParser::discrete_range() {QCString s;
- if (jj_2_29(2147483647)) {
- if (!hasError) {
+ if (jj_2_29(2147483647)) {if (!hasError) {
+
s = range();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_30(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_30(2147483647)) {if (!hasError) {
+
s = subtype_indication();
}
if (!hasError) {
+
return s;
}
+
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -2508,22 +2922,26 @@ assert(false);
}
-QCString VhdlParser::element_association() {QCString s,s1;
- if (!hasError) {
- if (jj_2_31(2147483647)) {
- if (!hasError) {
+QCString VhdlParser::element_association() {QCString s,s1;if (!hasError) {
+
+ if (jj_2_31(2147483647)) {if (!hasError) {
+
s = choices();
}
if (!hasError) {
+
jj_consume_token(ARROW_T);
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = expression();
}
+
if(!s.isEmpty())
return s+"=>"+s1;
return s1;
@@ -2531,19 +2949,23 @@ assert(false);
}
-QCString VhdlParser::element_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::element_declaration() {QCString s,s1;if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
//addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
return s+":"+s1;
@@ -2553,28 +2975,34 @@ assert(false);
QCString VhdlParser::entity_aspect() {Token *tok=0;QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{
- if (!hasError) {
+ case ENTITY_T:{if (!hasError) {
+
tok = jj_consume_token(ENTITY_T);
}
if (!hasError) {
+
s = name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="("+s1+")";
}
+
break;
}
default:
@@ -2583,29 +3011,36 @@ s+="("+s1+")";
}
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONFIGURATION_T:{
- if (!hasError) {
+ case CONFIGURATION_T:{if (!hasError) {
+
tok = jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return tok->image.c_str()+s;
}
+
break;
}
- case OPEN_T:{
- if (!hasError) {
+ case OPEN_T:{if (!hasError) {
+
tok = jj_consume_token(OPEN_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -2619,157 +3054,191 @@ assert(false);
QCString VhdlParser::entity_class() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{
- if (!hasError) {
+ case ENTITY_T:{if (!hasError) {
+
jj_consume_token(ENTITY_T);
}
if (!hasError) {
+
return "entity";
}
+
break;
}
- case ARCHITECTURE_T:{
- if (!hasError) {
+ case ARCHITECTURE_T:{if (!hasError) {
+
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
+
return "architecture";
}
+
break;
}
- case CONFIGURATION_T:{
- if (!hasError) {
+ case CONFIGURATION_T:{if (!hasError) {
+
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
+
return "configuration";
}
+
break;
}
- case PROCEDURE_T:{
- if (!hasError) {
+ case PROCEDURE_T:{if (!hasError) {
+
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
+
return "procedure";
}
+
break;
}
- case FUNCTION_T:{
- if (!hasError) {
+ case FUNCTION_T:{if (!hasError) {
+
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
+
return "function";
}
+
break;
}
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
return "package";
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
jj_consume_token(TYPE_T);
}
if (!hasError) {
+
return "type";
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
+
return "subtype";
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
+
return "constant";
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
+
return "signal";
}
+
break;
}
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
+
return "variable";
}
+
break;
}
- case COMPONENT_T:{
- if (!hasError) {
+ case COMPONENT_T:{if (!hasError) {
+
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
+
return "component";
}
+
break;
}
- case LABEL_T:{
- if (!hasError) {
+ case LABEL_T:{if (!hasError) {
+
jj_consume_token(LABEL_T);
}
if (!hasError) {
+
return "label";
}
+
break;
}
- case LITERAL_T:{
- if (!hasError) {
+ case LITERAL_T:{if (!hasError) {
+
jj_consume_token(LITERAL_T);
}
if (!hasError) {
+
return "literal";
}
+
break;
}
- case UNITS_T:{
- if (!hasError) {
+ case UNITS_T:{if (!hasError) {
+
jj_consume_token(UNITS_T);
}
if (!hasError) {
+
return "units";
}
+
break;
}
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
jj_consume_token(GROUP_T);
}
if (!hasError) {
+
return "group";
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
jj_consume_token(FILE_T);
}
if (!hasError) {
+
return "file";
}
+
break;
}
default:
@@ -2781,19 +3250,22 @@ assert(false);
}
-QCString VhdlParser::entity_class_entry() {QCString s;
- if (!hasError) {
+QCString VhdlParser::entity_class_entry() {QCString s;if (!hasError) {
+
s = entity_class();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BOX_T:{
- if (!hasError) {
+ case BOX_T:{if (!hasError) {
+
jj_consume_token(BOX_T);
}
if (!hasError) {
+
s+="<>";
}
+
break;
}
default:
@@ -2801,21 +3273,25 @@ s+="<>";
;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::entity_class_entry_list() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::entity_class_entry_list() {QCString s,s1,s2;if (!hasError) {
if (!hasError) {
+
s1 = entity_class_entry();
}
if (!hasError) {
+
s+=s1;
}
+
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -2825,54 +3301,66 @@ s+=s1;
default:
jj_la1[75] = jj_gen;
goto end_label_15;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s = entity_class_entry();
}
if (!hasError) {
+
s2+=",";s2+=s;
}
+
}
end_label_15: ;
}
+
return s1+s2;
assert(false);
}
-void VhdlParser::entity_declaration() {QCString s;
- if (!hasError) {
+void VhdlParser::entity_declaration() {QCString s;if (!hasError) {
+
jj_consume_token(ENTITY_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
lastEntity=current.get();
lastCompound=0;
addVhdlType(s.data(),getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
}
if (!hasError) {
+
entity_header();
}
if (!hasError) {
+
entity_declarative_part();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BEGIN_T:{
- if (!hasError) {
+ case BEGIN_T:{if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
entity_statement_part();
}
+
break;
}
default:
@@ -2881,14 +3369,17 @@ lastEntity=current.get();
}
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{
- if (!hasError) {
+ case ENTITY_T:{if (!hasError) {
+
jj_consume_token(ENTITY_T);
}
+
break;
}
default:
@@ -2897,14 +3388,16 @@ lastEntity=current.get();
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -2913,8 +3406,10 @@ lastEntity=current.get();
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
lastEntity=0;lastCompound=0; genLabels.resize(0);
}
@@ -2924,113 +3419,130 @@ void VhdlParser::entity_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
type_declaration();
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
subtype_declaration();
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
constant_declaration();
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
signal_declaration();
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
variable_declaration();
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
file_declaration();
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
alias_declaration();
}
+
break;
}
default:
jj_la1[79] = jj_gen;
- if (jj_2_32(2147483647)) {
- if (!hasError) {
+ if (jj_2_32(2147483647)) {if (!hasError) {
+
attribute_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case DISCONNECT_T:{
- if (!hasError) {
+ case DISCONNECT_T:{if (!hasError) {
+
disconnection_specification();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
jj_la1[80] = jj_gen;
- if (jj_2_33(3)) {
- if (!hasError) {
+ if (jj_2_33(3)) {if (!hasError) {
+
group_template_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
jj_la1[81] = jj_gen;
- if (jj_2_34(5)) {
- if (!hasError) {
+ if (jj_2_34(5)) {if (!hasError) {
+
package_instantiation_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
package_declaration();
}
+
break;
}
- case VHDL2008TOOLDIR:{
- if (!hasError) {
+ case VHDL2008TOOLDIR:{if (!hasError) {
+
jj_consume_token(VHDL2008TOOLDIR);
}
+
break;
}
default:
@@ -3047,8 +3559,8 @@ void VhdlParser::entity_declarative_item() {
}
-void VhdlParser::entity_declarative_part() {
- if (!hasError) {
+void VhdlParser::entity_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -3075,26 +3587,30 @@ void VhdlParser::entity_declarative_part() {
default:
jj_la1[83] = jj_gen;
goto end_label_16;
- }
- if (!hasError) {
+ }if (!hasError) {
+
entity_declarative_item();
}
+
}
end_label_16: ;
}
+
}
-QCString VhdlParser::entity_designator() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::entity_designator() {QCString s,s1;if (!hasError) {
+
s = entity_tag();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LBRACKET_T:{
- if (!hasError) {
+ case LBRACKET_T:{if (!hasError) {
+
s1 = signature();
}
+
break;
}
default:
@@ -3102,21 +3618,24 @@ QCString VhdlParser::entity_designator() {QCString s,s1;
;
}
}
+
return s+s1;
assert(false);
}
-void VhdlParser::entity_header() {
- if (!hasError) {
+void VhdlParser::entity_header() {if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC;
}
if (!hasError) {
+
generic_clause();
}
+
break;
}
default:
@@ -3125,14 +3644,17 @@ currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{
- if (!hasError) {
+ case PORT_T:{if (!hasError) {
+
currP=VhdlDocGen::PORT;
}
if (!hasError) {
+
port_clause();
}
+
break;
}
default:
@@ -3140,6 +3662,7 @@ currP=VhdlDocGen::PORT;
;
}
}
+
}
@@ -3149,15 +3672,17 @@ QCString VhdlParser::entity_name_list() {QCString s,s1;
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
- case CHARACTER_LITERAL:{
- if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
s1 = entity_designator();
}
if (!hasError) {
+
s+=s1;
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
@@ -3175,26 +3700,32 @@ s+=s1;
end_label_17: ;
}
if (!hasError) {
+
return s;
}
+
break;
}
- case OTHER_T:{
- if (!hasError) {
+ case OTHER_T:{if (!hasError) {
+
jj_consume_token(OTHER_T);
}
if (!hasError) {
+
return "other";
}
+
break;
}
- case ALL_T:{
- if (!hasError) {
+ case ALL_T:{if (!hasError) {
+
jj_consume_token(ALL_T);
}
if (!hasError) {
+
return "all";
}
+
break;
}
default:
@@ -3206,40 +3737,46 @@ assert(false);
}
-QCString VhdlParser::entity_specification() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::entity_specification() {QCString s,s1;if (!hasError) {
+
s = entity_name_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = entity_class();
}
+
return s+":"+s1;
assert(false);
}
void VhdlParser::entity_statement() {
- if (jj_2_35(2147483647)) {
- if (!hasError) {
+ if (jj_2_35(2147483647)) {if (!hasError) {
+
concurrent_assertion_statement();
}
- } else if (jj_2_36(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_36(2147483647)) {if (!hasError) {
+
process_statement();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
concurrent_procedure_call_statement();
}
+
break;
}
default:
@@ -3251,8 +3788,8 @@ void VhdlParser::entity_statement() {
}
-void VhdlParser::entity_statement_part() {
- if (!hasError) {
+void VhdlParser::entity_statement_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -3268,13 +3805,15 @@ void VhdlParser::entity_statement_part() {
default:
jj_la1[90] = jj_gen;
goto end_label_18;
- }
- if (!hasError) {
+ }if (!hasError) {
+
entity_statement();
}
+
}
end_label_18: ;
}
+
}
@@ -3283,22 +3822,26 @@ QCString VhdlParser::entity_tag() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CHARACTER_LITERAL:{
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
s = character_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -3313,22 +3856,26 @@ assert(false);
QCString VhdlParser::enumeration_literal() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CHARACTER_LITERAL:{
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
s = character_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -3340,14 +3887,16 @@ assert(false);
}
-QCString VhdlParser::enumeration_type_definition() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::enumeration_type_definition() {QCString s,s1;if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s = enumeration_literal();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -3357,38 +3906,45 @@ QCString VhdlParser::enumeration_type_definition() {QCString s,s1;
default:
jj_la1[93] = jj_gen;
goto end_label_19;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = enumeration_literal();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_19: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return "("+s+")";
assert(false);
}
-QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
- if (!hasError) {
+QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
t = jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -3397,15 +3953,18 @@ QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
jj_consume_token(EXIT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s1 = identifier();
}
+
break;
}
default:
@@ -3414,14 +3973,17 @@ QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{
- if (!hasError) {
+ case WHEN_T:{if (!hasError) {
+
t1 = jj_consume_token(WHEN_T);
}
if (!hasError) {
+
s2 = condition();
}
+
break;
}
default:
@@ -3430,8 +3992,10 @@ QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
@@ -3442,11 +4006,12 @@ assert(false);
}
-QCString VhdlParser::expression() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::expression() {QCString s,s1,s2;if (!hasError) {
+
s = relation();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case AND_T:
@@ -3461,19 +4026,23 @@ QCString VhdlParser::expression() {QCString s,s1,s2;
default:
jj_la1[97] = jj_gen;
goto end_label_20;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = logop();
}
if (!hasError) {
+
s2 = relation();
}
if (!hasError) {
+
s+=s1;s+=s2;
}
+
}
end_label_20: ;
}
+
return s;
assert(false);
}
@@ -3481,58 +4050,70 @@ assert(false);
QCString VhdlParser::logop() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case AND_T:{
- if (!hasError) {
+ case AND_T:{if (!hasError) {
+
jj_consume_token(AND_T);
}
if (!hasError) {
+
return "and" ;
}
+
break;
}
- case NAND_T:{
- if (!hasError) {
+ case NAND_T:{if (!hasError) {
+
jj_consume_token(NAND_T);
}
if (!hasError) {
+
return "nand" ;
}
+
break;
}
- case NOR_T:{
- if (!hasError) {
+ case NOR_T:{if (!hasError) {
+
jj_consume_token(NOR_T);
}
if (!hasError) {
+
return "nor" ;
}
+
break;
}
- case XNOR_T:{
- if (!hasError) {
+ case XNOR_T:{if (!hasError) {
+
jj_consume_token(XNOR_T);
}
if (!hasError) {
+
return "xnor" ;
}
+
break;
}
- case XOR_T:{
- if (!hasError) {
+ case XOR_T:{if (!hasError) {
+
jj_consume_token(XOR_T);
}
if (!hasError) {
+
return "xor" ;
}
+
break;
}
- case OR_T:{
- if (!hasError) {
+ case OR_T:{if (!hasError) {
+
jj_consume_token(OR_T);
}
if (!hasError) {
+
return "or" ;
}
+
break;
}
default:
@@ -3544,10 +4125,11 @@ assert(false);
}
-QCString VhdlParser::extended_identifier() {Token *t;
- if (!hasError) {
+QCString VhdlParser::extended_identifier() {Token *t;if (!hasError) {
+
t = jj_consume_token(EXTENDED_CHARACTER);
}
+
return t->image.c_str();
assert(false);
}
@@ -3566,22 +4148,26 @@ QCString VhdlParser::factor() {QCString s,s1;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{
- if (!hasError) {
+ case BIT_STRING_LITERAL:{if (!hasError) {
+
s = primary();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOUBLEMULT_T:{
- if (!hasError) {
+ case DOUBLEMULT_T:{if (!hasError) {
+
jj_consume_token(DOUBLEMULT_T);
}
if (!hasError) {
+
s1 = primary();
}
if (!hasError) {
+
s+="**";s+=s1;
}
+
break;
}
default:
@@ -3590,32 +4176,40 @@ s+="**";s+=s1;
}
}
if (!hasError) {
+
return s;
}
+
break;
}
- case ABS_T:{
- if (!hasError) {
+ case ABS_T:{if (!hasError) {
+
jj_consume_token(ABS_T);
}
if (!hasError) {
+
s = primary();
}
if (!hasError) {
+
s1 = "abs "; return s1+s;
}
+
break;
}
- case NOT_T:{
- if (!hasError) {
+ case NOT_T:{if (!hasError) {
+
jj_consume_token(NOT_T);
}
if (!hasError) {
+
s = primary();
}
if (!hasError) {
+
s1="not ";return s1+s;
}
+
break;
}
default:
@@ -3627,26 +4221,31 @@ assert(false);
}
-QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;
- if (!hasError) {
+QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;if (!hasError) {
+
jj_consume_token(FILE_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s2 = subtype_indication();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IS_T:
- case OPEN_T:{
- if (!hasError) {
+ case OPEN_T:{if (!hasError) {
+
s3 = file_open_information();
}
+
break;
}
default:
@@ -3655,8 +4254,10 @@ QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCString t1=s2+" "+s3;
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
return " file "+s+":"+s2+" "+s3+";";
@@ -3664,25 +4265,28 @@ assert(false);
}
-QCString VhdlParser::file_logical_name() {QCString s;
- if (!hasError) {
+QCString VhdlParser::file_logical_name() {QCString s;if (!hasError) {
+
s = expression();
}
+
return s;
assert(false);
}
-QCString VhdlParser::file_open_information() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::file_open_information() {QCString s,s1,s2;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OPEN_T:{
- if (!hasError) {
+ case OPEN_T:{if (!hasError) {
+
jj_consume_token(OPEN_T);
}
if (!hasError) {
+
s = expression();
}
+
break;
}
default:
@@ -3691,35 +4295,42 @@ QCString VhdlParser::file_open_information() {QCString s,s1,s2;
}
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
s1 = file_logical_name();
}
+
s2="open "+s+" is "+s1; return s2;
assert(false);
}
-QCString VhdlParser::file_type_definition() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::file_type_definition() {QCString s,s1;if (!hasError) {
+
jj_consume_token(FILE_T);
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s = type_mark();
}
+
s1=" file of "+s; return s1;
assert(false);
}
-QCString VhdlParser::floating_type_definition() {QCString s;
- if (!hasError) {
+QCString VhdlParser::floating_type_definition() {QCString s;if (!hasError) {
+
s = range_constraint();
}
+
return s;
assert(false);
}
@@ -3730,22 +4341,26 @@ QCString VhdlParser::formal_designator() {QCString s;Token *tok=0;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case INTEGER:{
- if (!hasError) {
+ case INTEGER:{if (!hasError) {
+
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -3757,34 +4372,40 @@ assert(false);
}
-QCString VhdlParser::formal_parameter_list() {QCString s;
- if (!hasError) {
+QCString VhdlParser::formal_parameter_list() {QCString s;if (!hasError) {
+
s = interface_list();
}
+
return s;
assert(false);
}
-QCString VhdlParser::formal_part() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::formal_part() {QCString s,s1;if (!hasError) {
+
s = name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
formal_designator();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+"("+s1+")";
}
+
break;
}
default:
@@ -3792,37 +4413,45 @@ s+"("+s1+")";
;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::full_type_declaration() {Entry *tmpEntry;QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::full_type_declaration() {Entry *tmpEntry;QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(TYPE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
tmpEntry=current.get();
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
}
if (!hasError) {
- try {
- if (!hasError) {
+
+ try {if (!hasError) {
+
s2 = type_definition();
}
+
} catch ( ...) {
error_skipto(SEMI_T);
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if (s2.contains("#")) {
VhdlDocGen::deleteAllChars(s2,'#');
tmpEntry->spec=VhdlDocGen::RECORD;
@@ -3846,62 +4475,76 @@ assert(false);
}
-QCString VhdlParser::function_call() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::function_call() {QCString s,s1;if (!hasError) {
+
s = name();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = actual_parameter_part();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return s+"("+s1+")";
assert(false);
}
-void VhdlParser::generate_statement() {QCString s;
- if (!hasError) {
+void VhdlParser::generate_statement() {QCString s;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
- try {
- if (!hasError) {
+
+ try {if (!hasError) {
+
generate_scheme();
}
if (!hasError) {
+
jj_consume_token(GENERATE_T);
}
if (!hasError) {
+
pushLabel(genLabels,s);
}
if (!hasError) {
+
generate_statement_body1();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
+
} catch ( ...) {
error_skipto(GENERATE_T);
}
}
if (!hasError) {
+
jj_consume_token(GENERATE_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -3910,30 +4553,36 @@ error_skipto(GENERATE_T);
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
genLabels=popLabel(genLabels);
}
void VhdlParser::generate_scheme() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
parameter_specification();
}
+
break;
}
- case IF_T:{
- if (!hasError) {
+ case IF_T:{if (!hasError) {
+
jj_consume_token(IF_T);
}
if (!hasError) {
+
condition();
}
+
break;
}
default:
@@ -3944,54 +4593,66 @@ void VhdlParser::generate_scheme() {
}
-void VhdlParser::generic_clause() {QCString s;
- if (!hasError) {
+void VhdlParser::generic_clause() {QCString s;if (!hasError) {
+
jj_consume_token(GENERIC_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
parse_sec=GEN_SEC;
}
if (!hasError) {
+
s = generic_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
parse_sec=0;
}
-QCString VhdlParser::generic_list() {QCString s;
- if (!hasError) {
+QCString VhdlParser::generic_list() {QCString s;if (!hasError) {
+
s = interface_list();
}
+
return s;
assert(false);
}
-void VhdlParser::generic_map_aspect() {
- if (!hasError) {
+void VhdlParser::generic_map_aspect() {if (!hasError) {
+
jj_consume_token(GENERIC_T);
}
if (!hasError) {
+
jj_consume_token(MAP_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
association_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
}
@@ -4000,22 +4661,26 @@ QCString VhdlParser::group_constituent() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CHARACTER_LITERAL:{
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
s = character_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -4027,13 +4692,15 @@ assert(false);
}
-QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;if (!hasError) {
if (!hasError) {
+
s1 = group_constituent();
}
+
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -4043,112 +4710,138 @@ QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;
default:
jj_la1[108] = jj_gen;
goto end_label_21;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s = group_constituent();
}
if (!hasError) {
+
s2+=",";s2+=s1;
}
+
}
end_label_21: ;
}
+
return s+s2;
assert(false);
}
-QCString VhdlParser::group_declaration() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::group_declaration() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(GROUP_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s2 = group_constituent_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return "group "+s+":"+s1+"("+s2+");";
assert(false);
}
-QCString VhdlParser::group_template_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::group_template_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(GROUP_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = entity_class_entry_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return "group "+s+ "is ("+s1+");";
assert(false);
}
-void VhdlParser::guarded_signal_specification() {
- if (!hasError) {
+void VhdlParser::guarded_signal_specification() {if (!hasError) {
+
signal_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
type_mark();
}
+
}
QCString VhdlParser::identifier() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
tok = jj_consume_token(EXTENDED_CHARACTER);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case BASIC_IDENTIFIER:{
- if (!hasError) {
+ case BASIC_IDENTIFIER:{if (!hasError) {
+
tok = jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -4160,11 +4853,12 @@ assert(false);
}
-QCString VhdlParser::identifier_list() {QCString str,str1;
- if (!hasError) {
+QCString VhdlParser::identifier_list() {QCString str,str1;if (!hasError) {
+
str = identifier();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -4174,35 +4868,41 @@ QCString VhdlParser::identifier_list() {QCString str,str1;
default:
jj_la1[110] = jj_gen;
goto end_label_22;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
str1 = identifier();
}
if (!hasError) {
+
str+=",";str+=str1;
}
+
}
end_label_22: ;
}
+
return str;
assert(false);
}
-void VhdlParser::if_statement() {QCString s,s1;
- if (!hasError) {
+void VhdlParser::if_statement() {QCString s,s1;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -4211,22 +4911,28 @@ void VhdlParser::if_statement() {QCString s,s1;
}
}
if (!hasError) {
+
jj_consume_token(IF_T);
}
if (!hasError) {
+
s = condition();
}
if (!hasError) {
+
jj_consume_token(THEN_T);
}
if (!hasError) {
+
s.prepend("if ");
FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
}
if (!hasError) {
+
sequence_of_statement();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ELSIF_T:{
@@ -4236,38 +4942,47 @@ s.prepend("if ");
default:
jj_la1[112] = jj_gen;
goto end_label_23;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(ELSIF_T);
}
if (!hasError) {
+
s1 = condition();
}
if (!hasError) {
+
jj_consume_token(THEN_T);
}
if (!hasError) {
+
s1.prepend("elsif ");
FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
}
if (!hasError) {
+
sequence_of_statement();
}
+
}
end_label_23: ;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ELSE_T:{
- if (!hasError) {
+ case ELSE_T:{if (!hasError) {
+
jj_consume_token(ELSE_T);
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
}
if (!hasError) {
+
sequence_of_statement();
}
+
break;
}
default:
@@ -4276,18 +4991,22 @@ FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
}
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(IF_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -4296,39 +5015,47 @@ FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
FlowChart::moveToPrevLevel();
FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
}
-QCString VhdlParser::incomplete_type_declaration() {QCString s;
- if (!hasError) {
+QCString VhdlParser::incomplete_type_declaration() {QCString s;if (!hasError) {
+
jj_consume_token(TYPE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return "type "+s+";";
assert(false);
}
-QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;
- if (!hasError) {
+QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s2 = discrete_range();
}
if (!hasError) {
+
s+=s2;
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -4338,35 +5065,42 @@ s+=s2;
default:
jj_la1[115] = jj_gen;
goto end_label_24;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = discrete_range();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_24: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return s+")";
assert(false);
}
QCString VhdlParser::index_specification() {QCString s;
- if (jj_2_37(2147483647)) {
- if (!hasError) {
+ if (jj_2_37(2147483647)) {if (!hasError) {
+
s = discrete_range();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
@@ -4384,13 +5118,15 @@ return s;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{
- if (!hasError) {
+ case BIT_STRING_LITERAL:{if (!hasError) {
+
s = expression();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -4403,16 +5139,19 @@ assert(false);
}
-QCString VhdlParser::index_subtype_definition() {QCString s;
- if (!hasError) {
+QCString VhdlParser::index_subtype_definition() {QCString s;if (!hasError) {
+
s = type_mark();
}
if (!hasError) {
+
jj_consume_token(RANGE_T);
}
if (!hasError) {
+
jj_consume_token(BOX_T);
}
+
return s+" range <> ";
assert(false);
}
@@ -4422,13 +5161,14 @@ QCString VhdlParser::instantiation_unit() {QCString s,s1,s2;Token *tok;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMPONENT_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMPONENT_T:{
- if (!hasError) {
+ case COMPONENT_T:{if (!hasError) {
+
jj_consume_token(COMPONENT_T);
}
+
break;
}
default:
@@ -4437,50 +5177,63 @@ QCString VhdlParser::instantiation_unit() {QCString s,s1,s2;Token *tok;
}
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
s1="component "; return s;
}
+
break;
}
- case ENTITY_T:{
- if (!hasError) {
+ case ENTITY_T:{if (!hasError) {
+
jj_consume_token(ENTITY_T);
}
if (!hasError) {
- if (jj_2_38(2)) {
- if (!hasError) {
+
+ if (jj_2_38(2)) {if (!hasError) {
+
jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
+
jj_consume_token(DOT_T);
}
+
} else {
;
}
}
if (!hasError) {
+
s2 = name();
}
if (!hasError) {
+
s="entity|"+s2;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="(";s+=s1;s+=")" ;
}
+
break;
}
default:
@@ -4489,20 +5242,25 @@ s+="(";s+=s1;s+=")" ;
}
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONFIGURATION_T:{
- if (!hasError) {
+ case CONFIGURATION_T:{if (!hasError) {
+
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
+
s = name();
}
if (!hasError) {
+
s1="configuration ";return s;
}
+
break;
}
default:
@@ -4517,31 +5275,37 @@ assert(false);
QCString VhdlParser::instantiation_list() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case OTHER_T:{
- if (!hasError) {
+ case OTHER_T:{if (!hasError) {
+
tok = jj_consume_token(OTHER_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case ALL_T:{
- if (!hasError) {
+ case ALL_T:{if (!hasError) {
+
tok = jj_consume_token(ALL_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -4553,66 +5317,78 @@ assert(false);
}
-QCString VhdlParser::integer() {Token *t;
- if (!hasError) {
+QCString VhdlParser::integer() {Token *t;if (!hasError) {
+
t = jj_consume_token(INTEGER);
}
+
return t->image.c_str();
assert(false);
}
-QCString VhdlParser::integer_type_definition() {QCString s;
- if (!hasError) {
+QCString VhdlParser::integer_type_definition() {QCString s;if (!hasError) {
+
s = range_constraint();
}
+
return s;
assert(false);
}
QCString VhdlParser::interface_declaration() {QCString s,s1;
- if (jj_2_39(5)) {
- if (!hasError) {
+ if (jj_2_39(5)) {if (!hasError) {
+
s = interface_subprogram_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
interface_package_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[121] = jj_gen;
- if (jj_2_40(5)) {
- if (!hasError) {
+ if (jj_2_40(5)) {if (!hasError) {
+
s = interface_variable_declaration();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_41(5)) {
- if (!hasError) {
+
+ } else if (jj_2_41(5)) {if (!hasError) {
+
interface_file_declaration();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_42(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_42(2147483647)) {if (!hasError) {
+
subprogram_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONSTANT_T:
@@ -4620,19 +5396,22 @@ return s;
case SIGNAL_T:
case SHARED_T:
case TYPE_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
s = object_class();
}
if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
if (parse_sec==GEN_SEC)
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,s1.data(),0,Public);
return s;
}
+
break;
}
default:
@@ -4647,39 +5426,45 @@ assert(false);
}
-QCString VhdlParser::interface_element() {QCString s;
- if (!hasError) {
+QCString VhdlParser::interface_element() {QCString s;if (!hasError) {
+
s = interface_declaration();
}
+
return s;
assert(false);
}
-QCString VhdlParser::interface_file_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::interface_file_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(FILE_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
+
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
return " file "+s+":"+s1;
assert(false);
}
-QCString VhdlParser::interface_list() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::interface_list() {QCString s,s1,s2;if (!hasError) {
+
s = interface_element();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SEMI_T:{
@@ -4689,55 +5474,63 @@ QCString VhdlParser::interface_list() {QCString s,s1,s2;
default:
jj_la1[123] = jj_gen;
goto end_label_25;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(SEMI_T);
}
if (!hasError) {
+
s1 = interface_element();
}
if (!hasError) {
+
s2+=";";s2+=s1;
}
+
}
end_label_25: ;
}
+
return s+s2;
assert(false);
}
-QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;
- if (!hasError) {
+QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONSTANT_T:
case SIGNAL_T:
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
tok = jj_consume_token(VARIABLE_T);
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
tok = jj_consume_token(SIGNAL_T);
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
tok = jj_consume_token(CONSTANT_T);
}
+
break;
}
- case SHARED_T:{
- if (!hasError) {
+ case SHARED_T:{if (!hasError) {
+
tok = jj_consume_token(SHARED_T);
}
+
break;
}
default:
@@ -4746,6 +5539,7 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
break;
}
default:
@@ -4754,21 +5548,25 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
}
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BUFFER_T:
case IN_T:
case INOUT_T:
case LINKAGE_T:
- case OUT_T:{
- if (!hasError) {
+ case OUT_T:{if (!hasError) {
+
s1 = mode();
}
+
break;
}
default:
@@ -4777,14 +5575,17 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
}
}
if (!hasError) {
+
s2 = subtype_indication();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BUS_T:{
- if (!hasError) {
+ case BUS_T:{if (!hasError) {
+
tok1 = jj_consume_token(BUS_T);
}
+
break;
}
default:
@@ -4793,14 +5594,17 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{
- if (!hasError) {
+ case VARASSIGN_T:{if (!hasError) {
+
tok2 = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
s4 = expression();
}
+
break;
}
default:
@@ -4808,6 +5612,7 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
;
}
}
+
if(tok)
s5=tok->image.c_str();
@@ -4841,34 +5646,40 @@ assert(false);
QCString VhdlParser::iteration_scheme() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHILE_T:{
- if (!hasError) {
+ case WHILE_T:{if (!hasError) {
+
jj_consume_token(WHILE_T);
}
if (!hasError) {
+
s = condition();
}
if (!hasError) {
+
s.prepend("while ");
FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),lab.data());
lab="";
return s;
}
+
break;
}
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
s = parameter_specification();
}
if (!hasError) {
+
QCString q=lab+" for "+s;
FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),lab.data());
lab="";
return q;
}
+
break;
}
default:
@@ -4880,27 +5691,32 @@ assert(false);
}
-QCString VhdlParser::label() {QCString s;
- if (!hasError) {
+QCString VhdlParser::label() {QCString s;if (!hasError) {
+
s = identifier();
}
+
return s;
assert(false);
}
-QCString VhdlParser::library_clause() {QCString s;
- if (!hasError) {
+QCString VhdlParser::library_clause() {QCString s;if (!hasError) {
if (!hasError) {
+
jj_consume_token(LIBRARY_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
+
if ( parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
{
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,s.data(),"_library_",Public);
@@ -4912,29 +5728,34 @@ assert(false);
QCString VhdlParser::library_unit() {QCString s;
- if (jj_2_43(2)) {
- if (!hasError) {
+ if (jj_2_43(2)) {if (!hasError) {
+
primary_unit();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
secondary_unit();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONTEXT_T:{
- if (!hasError) {
+ case CONTEXT_T:{if (!hasError) {
+
context_declaration();
}
+
break;
}
default:
@@ -4948,45 +5769,55 @@ assert(false);
QCString VhdlParser::literal() {QCString s;
- if (jj_2_44(2147483647)) {
- if (!hasError) {
+ if (jj_2_44(2147483647)) {if (!hasError) {
+
s = bit_string_literal();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_45(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_45(2147483647)) {if (!hasError) {
+
s = numeric_literal();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_46(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_46(2147483647)) {if (!hasError) {
+
s = enumeration_literal();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case STRINGLITERAL:{
- if (!hasError) {
+ case STRINGLITERAL:{if (!hasError) {
+
s = string_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case NULL_T:{
- if (!hasError) {
+ case NULL_T:{if (!hasError) {
+
jj_consume_token(NULL_T);
}
if (!hasError) {
+
return "null";
}
+
break;
}
default:
@@ -4999,29 +5830,33 @@ assert(false);
}
-QCString VhdlParser::logical_operator() {QCString s;
- if (!hasError) {
+QCString VhdlParser::logical_operator() {QCString s;if (!hasError) {
+
s = logop();
}
+
return s;
assert(false);
}
-QCString VhdlParser::loop_statement() {QCString s,s1,s2,s3;
- if (!hasError) {
+QCString VhdlParser::loop_statement() {QCString s,s1,s2,s3;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
break;
}
default:
@@ -5030,12 +5865,14 @@ s+=":";
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:
- case WHILE_T:{
- if (!hasError) {
+ case WHILE_T:{if (!hasError) {
+
s1 = iteration_scheme();
}
+
break;
}
default:
@@ -5044,28 +5881,35 @@ s+=":";
}
}
if (!hasError) {
+
if(s1.isEmpty())
FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
}
if (!hasError) {
+
jj_consume_token(LOOP_T);
}
if (!hasError) {
+
s2 = sequence_of_statement();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(LOOP_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s3 = identifier();
}
+
break;
}
default:
@@ -5074,8 +5918,10 @@ if(s1.isEmpty())
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
@@ -5087,31 +5933,37 @@ assert(false);
QCString VhdlParser::miscellaneous_operator() {Token *t=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOUBLEMULT_T:{
- if (!hasError) {
+ case DOUBLEMULT_T:{if (!hasError) {
+
jj_consume_token(DOUBLEMULT_T);
}
if (!hasError) {
+
return "**";
}
+
break;
}
- case ABS_T:{
- if (!hasError) {
+ case ABS_T:{if (!hasError) {
+
jj_consume_token(ABS_T);
}
if (!hasError) {
+
return "abs";
}
+
break;
}
- case NOT_T:{
- if (!hasError) {
+ case NOT_T:{if (!hasError) {
+
jj_consume_token(NOT_T);
}
if (!hasError) {
+
return "not";
}
+
break;
}
default:
@@ -5125,49 +5977,59 @@ assert(false);
QCString VhdlParser::mode() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IN_T:{
- if (!hasError) {
+ case IN_T:{if (!hasError) {
+
tok = jj_consume_token(IN_T);
}
if (!hasError) {
+
return "in";
}
+
break;
}
- case OUT_T:{
- if (!hasError) {
+ case OUT_T:{if (!hasError) {
+
tok = jj_consume_token(OUT_T);
}
if (!hasError) {
+
return "out";
}
+
break;
}
- case INOUT_T:{
- if (!hasError) {
+ case INOUT_T:{if (!hasError) {
+
tok = jj_consume_token(INOUT_T);
}
if (!hasError) {
+
return "inout";
}
+
break;
}
- case BUFFER_T:{
- if (!hasError) {
+ case BUFFER_T:{if (!hasError) {
+
tok = jj_consume_token(BUFFER_T);
}
if (!hasError) {
+
return "buffer";
}
+
break;
}
- case LINKAGE_T:{
- if (!hasError) {
+ case LINKAGE_T:{if (!hasError) {
+
tok = jj_consume_token(LINKAGE_T);
}
if (!hasError) {
+
return "linkage";
}
+
break;
}
default:
@@ -5181,40 +6043,48 @@ assert(false);
QCString VhdlParser::multiplying_operation() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case MULT_T:{
- if (!hasError) {
+ case MULT_T:{if (!hasError) {
+
tok = jj_consume_token(MULT_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case SLASH_T:{
- if (!hasError) {
+ case SLASH_T:{if (!hasError) {
+
tok = jj_consume_token(SLASH_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case MOD_T:{
- if (!hasError) {
+ case MOD_T:{if (!hasError) {
+
tok = jj_consume_token(MOD_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
- case REM_T:{
- if (!hasError) {
+ case REM_T:{if (!hasError) {
+
tok = jj_consume_token(REM_T);
}
if (!hasError) {
+
return tok->image.c_str();
}
+
break;
}
default:
@@ -5226,26 +6096,29 @@ assert(false);
}
-QCString VhdlParser::name() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::name() {QCString s,s1;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case STRINGLITERAL:{
- if (!hasError) {
+ case STRINGLITERAL:{if (!hasError) {
+
s = operator_symbol();
}
+
break;
}
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
+
break;
}
- case SLSL_T:{
- if (!hasError) {
+ case SLSL_T:{if (!hasError) {
+
s = external_name();
}
+
break;
}
default:
@@ -5255,90 +6128,123 @@ QCString VhdlParser::name() {QCString s,s1;
}
}
if (!hasError) {
- if (jj_2_47(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_47(2147483647)) {if (!hasError) {
+
s1 = name_ext1();
}
if (!hasError) {
+
s+=s1;
}
+
} else {
;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::name_ext1() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::name_ext1() {QCString s,s1,s2;if (!hasError) {
+
s = name_ext();
}
if (!hasError) {
+
while (!hasError) {
if (jj_2_48(2147483647)) {
;
} else {
goto end_label_26;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = name_ext();
}
if (!hasError) {
+
s+=s1;
}
+
}
end_label_26: ;
}
+
return s;
assert(false);
}
-QCString VhdlParser::name_ext() {QCString s,s1,s2;
- if (!hasError) {
- if (jj_2_49(2147483647)) {
+QCString VhdlParser::name_ext() {QCString s,s1,s2;if (!hasError) {
+
+ if (jj_2_49(2147483647)) {if (!hasError) {
+
+ jj_consume_token(APOSTROPHE_T);
+ }
+ if (!hasError) {
+
+ jj_consume_token(SUBTYPE_T);
+ }
if (!hasError) {
+
+s+="'subtype";
+ }
+
+ } else if (jj_2_50(2147483647)) {if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s1 = suffix();
}
if (!hasError) {
+
s+=".";s+=s1;
}
- } else if (jj_2_50(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_51(2147483647)) {if (!hasError) {
+
s1 = test_att_name();
}
if (!hasError) {
+
s+=s1;
}
- } else if (jj_2_51(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_52(2147483647)) {if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = discrete_range();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="(";s+=s1;s+=")";
}
- } else if (jj_2_52(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_53(2147483647)) {if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
s+="(";s+=s1;
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -5348,72 +6254,89 @@ s+="(";s+=s1;
default:
jj_la1[139] = jj_gen;
goto end_label_27;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_27: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+=")";
}
+
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::test_att_name() {QCString s,s1;
- if (!hasError) {
- if (jj_2_53(2147483647)) {
- if (!hasError) {
+QCString VhdlParser::test_att_name() {QCString s,s1;if (!hasError) {
+
+ if (jj_2_54(2147483647)) {if (!hasError) {
+
s1 = signature();
}
if (!hasError) {
+
s=s1;
}
+
} else {
;
}
}
if (!hasError) {
+
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
+
s1 = attribute_designator();
}
if (!hasError) {
+
s+="'";s+=s1;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="(";s+=s1;s+=")";
}
+
break;
}
default:
@@ -5421,25 +6344,30 @@ s+="(";s+=s1;s+=")";
;
}
}
+
return s;
assert(false);
}
-QCString VhdlParser::indexed_name() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::indexed_name() {QCString s,s1,s2;if (!hasError) {
+
s2 = identifier();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
s=s2+"("+s1;
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -5449,38 +6377,45 @@ s=s2+"("+s1;
default:
jj_la1[141] = jj_gen;
goto end_label_28;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_28: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return s+")";
assert(false);
}
-QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
- if (!hasError) {
+QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
t = jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -5489,15 +6424,18 @@ QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
jj_consume_token(NEXT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s1 = identifier();
}
+
break;
}
default:
@@ -5506,14 +6444,17 @@ QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{
- if (!hasError) {
+ case WHEN_T:{if (!hasError) {
+
t1 = jj_consume_token(WHEN_T);
}
if (!hasError) {
+
s2 = condition();
}
+
break;
}
default:
@@ -5522,8 +6463,10 @@ QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(t) s+=":";
FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
lab.resize(0);
@@ -5533,20 +6476,23 @@ assert(false);
}
-QCString VhdlParser::null_statement() {QCString s;
- if (!hasError) {
+QCString VhdlParser::null_statement() {QCString s;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
break;
}
default:
@@ -5555,35 +6501,42 @@ s+=":";
}
}
if (!hasError) {
+
jj_consume_token(NULL_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return s+="null";
assert(false);
}
QCString VhdlParser::numeric_literal() {QCString s;
- if (jj_2_54(2147483647)) {
- if (!hasError) {
+ if (jj_2_55(2147483647)) {if (!hasError) {
+
s = physical_literal();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INTEGER:
case DECIMAL_LITERAL:
- case BASED_LITERAL:{
- if (!hasError) {
+ case BASED_LITERAL:{if (!hasError) {
+
s = abstract_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -5598,61 +6551,74 @@ assert(false);
QCString VhdlParser::object_class() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
+
return "constant";
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
+
return "signal";
}
+
break;
}
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
+
return "variable";
}
+
break;
}
- case SHARED_T:{
- if (!hasError) {
+ case SHARED_T:{if (!hasError) {
+
jj_consume_token(SHARED_T);
}
if (!hasError) {
+
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
+
return "shared variable";
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
jj_consume_token(FILE_T);
}
if (!hasError) {
+
return "file";
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
jj_consume_token(TYPE_T);
}
if (!hasError) {
+
return "type";
}
+
break;
}
default:
@@ -5664,22 +6630,24 @@ assert(false);
}
-QCString VhdlParser::operator_symbol() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::operator_symbol() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(STRINGLITERAL);
}
+
return tok->image.c_str();
assert(false);
}
-void VhdlParser::options() {
- if (!hasError) {
+void VhdlParser::options() {if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GUARDED_T:{
- if (!hasError) {
+ case GUARDED_T:{if (!hasError) {
+
jj_consume_token(GUARDED_T);
}
+
break;
}
default:
@@ -5688,13 +6656,15 @@ void VhdlParser::options() {
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{
- if (!hasError) {
+ case TRANSPORT_T:{if (!hasError) {
+
delay_mechanism();
}
+
break;
}
default:
@@ -5702,42 +6672,52 @@ void VhdlParser::options() {
;
}
}
+
}
-void VhdlParser::package_body() {QCString s;
- if (!hasError) {
+void VhdlParser::package_body() {QCString s;if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
jj_consume_token(BODY_T);
}
if (!hasError) {
+
s = name();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
lastCompound=current.get();
s.prepend("_");
addVhdlType(s,getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
if (!hasError) {
+
package_body_declarative_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
jj_consume_token(BODY_T);
}
+
break;
}
default:
@@ -5746,14 +6726,16 @@ lastCompound=current.get();
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -5762,8 +6744,10 @@ lastCompound=current.get();
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
lastCompound=0; genLabels.resize(0);
}
@@ -5773,67 +6757,77 @@ void VhdlParser::package_body_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
type_declaration();
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
subtype_declaration();
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
constant_declaration();
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
variable_declaration();
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
file_declaration();
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
alias_declaration();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
jj_la1[152] = jj_gen;
- if (jj_2_55(3)) {
- if (!hasError) {
+ if (jj_2_56(3)) {if (!hasError) {
+
group_template_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
@@ -5846,8 +6840,8 @@ void VhdlParser::package_body_declarative_item() {
}
-void VhdlParser::package_body_declarative_part() {
- if (!hasError) {
+void VhdlParser::package_body_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -5869,29 +6863,34 @@ void VhdlParser::package_body_declarative_part() {
default:
jj_la1[154] = jj_gen;
goto end_label_29;
- }
- if (!hasError) {
+ }if (!hasError) {
+
package_body_declarative_item();
}
+
}
end_label_29: ;
}
+
}
-void VhdlParser::package_declaration() {QCString s;
- if (!hasError) {
+void VhdlParser::package_declaration() {QCString s;if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
lastCompound=current.get();
- std::unique_ptr<Entry> clone=std::make_unique<Entry>(*current);
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;
@@ -5902,17 +6901,21 @@ lastCompound=current.get();
addVhdlType(s,getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
if (!hasError) {
+
package_declarative_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
+
break;
}
default:
@@ -5921,14 +6924,16 @@ lastCompound=current.get();
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -5937,31 +6942,37 @@ lastCompound=current.get();
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
lastEntity=0;lastCompound=0; genLabels.resize(0);
}
-void VhdlParser::geninter() {
- if (!hasError) {
+void VhdlParser::geninter() {if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
gen_interface_list();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
gen_assoc_list();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -5969,6 +6980,7 @@ void VhdlParser::geninter() {
;
}
}
+
break;
}
default:
@@ -5976,6 +6988,7 @@ void VhdlParser::geninter() {
;
}
}
+
}
@@ -5984,113 +6997,130 @@ void VhdlParser::package_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
type_declaration();
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
subtype_declaration();
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
constant_declaration();
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
signal_declaration();
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
variable_declaration();
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
file_declaration();
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
alias_declaration();
}
+
break;
}
- case COMPONENT_T:{
- if (!hasError) {
+ case COMPONENT_T:{if (!hasError) {
+
component_declaration();
}
+
break;
}
default:
jj_la1[159] = jj_gen;
- if (jj_2_56(2147483647)) {
- if (!hasError) {
+ if (jj_2_57(2147483647)) {if (!hasError) {
+
attribute_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case DISCONNECT_T:{
- if (!hasError) {
+ case DISCONNECT_T:{if (!hasError) {
+
disconnection_specification();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
jj_la1[160] = jj_gen;
- if (jj_2_57(3)) {
- if (!hasError) {
+ if (jj_2_58(3)) {if (!hasError) {
+
group_template_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
jj_la1[161] = jj_gen;
- if (jj_2_58(5)) {
- if (!hasError) {
+ if (jj_2_59(5)) {if (!hasError) {
+
package_instantiation_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
package_declaration();
}
+
break;
}
default:
@@ -6107,8 +7137,8 @@ void VhdlParser::package_declarative_item() {
}
-void VhdlParser::package_declarative_part() {
- if (!hasError) {
+void VhdlParser::package_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -6135,63 +7165,75 @@ void VhdlParser::package_declarative_part() {
default:
jj_la1[163] = jj_gen;
goto end_label_30;
- }
- if (!hasError) {
+ }if (!hasError) {
+
package_declarative_item();
}
+
}
end_label_30: ;
}
+
}
-QCString VhdlParser::parameter_specification() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::parameter_specification() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IN_T);
}
if (!hasError) {
+
s1 = discrete_range();
}
+
return s+" in "+s1;
assert(false);
}
-QCString VhdlParser::physical_literal() {QCString s,s1;
- if (!hasError) {
- if (jj_2_59(2147483647)) {
- if (!hasError) {
+QCString VhdlParser::physical_literal() {QCString s,s1;if (!hasError) {
+
+ if (jj_2_60(2147483647)) {if (!hasError) {
+
s = abstract_literal();
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = name();
}
+
s+=" ";s+=s1;s.prepend(" "); return s;
assert(false);
}
-QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(UNITS_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
if (!hasError) {
+
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
@@ -6202,28 +7244,33 @@ addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public)
default:
jj_la1[164] = jj_gen;
goto end_label_31;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = secondary_unit_declaration();
}
+
}
end_label_31: ;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(UNITS_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -6231,126 +7278,156 @@ addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public)
;
}
}
+
return s+"%";
assert(false);
}
-void VhdlParser::port_clause() {
- if (!hasError) {
+void VhdlParser::port_clause() {if (!hasError) {
+
jj_consume_token(PORT_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
port_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
currP=0;
}
-QCString VhdlParser::port_list() {QCString s;
- if (!hasError) {
+QCString VhdlParser::port_list() {QCString s;if (!hasError) {
+
s = interface_list();
}
+
return s;
assert(false);
}
-void VhdlParser::port_map_aspect() {
- if (!hasError) {
+void VhdlParser::port_map_aspect() {if (!hasError) {
+
jj_consume_token(PORT_T);
}
if (!hasError) {
+
jj_consume_token(MAP_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
association_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
}
QCString VhdlParser::primary() {QCString s,s1;
- if (jj_2_60(2147483647)) {
- if (!hasError) {
+ if (jj_2_61(2147483647)) {if (!hasError) {
+
s = function_call();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_61(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_62(2147483647)) {if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s="("+s1+")"; return s;
}
- } else if (jj_2_62(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_63(2147483647)) {if (!hasError) {
+
s = qualified_expression();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_63(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_64(2147483647)) {if (!hasError) {
+
s = type_conversion();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_64(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_65(2147483647)) {if (!hasError) {
+
s = literal();
}
if (!hasError) {
+
s.prepend(" ");return s;
}
- } else if (jj_2_65(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_66(2147483647)) {if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case NEW_T:{
- if (!hasError) {
+ case NEW_T:{if (!hasError) {
+
allocator();
}
if (!hasError) {
+
return "";
}
+
break;
}
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
s = aggregate();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -6365,34 +7442,39 @@ assert(false);
void VhdlParser::primary_unit() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{
- if (!hasError) {
+ case ENTITY_T:{if (!hasError) {
+
entity_declaration();
}
+
break;
}
- case CONFIGURATION_T:{
- if (!hasError) {
+ case CONFIGURATION_T:{if (!hasError) {
+
configuration_declaration();
}
+
break;
}
default:
jj_la1[167] = jj_gen;
- if (jj_2_66(2147483647)) {
- if (!hasError) {
+ if (jj_2_67(2147483647)) {if (!hasError) {
+
package_instantiation_declaration();
}
- } else if (jj_2_67(4)) {
- if (!hasError) {
+
+ } else if (jj_2_68(4)) {if (!hasError) {
+
interface_package_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
package_declaration();
}
+
break;
}
default:
@@ -6405,25 +7487,30 @@ void VhdlParser::primary_unit() {
}
-QCString VhdlParser::procedure_call() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::procedure_call() {QCString s,s1;if (!hasError) {
+
s = name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = actual_parameter_part();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s1.prepend("("); s1.append(")");
}
+
break;
}
default:
@@ -6431,33 +7518,40 @@ s1.prepend("("); s1.append(")");
;
}
}
+
return s+s1;
assert(false);
}
-QCString VhdlParser::procedure_call_statement() {QCString s,s1;
- if (!hasError) {
- if (jj_2_68(2)) {
- if (!hasError) {
+QCString VhdlParser::procedure_call_statement() {QCString s,s1;if (!hasError) {
+
+ if (jj_2_69(2)) {if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = procedure_call();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return s+s1+";";
assert(false);
}
@@ -6468,117 +7562,141 @@ QCString VhdlParser::process_declarative_item() {QCString s;
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
if (!hasError) {
+
return "";
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
s = type_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
s = subtype_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
s = constant_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
s = variable_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
s = file_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
s = alias_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[170] = jj_gen;
- if (jj_2_69(3)) {
- if (!hasError) {
+ if (jj_2_70(3)) {if (!hasError) {
+
s = attribute_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
s = attribute_specification();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
s = use_clause();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[171] = jj_gen;
- if (jj_2_70(3)) {
- if (!hasError) {
+ if (jj_2_71(3)) {if (!hasError) {
+
s = group_template_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
s = group_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -6594,8 +7712,8 @@ assert(false);
}
-QCString VhdlParser::process_declarative_part() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::process_declarative_part() {QCString s,s1;if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -6618,32 +7736,37 @@ QCString VhdlParser::process_declarative_part() {QCString s,s1;
default:
jj_la1[173] = jj_gen;
goto end_label_32;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = process_declarative_item();
}
if (!hasError) {
+
s+=s1;
}
+
}
end_label_32: ;
}
+
return s;
assert(false);
}
-void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;
- if (!hasError) {
+void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -6652,11 +7775,13 @@ void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{
- if (!hasError) {
+ case POSTPONED_T:{if (!hasError) {
+
jj_consume_token(POSTPONED_T);
}
+
break;
}
default:
@@ -6665,34 +7790,40 @@ void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;
}
}
if (!hasError) {
+
currP=VhdlDocGen::PROCESS;
current->startLine=getLine();
current->bodyLine=getLine();
}
if (!hasError) {
+
jj_consume_token(PROCESS_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ALL_T:{
- if (!hasError) {
+ case ALL_T:{if (!hasError) {
+
tok = jj_consume_token(ALL_T);
}
+
break;
}
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s1 = sensitivity_list();
}
+
break;
}
default:
@@ -6702,8 +7833,10 @@ currP=VhdlDocGen::PROCESS;
}
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -6712,11 +7845,13 @@ currP=VhdlDocGen::PROCESS;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
jj_consume_token(IS_T);
}
+
break;
}
default:
@@ -6725,28 +7860,35 @@ currP=VhdlDocGen::PROCESS;
}
}
if (!hasError) {
+
s2 = process_declarative_part();
}
if (!hasError) {
+
if (s2.data())
FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
}
if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
process_statement_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{
- if (!hasError) {
+ case POSTPONED_T:{if (!hasError) {
+
jj_consume_token(POSTPONED_T);
}
+
break;
}
default:
@@ -6755,15 +7897,18 @@ if (s2.data())
}
}
if (!hasError) {
+
jj_consume_token(PROCESS_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -6772,8 +7917,10 @@ if (s2.data())
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(s.isEmpty())
currName=VhdlDocGen::getProcessNumber();
else
@@ -6792,8 +7939,8 @@ if(s.isEmpty())
}
-void VhdlParser::process_statement_part() {
- if (!hasError) {
+void VhdlParser::process_statement_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -6820,49 +7967,60 @@ void VhdlParser::process_statement_part() {
default:
jj_la1[181] = jj_gen;
goto end_label_33;
- }
- if (!hasError) {
+ }if (!hasError) {
+
sequential_statement();
}
+
}
end_label_33: ;
}
+
}
-QCString VhdlParser::qualified_expression() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::qualified_expression() {QCString s,s1;if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
+
s=s1+"'";
}
if (!hasError) {
- if (jj_2_71(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_72(2147483647)) {if (!hasError) {
+
s1 = aggregate();
}
if (!hasError) {
+
s+=s1;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
s+="(";s+=s1;s+=")";
}
+
break;
}
default:
@@ -6872,32 +8030,39 @@ s+="(";s+=s1;s+=")";
}
}
}
+
return s;
assert(false);
}
QCString VhdlParser::range() {QCString s,s1,s2;
- if (jj_2_72(2147483647)) {
- if (!hasError) {
+ if (jj_2_73(2147483647)) {if (!hasError) {
+
s = simple_expression();
}
if (!hasError) {
+
s1 = direction();
}
if (!hasError) {
+
s2 = simple_expression();
}
if (!hasError) {
+
return s+" "+s1+" "+s2;
}
- } else if (jj_2_73(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_74(2147483647)) {if (!hasError) {
+
s = attribute_name();
}
if (!hasError) {
+
return s;
}
+
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -6906,27 +8071,31 @@ assert(false);
}
-QCString VhdlParser::range_constraint() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::range_constraint() {QCString s,s1;if (!hasError) {
+
jj_consume_token(RANGE_T);
}
if (!hasError) {
+
s = range();
}
+
return " range "+s;
assert(false);
}
-void VhdlParser::record_type_definition() {
- if (!hasError) {
+void VhdlParser::record_type_definition() {if (!hasError) {
+
jj_consume_token(RECORD_T);
}
if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
element_declaration();
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{
@@ -6941,20 +8110,24 @@ void VhdlParser::record_type_definition() {
end_label_34: ;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(RECORD_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -6962,27 +8135,31 @@ void VhdlParser::record_type_definition() {
;
}
}
+
}
-QCString VhdlParser::relation() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::relation() {QCString s,s1,s2;if (!hasError) {
+
s = shift_expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LESSTHAN_T:
case GREATERTHAN_T:
case LT_T:
case GT_T:
case EQU_T:
- case NOTEQU_T:{
- if (!hasError) {
+ case NOTEQU_T:{if (!hasError) {
+
s1 = relation_operator();
}
if (!hasError) {
+
s2 = shift_expression();
}
+
break;
}
default:
@@ -6990,6 +8167,7 @@ QCString VhdlParser::relation() {QCString s,s1,s2;
;
}
}
+
return s+s1+s2;
assert(false);
}
@@ -6997,58 +8175,70 @@ assert(false);
QCString VhdlParser::relation_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LT_T:{
- if (!hasError) {
+ case LT_T:{if (!hasError) {
+
jj_consume_token(LT_T);
}
if (!hasError) {
+
return "<";
}
+
break;
}
- case GT_T:{
- if (!hasError) {
+ case GT_T:{if (!hasError) {
+
jj_consume_token(GT_T);
}
if (!hasError) {
+
return ">";
}
+
break;
}
- case EQU_T:{
- if (!hasError) {
+ case EQU_T:{if (!hasError) {
+
jj_consume_token(EQU_T);
}
if (!hasError) {
+
return "=";
}
+
break;
}
- case GREATERTHAN_T:{
- if (!hasError) {
+ case GREATERTHAN_T:{if (!hasError) {
+
jj_consume_token(GREATERTHAN_T);
}
if (!hasError) {
+
return ">=";
}
+
break;
}
- case LESSTHAN_T:{
- if (!hasError) {
+ case LESSTHAN_T:{if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
return "<=";
}
+
break;
}
- case NOTEQU_T:{
- if (!hasError) {
+ case NOTEQU_T:{if (!hasError) {
+
jj_consume_token(NOTEQU_T);
}
if (!hasError) {
+
return "/=";
}
+
break;
}
default:
@@ -7060,17 +8250,19 @@ assert(false);
}
-QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
t = jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -7079,20 +8271,25 @@ QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2
}
}
if (!hasError) {
+
jj_consume_token(REPORT_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SEVERITY_T:{
- if (!hasError) {
+ case SEVERITY_T:{if (!hasError) {
+
t1 = jj_consume_token(SEVERITY_T);
}
if (!hasError) {
+
s2 = expression();
}
+
break;
}
default:
@@ -7101,8 +8298,10 @@ QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(t) s.append(":");
s1.prepend(" report ");
if(t1) s2.prepend(" severity ");
@@ -7111,20 +8310,23 @@ assert(false);
}
-QCString VhdlParser::return_statement() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::return_statement() {QCString s,s1;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
break;
}
default:
@@ -7133,9 +8335,11 @@ s+=":";
}
}
if (!hasError) {
+
jj_consume_token(RETURN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
case NEW_T:
@@ -7152,10 +8356,11 @@ s+=":";
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{
- if (!hasError) {
+ case BIT_STRING_LITERAL:{if (!hasError) {
+
s1 = expression();
}
+
break;
}
default:
@@ -7164,8 +8369,10 @@ s+=":";
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return s+" return "+s1+";";
assert(false);
}
@@ -7173,31 +8380,37 @@ assert(false);
QCString VhdlParser::scalar_type_definition() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
s = enumeration_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case RANGE_T:{
- if (!hasError) {
+ case RANGE_T:{if (!hasError) {
+
s = range_constraint();
}
if (!hasError) {
- if (jj_2_74(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_75(2147483647)) {if (!hasError) {
+
s1 = physical_type_definition();
}
+
} else {
;
}
}
if (!hasError) {
+
return s+" "+s1+"%";
}
+
break;
}
default:
@@ -7211,16 +8424,18 @@ assert(false);
void VhdlParser::secondary_unit() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARCHITECTURE_T:{
- if (!hasError) {
+ case ARCHITECTURE_T:{if (!hasError) {
+
architecture_body();
}
+
break;
}
- case PACKAGE_T:{
- if (!hasError) {
+ case PACKAGE_T:{if (!hasError) {
+
package_body();
}
+
break;
}
default:
@@ -7231,19 +8446,23 @@ void VhdlParser::secondary_unit() {
}
-QCString VhdlParser::secondary_unit_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::secondary_unit_declaration() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(EQU_T);
}
if (!hasError) {
+
s1 = physical_literal();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
//printf("\n %s %s [%d]",s.data(),s1.data(),getLine());
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
@@ -7252,60 +8471,74 @@ assert(false);
}
-QCString VhdlParser::selected_name() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::selected_name() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s1 = suffix();
}
+
return s+"."+s1;
assert(false);
}
-void VhdlParser::selected_signal_assignment() {
- if (!hasError) {
+void VhdlParser::selected_signal_assignment() {if (!hasError) {
+
jj_consume_token(WITH_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(SELECT_T);
}
if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
options();
}
if (!hasError) {
+
selected_waveforms();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::selected_waveforms() {
- if (!hasError) {
+void VhdlParser::selected_waveforms() {if (!hasError) {
+
waveform();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
choices();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -7315,43 +8548,51 @@ void VhdlParser::selected_waveforms() {
default:
jj_la1[193] = jj_gen;
goto end_label_35;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
waveform();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
choices();
}
+
}
end_label_35: ;
}
+
}
-QCString VhdlParser::sensitivity_clause() {QCString s;
- if (!hasError) {
+QCString VhdlParser::sensitivity_clause() {QCString s;if (!hasError) {
+
jj_consume_token(ON_T);
}
if (!hasError) {
+
s = sensitivity_list();
}
+
s.prepend(" on ");
return s;
assert(false);
}
-QCString VhdlParser::sensitivity_list() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::sensitivity_list() {QCString s,s1;if (!hasError) {
+
s = name();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -7361,142 +8602,175 @@ QCString VhdlParser::sensitivity_list() {QCString s,s1;
default:
jj_la1[194] = jj_gen;
goto end_label_36;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_36: ;
}
+
return s;
assert(false);
}
-QCString VhdlParser::sequence_of_statement() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::sequence_of_statement() {QCString s,s1;if (!hasError) {
+
while (!hasError) {
- if (jj_2_75(3)) {
+ if (jj_2_76(3)) {
;
} else {
goto end_label_37;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = sequential_statement();
}
if (!hasError) {
+
s+=s1;
}
+
}
end_label_37: ;
}
+
return s;
assert(false);
}
QCString VhdlParser::sequential_statement() {QCString s;
- if (jj_2_76(2147483647)) {
- if (!hasError) {
+ if (jj_2_77(2147483647)) {if (!hasError) {
+
s = signal_assignment_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_77(3)) {
- if (!hasError) {
+
+ } else if (jj_2_78(3)) {if (!hasError) {
+
s = assertion_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_78(3)) {
- if (!hasError) {
+
+ } else if (jj_2_79(3)) {if (!hasError) {
+
s = report_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_79(3)) {
- if (!hasError) {
+
+ } else if (jj_2_80(3)) {if (!hasError) {
+
s = wait_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_80(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_81(2147483647)) {if (!hasError) {
+
s = variable_assignment_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_81(3)) {
- if (!hasError) {
+
+ } else if (jj_2_82(3)) {if (!hasError) {
+
s = procedure_call_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
- } else if (jj_2_82(3)) {
- if (!hasError) {
+
+ } else if (jj_2_83(3)) {if (!hasError) {
+
if_statement();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_83(3)) {
- if (!hasError) {
+
+ } else if (jj_2_84(3)) {if (!hasError) {
+
case_statement();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_84(3)) {
- if (!hasError) {
+
+ } else if (jj_2_85(3)) {if (!hasError) {
+
loop_statement();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_85(3)) {
- if (!hasError) {
+
+ } else if (jj_2_86(3)) {if (!hasError) {
+
s = next_statement();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_86(3)) {
- if (!hasError) {
+
+ } else if (jj_2_87(3)) {if (!hasError) {
+
s = exit_statement();
}
if (!hasError) {
+
return s;
}
- } else if (jj_2_87(3)) {
- if (!hasError) {
+
+ } else if (jj_2_88(3)) {if (!hasError) {
+
s = return_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NULL_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = null_statement();
}
if (!hasError) {
+
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
+
break;
}
default:
@@ -7509,24 +8783,27 @@ assert(false);
}
-QCString VhdlParser::shift_expression() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::shift_expression() {QCString s,s1,s2;if (!hasError) {
+
s = simple_expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ROL_T:
case ROR_T:
case SLA_T:
case SLL_T:
case SRA_T:
- case SRL_T:{
- if (!hasError) {
+ case SRL_T:{if (!hasError) {
+
s1 = shift_operator();
}
if (!hasError) {
+
s2 = simple_expression();
}
+
break;
}
default:
@@ -7534,6 +8811,7 @@ QCString VhdlParser::shift_expression() {QCString s,s1,s2;
;
}
}
+
return s+s1+s2;
assert(false);
}
@@ -7541,58 +8819,70 @@ assert(false);
QCString VhdlParser::shift_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SLL_T:{
- if (!hasError) {
+ case SLL_T:{if (!hasError) {
+
jj_consume_token(SLL_T);
}
if (!hasError) {
+
return "sll";
}
+
break;
}
- case SRL_T:{
- if (!hasError) {
+ case SRL_T:{if (!hasError) {
+
jj_consume_token(SRL_T);
}
if (!hasError) {
+
return "srl";
}
+
break;
}
- case SLA_T:{
- if (!hasError) {
+ case SLA_T:{if (!hasError) {
+
jj_consume_token(SLA_T);
}
if (!hasError) {
+
return "sla";
}
+
break;
}
- case SRA_T:{
- if (!hasError) {
+ case SRA_T:{if (!hasError) {
+
jj_consume_token(SRA_T);
}
if (!hasError) {
+
return "sra";
}
+
break;
}
- case ROL_T:{
- if (!hasError) {
+ case ROL_T:{if (!hasError) {
+
jj_consume_token(ROL_T);
}
if (!hasError) {
+
return "rol";
}
+
break;
}
- case ROR_T:{
- if (!hasError) {
+ case ROR_T:{if (!hasError) {
+
jj_consume_token(ROR_T);
}
if (!hasError) {
+
return "ror";
}
+
break;
}
default:
@@ -7606,22 +8896,26 @@ assert(false);
QCString VhdlParser::sign() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PLUS_T:{
- if (!hasError) {
+ case PLUS_T:{if (!hasError) {
+
jj_consume_token(PLUS_T);
}
if (!hasError) {
+
return "+";
}
+
break;
}
- case MINUS_T:{
- if (!hasError) {
+ case MINUS_T:{if (!hasError) {
+
jj_consume_token(MINUS_T);
}
if (!hasError) {
+
return "-";
}
+
break;
}
default:
@@ -7634,56 +8928,67 @@ assert(false);
QCString VhdlParser::signal_assignment_statement() {QCString s,s1,s2,s3;
- if (jj_2_89(2147483647)) {
- if (!hasError) {
+ if (jj_2_90(2147483647)) {if (!hasError) {
+
conditional_signal_assignment_wave();
}
if (!hasError) {
+
return "";
}
- } else if (jj_2_90(2147483647)) {
- if (!hasError) {
+
+ } else if (jj_2_91(2147483647)) {if (!hasError) {
+
selected_signal_assignment_wave();
}
if (!hasError) {
+
return "";
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
- if (jj_2_88(2)) {
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
+ if (jj_2_89(2)) {if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{
- if (!hasError) {
+ case TRANSPORT_T:{if (!hasError) {
+
s2 = delay_mechanism();
}
+
break;
}
default:
@@ -7692,14 +8997,18 @@ s+=":";
}
}
if (!hasError) {
+
s3 = waveform();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
if (!hasError) {
+
return s+s1+"<="+s2+s3+";";
}
+
break;
}
default:
@@ -7712,33 +9021,39 @@ assert(false);
}
-void VhdlParser::semi() {
- if (!hasError) {
+void VhdlParser::semi() {if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;
- if (!hasError) {
+void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;if (!hasError) {
+
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BUS_T:
- case REGISTER_T:{
- if (!hasError) {
+ case REGISTER_T:{if (!hasError) {
+
s2 = signal_kind();
}
+
break;
}
default:
@@ -7747,14 +9062,17 @@ void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{
- if (!hasError) {
+ case VARASSIGN_T:{if (!hasError) {
+
tok = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
s3 = expression();
}
+
break;
}
default:
@@ -7763,8 +9081,10 @@ void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(tok)
s3.prepend(":=");
s4=s1+s2+s3;
@@ -7774,22 +9094,26 @@ if(tok)
QCString VhdlParser::signal_kind() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REGISTER_T:{
- if (!hasError) {
+ case REGISTER_T:{if (!hasError) {
+
jj_consume_token(REGISTER_T);
}
if (!hasError) {
+
return "register";
}
+
break;
}
- case BUS_T:{
- if (!hasError) {
+ case BUS_T:{if (!hasError) {
+
jj_consume_token(BUS_T);
}
if (!hasError) {
+
return "bus";
}
+
break;
}
default:
@@ -7806,11 +9130,12 @@ QCString VhdlParser::signal_list() {QCString s,s1;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -7820,37 +9145,45 @@ QCString VhdlParser::signal_list() {QCString s,s1;
default:
jj_la1[204] = jj_gen;
goto end_label_38;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_38: ;
}
+
break;
}
- case OTHER_T:{
- if (!hasError) {
+ case OTHER_T:{if (!hasError) {
+
jj_consume_token(OTHER_T);
}
if (!hasError) {
+
return "other";
}
+
break;
}
- case ALL_T:{
- if (!hasError) {
+ case ALL_T:{if (!hasError) {
+
jj_consume_token(ALL_T);
}
if (!hasError) {
+
return "all";
}
+
break;
}
default:
@@ -7862,20 +9195,22 @@ assert(false);
}
-QCString VhdlParser::signature() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::signature() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(LBRACKET_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -7885,19 +9220,23 @@ QCString VhdlParser::signature() {QCString s,s1,s2;
default:
jj_la1[206] = jj_gen;
goto end_label_39;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_39: ;
}
+
break;
}
default:
@@ -7906,17 +9245,21 @@ s+=",";s+=s1;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case RETURN_T:{
- if (!hasError) {
+ case RETURN_T:{if (!hasError) {
+
jj_consume_token(RETURN_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s+="return ";s+=s1;
}
+
break;
}
default:
@@ -7925,21 +9268,24 @@ s+="return ";s+=s1;
}
}
if (!hasError) {
+
jj_consume_token(RBRACKET_T);
}
+
s1="["+s+"]";return s1;
assert(false);
}
-QCString VhdlParser::simple_expression() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::simple_expression() {QCString s,s1,s2;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PLUS_T:
- case MINUS_T:{
- if (!hasError) {
+ case MINUS_T:{if (!hasError) {
+
s = sign();
}
+
break;
}
default:
@@ -7948,78 +9294,93 @@ QCString VhdlParser::simple_expression() {QCString s,s1,s2;
}
}
if (!hasError) {
+
s1 = term();
}
if (!hasError) {
+
s+=s1;
}
if (!hasError) {
+
while (!hasError) {
- if (jj_2_91(2147483647)) {
+ if (jj_2_92(2147483647)) {
;
} else {
goto end_label_40;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = adding_operator();
}
if (!hasError) {
+
s2 = term();
}
if (!hasError) {
+
s+=s1;s+=s2;
}
+
}
end_label_40: ;
}
+
return s;
assert(false);
}
-void VhdlParser::simple_name() {
- if (!hasError) {
+void VhdlParser::simple_name() {if (!hasError) {
+
name();
}
+
}
-QCString VhdlParser::slice_name() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::slice_name() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = discrete_range();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return s+"("+s1+")";
assert(false);
}
-QCString VhdlParser::string_literal() {Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::string_literal() {Token *tok=0;if (!hasError) {
+
tok = jj_consume_token(STRINGLITERAL);
}
+
return tok->image.c_str();
assert(false);
}
-void VhdlParser::subprogram_body() {QCString s;
- if (!hasError) {
+void VhdlParser::subprogram_body() {QCString s;if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
//try{
s = subprogram_declarative_part();
}
if (!hasError) {
+
if (s.data())
{
FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
@@ -8027,21 +9388,26 @@ if (s.data())
FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
}
if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
subprogram_statement_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
- case PROCEDURE_T:{
- if (!hasError) {
+ case PROCEDURE_T:{if (!hasError) {
+
subprogram_kind();
}
+
break;
}
default:
@@ -8050,13 +9416,15 @@ if (s.data())
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
designator();
}
+
break;
}
default:
@@ -8065,8 +9433,10 @@ if (s.data())
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
tempEntry->endBodyLine=getLine(END_T);
createFlow();
currP=0;
@@ -8074,25 +9444,29 @@ tempEntry->endBodyLine=getLine(END_T);
void VhdlParser::subprogram_declaration() {
- if (jj_2_92(2147483647)) {
- if (!hasError) {
+ if (jj_2_93(2147483647)) {if (!hasError) {
+
subprogram_instantiation_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_specification();
}
if (!hasError) {
+
subprogram_1();
}
if (!hasError) {
+
currP=0;
}
+
break;
}
default:
@@ -8106,16 +9480,18 @@ currP=0;
void VhdlParser::subprogram_1() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
subprogram_body();
}
+
break;
}
- case SEMI_T:{
- if (!hasError) {
+ case SEMI_T:{if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -8131,126 +9507,152 @@ QCString VhdlParser::subprogram_declarative_item() {QCString s;
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
if (!hasError) {
+
return "";
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
s = type_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
subprogram_body();
}
if (!hasError) {
+
return "";
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
s = subtype_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
s = constant_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
s = variable_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
s = file_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
s = alias_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[214] = jj_gen;
- if (jj_2_93(2147483647)) {
- if (!hasError) {
+ if (jj_2_94(2147483647)) {if (!hasError) {
+
s = attribute_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
s = attribute_specification();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
s = use_clause();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[215] = jj_gen;
- if (jj_2_94(3)) {
- if (!hasError) {
+ if (jj_2_95(3)) {if (!hasError) {
+
s = group_template_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
s = group_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -8266,8 +9668,8 @@ assert(false);
}
-QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -8291,16 +9693,19 @@ QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;
default:
jj_la1[217] = jj_gen;
goto end_label_41;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = subprogram_declarative_item();
}
if (!hasError) {
+
s+=s1;
}
+
}
end_label_41: ;
}
+
return s;
assert(false);
}
@@ -8308,16 +9713,18 @@ assert(false);
void VhdlParser::subprogram_kind() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FUNCTION_T:{
- if (!hasError) {
+ case FUNCTION_T:{if (!hasError) {
+
jj_consume_token(FUNCTION_T);
}
+
break;
}
- case PROCEDURE_T:{
- if (!hasError) {
+ case PROCEDURE_T:{if (!hasError) {
+
jj_consume_token(PROCEDURE_T);
}
+
break;
}
default:
@@ -8330,14 +9737,16 @@ void VhdlParser::subprogram_kind() {
void VhdlParser::subprogram_specification() {QCString s;Token *tok=0;Token *t;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROCEDURE_T:{
- if (!hasError) {
+ case PROCEDURE_T:{if (!hasError) {
+
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
+
s = designator();
}
if (!hasError) {
+
currP=VhdlDocGen::PROCEDURE;
createFunction(s.data(),currP,0);
tempEntry=current.get();
@@ -8345,23 +9754,29 @@ currP=VhdlDocGen::PROCEDURE;
current->bodyLine=getLine(PROCEDURE_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
param_sec=PARAM_SEC;
}
if (!hasError) {
+
interface_list();
}
if (!hasError) {
+
param_sec=0;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -8370,50 +9785,59 @@ param_sec=0;
}
}
if (!hasError) {
- if (jj_2_95(2)) {
- if (!hasError) {
+
+ if (jj_2_96(2)) {if (!hasError) {
+
gen_interface_list();
}
+
} else {
;
}
}
if (!hasError) {
- if (jj_2_96(2)) {
- if (!hasError) {
+
+ if (jj_2_97(2)) {if (!hasError) {
+
gen_assoc_list();
}
+
} else {
;
}
}
if (!hasError) {
+
param();
}
if (!hasError) {
+
newEntry();
}
+
break;
}
case FUNCTION_T:
case IMPURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IMPURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
tok = jj_consume_token(PURE_T);
}
+
break;
}
- case IMPURE_T:{
- if (!hasError) {
+ case IMPURE_T:{if (!hasError) {
+
tok = jj_consume_token(IMPURE_T);
}
+
break;
}
default:
@@ -8422,6 +9846,7 @@ newEntry();
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
break;
}
default:
@@ -8430,12 +9855,15 @@ newEntry();
}
}
if (!hasError) {
+
t = jj_consume_token(FUNCTION_T);
}
if (!hasError) {
+
s = designator();
}
if (!hasError) {
+
currP=VhdlDocGen::FUNCTION;
if(tok)
createFunction(tok->image.c_str(),currP,s.data());
@@ -8446,23 +9874,29 @@ currP=VhdlDocGen::FUNCTION;
current->bodyLine=getLine(FUNCTION_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
param_sec=PARAM_SEC;
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
formal_parameter_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
param_sec=0;
}
+
break;
}
default:
@@ -8471,16 +9905,20 @@ param_sec=0;
}
}
if (!hasError) {
+
jj_consume_token(RETURN_T);
}
if (!hasError) {
+
s = type_mark();
}
if (!hasError) {
+
tempEntry=current.get();
current->type=s;
newEntry();
}
+
break;
}
default:
@@ -8491,8 +9929,8 @@ tempEntry=current.get();
}
-void VhdlParser::subprogram_statement_part() {
- if (!hasError) {
+void VhdlParser::subprogram_statement_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -8519,100 +9957,120 @@ void VhdlParser::subprogram_statement_part() {
default:
jj_la1[224] = jj_gen;
goto end_label_42;
- }
- if (!hasError) {
+ }if (!hasError) {
+
sequential_statement();
}
+
}
end_label_42: ;
}
+
}
-QCString VhdlParser::subtype_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::subtype_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SUBTYPE,0,s1.data(),Public);
return " subtype "+s+" is "+s1+";";
assert(false);
}
-QCString VhdlParser::subtype_indication() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::subtype_indication() {QCString s,s1,s2;if (!hasError) {
+
s = name();
}
if (!hasError) {
- if (jj_2_97(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_98(2147483647)) {if (!hasError) {
+
s1 = name();
}
+
} else {
;
}
}
if (!hasError) {
- if (jj_2_98(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_99(2147483647)) {if (!hasError) {
+
s2 = constraint();
}
+
} else {
;
}
}
+
return s+" "+s1+" "+s2;
assert(false);
}
QCString VhdlParser::suffix() {QCString s;
- if (jj_2_99(2147483647)) {
- if (!hasError) {
+ if (jj_2_100(2147483647)) {if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CHARACTER_LITERAL:{
- if (!hasError) {
+ case CHARACTER_LITERAL:{if (!hasError) {
+
s = character_literal();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case STRINGLITERAL:{
- if (!hasError) {
+ case STRINGLITERAL:{if (!hasError) {
+
s = operator_symbol();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case ALL_T:{
- if (!hasError) {
+ case ALL_T:{if (!hasError) {
+
jj_consume_token(ALL_T);
}
if (!hasError) {
+
return " all ";
}
+
break;
}
default:
@@ -8630,22 +10088,26 @@ QCString VhdlParser::target() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = name();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
s = aggregate();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -8657,81 +10119,96 @@ assert(false);
}
-QCString VhdlParser::term() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::term() {QCString s,s1,s2;if (!hasError) {
+
s = factor();
}
if (!hasError) {
+
while (!hasError) {
- if (jj_2_100(2)) {
+ if (jj_2_101(2)) {
;
} else {
goto end_label_43;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = multiplying_operation();
}
if (!hasError) {
+
s2 = factor();
}
if (!hasError) {
+
s+=s1;s+=s2;
}
+
}
end_label_43: ;
}
+
return s;
assert(false);
}
-QCString VhdlParser::timeout_clause() {QCString s;
- if (!hasError) {
+QCString VhdlParser::timeout_clause() {QCString s;if (!hasError) {
+
jj_consume_token(FOR_T);
}
if (!hasError) {
+
s = expression();
}
+
return " for "+s;
assert(false);
}
-QCString VhdlParser::type_conversion() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::type_conversion() {QCString s,s1;if (!hasError) {
+
s = name();
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
return s+"("+s1+")";
assert(false);
}
QCString VhdlParser::type_declaration() {QCString s;
- if (jj_2_101(3)) {
- if (!hasError) {
+ if (jj_2_102(3)) {if (!hasError) {
+
s = full_type_declaration();
}
if (!hasError) {
+
return s;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
s = incomplete_type_declaration();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -8747,62 +10224,74 @@ assert(false);
QCString VhdlParser::type_definition() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case RANGE_T:
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
//try{
s = scalar_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
case ARRAY_T:
- case RECORD_T:{
- if (!hasError) {
+ case RECORD_T:{if (!hasError) {
+
s = composite_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case ACCESS_T:{
- if (!hasError) {
+ case ACCESS_T:{if (!hasError) {
+
s = access_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
s = file_type_definition();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
jj_la1[228] = jj_gen;
- if (jj_2_102(2)) {
- if (!hasError) {
+ if (jj_2_103(2)) {if (!hasError) {
+
protected_type_body();
}
if (!hasError) {
+
return "";
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROTECTED_T:{
- if (!hasError) {
+ case PROTECTED_T:{if (!hasError) {
+
protected_type_declaration();
}
if (!hasError) {
+
return "";
}
+
break;
}
default:
@@ -8816,26 +10305,30 @@ assert(false);
}
-QCString VhdlParser::type_mark() {QCString s;
- if (!hasError) {
+QCString VhdlParser::type_mark() {QCString s;if (!hasError) {
+
s = name();
}
+
return s;
assert(false);
}
-QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;
- if (!hasError) {
+QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;if (!hasError) {
+
jj_consume_token(ARRAY_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s = index_subtype_definition();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -8845,41 +10338,50 @@ QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;
default:
jj_la1[230] = jj_gen;
goto end_label_44;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = index_subtype_definition();
}
if (!hasError) {
+
s3+=",";s3+=s1;
}
+
}
end_label_44: ;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
if (!hasError) {
+
jj_consume_token(OF_T);
}
if (!hasError) {
+
s2 = subtype_indication();
}
+
return "array("+s+s3+") of "+s2;
assert(false);
}
-QCString VhdlParser::use_clause() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::use_clause() {QCString s,s1;if (!hasError) {
+
jj_consume_token(USE_T);
}
if (!hasError) {
+
s = selected_name();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -8889,22 +10391,27 @@ QCString VhdlParser::use_clause() {QCString s,s1;
default:
jj_la1[231] = jj_gen;
goto end_label_45;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = selected_name();
}
if (!hasError) {
+
s+=",";s+=s1;
}
+
}
end_label_45: ;
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCStringList ql1=QCStringList::split(",",s);
for (uint j=0;j<ql1.count();j++)
{
@@ -8927,46 +10434,57 @@ QCString VhdlParser::variable_assignment_statement() {QCString s,s1,s2;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
- if (jj_2_103(2)) {
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
+ if (jj_2_104(2)) {if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s+=":";
}
+
} else {
;
}
}
if (!hasError) {
+
s1 = target();
}
if (!hasError) {
+
jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
s2 = expression();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
if (!hasError) {
+
return s+s1+":="+s2+";";
}
+
break;
}
- case WITH_T:{
- if (!hasError) {
+ case WITH_T:{if (!hasError) {
+
selected_variable_assignment();
}
if (!hasError) {
+
return "";
}
+
break;
}
default:
@@ -8978,13 +10496,14 @@ assert(false);
}
-QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s,s1,s2;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SHARED_T:{
- if (!hasError) {
+ case SHARED_T:{if (!hasError) {
+
tok = jj_consume_token(SHARED_T);
}
+
break;
}
default:
@@ -8993,26 +10512,33 @@ QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s
}
}
if (!hasError) {
+
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s1 = subtype_indication();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{
- if (!hasError) {
+ case VARASSIGN_T:{if (!hasError) {
+
t1 = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
s2 = expression();
}
+
break;
}
default:
@@ -9021,8 +10547,10 @@ QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
int spec;
if(t1)
s2.prepend(":=");
@@ -9047,17 +10575,19 @@ assert(false);
}
-QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
- if (!hasError) {
+QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
t = jj_consume_token(COLON_T);
}
+
break;
}
default:
@@ -9066,14 +10596,17 @@ QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
}
}
if (!hasError) {
+
jj_consume_token(WAIT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ON_T:{
- if (!hasError) {
+ case ON_T:{if (!hasError) {
+
s1 = sensitivity_clause();
}
+
break;
}
default:
@@ -9082,11 +10615,13 @@ QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case UNTIL_T:{
- if (!hasError) {
+ case UNTIL_T:{if (!hasError) {
+
s2 = condition_clause();
}
+
break;
}
default:
@@ -9095,11 +10630,13 @@ QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{
- if (!hasError) {
+ case FOR_T:{if (!hasError) {
+
s3 = timeout_clause();
}
+
break;
}
default:
@@ -9108,8 +10645,10 @@ QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
if(t) s.append(":");
return s+" wait "+s1+s2+s3+";";
assert(false);
@@ -9133,11 +10672,12 @@ QCString VhdlParser::waveform() {QCString s,s1;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{
- if (!hasError) {
+ case BIT_STRING_LITERAL:{if (!hasError) {
+
s = waveform_element();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -9147,31 +10687,38 @@ QCString VhdlParser::waveform() {QCString s,s1;
default:
jj_la1[239] = jj_gen;
goto end_label_46;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
s1 = waveform_element();
}
if (!hasError) {
+
s+=","; s+=s1;
}
+
}
end_label_46: ;
}
if (!hasError) {
+
return s;
}
+
break;
}
- case UNAFFECTED_T:{
- if (!hasError) {
+ case UNAFFECTED_T:{if (!hasError) {
+
jj_consume_token(UNAFFECTED_T);
}
if (!hasError) {
+
return " unaffected ";
}
+
break;
}
default:
@@ -9183,22 +10730,26 @@ assert(false);
}
-QCString VhdlParser::waveform_element() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::waveform_element() {QCString s,s1;if (!hasError) {
+
s = expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case AFTER_T:{
- if (!hasError) {
+ case AFTER_T:{if (!hasError) {
+
jj_consume_token(AFTER_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
s1.prepend(" after ");
}
+
break;
}
default:
@@ -9206,37 +10757,45 @@ s1.prepend(" after ");
;
}
}
+
return s+s1;
assert(false);
}
-QCString VhdlParser::protected_type_body() {
- if (!hasError) {
+QCString VhdlParser::protected_type_body() {if (!hasError) {
+
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
+
jj_consume_token(BODY_T);
}
if (!hasError) {
+
protected_type_body_declarative_part();
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
+
jj_consume_token(BODY_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -9244,6 +10803,7 @@ QCString VhdlParser::protected_type_body() {
;
}
}
+
return "";
assert(false);
}
@@ -9254,87 +10814,100 @@ void VhdlParser::protected_type_body_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
subprogram_body();
}
+
break;
}
- case TYPE_T:{
- if (!hasError) {
+ case TYPE_T:{if (!hasError) {
+
type_declaration();
}
+
break;
}
- case SUBTYPE_T:{
- if (!hasError) {
+ case SUBTYPE_T:{if (!hasError) {
+
subtype_declaration();
}
+
break;
}
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
constant_declaration();
}
+
break;
}
case SHARED_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
variable_declaration();
}
+
break;
}
- case FILE_T:{
- if (!hasError) {
+ case FILE_T:{if (!hasError) {
+
file_declaration();
}
+
break;
}
- case ALIAS_T:{
- if (!hasError) {
+ case ALIAS_T:{if (!hasError) {
+
alias_declaration();
}
+
break;
}
default:
jj_la1[243] = jj_gen;
- if (jj_2_104(2147483647)) {
- if (!hasError) {
+ if (jj_2_105(2147483647)) {if (!hasError) {
+
attribute_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
jj_la1[244] = jj_gen;
- if (jj_2_105(3)) {
- if (!hasError) {
+ if (jj_2_106(3)) {if (!hasError) {
+
group_template_declaration();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{
- if (!hasError) {
+ case GROUP_T:{if (!hasError) {
+
group_declaration();
}
+
break;
}
default:
@@ -9349,8 +10922,8 @@ void VhdlParser::protected_type_body_declarative_item() {
}
-void VhdlParser::protected_type_body_declarative_part() {
- if (!hasError) {
+void VhdlParser::protected_type_body_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -9374,42 +10947,50 @@ void VhdlParser::protected_type_body_declarative_part() {
default:
jj_la1[246] = jj_gen;
goto end_label_47;
- }
- if (!hasError) {
+ }if (!hasError) {
+
protected_type_body_declarative_item();
}
+
}
end_label_47: ;
}
+
}
-QCString VhdlParser::protected_type_declaration() {
- if (!hasError) {
+QCString VhdlParser::protected_type_declaration() {if (!hasError) {
+
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
- try {
- if (!hasError) {
+
+ try {if (!hasError) {
+
protected_type_declarative_part();
}
+
} catch ( ...) {
error_skipto(END_T);
}
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -9417,6 +10998,7 @@ error_skipto(END_T);
;
}
}
+
return "";
assert(false);
}
@@ -9427,22 +11009,25 @@ void VhdlParser::protected_type_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_specification();
}
+
break;
}
- case ATTRIBUTE_T:{
- if (!hasError) {
+ case ATTRIBUTE_T:{if (!hasError) {
+
attribute_specification();
}
+
break;
}
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
use_clause();
}
+
break;
}
default:
@@ -9453,8 +11038,8 @@ void VhdlParser::protected_type_declarative_item() {
}
-void VhdlParser::protected_type_declarative_part() {
- if (!hasError) {
+void VhdlParser::protected_type_declarative_part() {if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:
@@ -9469,48 +11054,58 @@ void VhdlParser::protected_type_declarative_part() {
default:
jj_la1[249] = jj_gen;
goto end_label_48;
- }
- if (!hasError) {
+ }if (!hasError) {
+
protected_type_declarative_item();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
end_label_48: ;
}
+
}
-QCString VhdlParser::context_ref() {QCString s;
- if (!hasError) {
+QCString VhdlParser::context_ref() {QCString s;if (!hasError) {
+
jj_consume_token(CONTEXT_T);
}
if (!hasError) {
+
s = identifier_list();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
return "context "+s ;
assert(false);
}
-void VhdlParser::context_declaration() {QCString s,s1;
- if (!hasError) {
+void VhdlParser::context_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(CONTEXT_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
parse_sec=CONTEXT_SEC;
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONTEXT_T:
@@ -9522,22 +11117,26 @@ parse_sec=CONTEXT_SEC;
default:
jj_la1[250] = jj_gen;
goto end_label_49;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = libustcont_stats();
}
+
}
end_label_49: ;
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONTEXT_T:{
- if (!hasError) {
+ case CONTEXT_T:{if (!hasError) {
+
jj_consume_token(CONTEXT_T);
}
+
break;
}
default:
@@ -9546,12 +11145,14 @@ parse_sec=CONTEXT_SEC;
}
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -9560,8 +11161,10 @@ parse_sec=CONTEXT_SEC;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
parse_sec=0;
addVhdlType(s.data(),getLine(LIBRARY_T),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,"context",s1.data(),Public);
}
@@ -9569,31 +11172,37 @@ parse_sec=0;
QCString VhdlParser::libustcont_stats() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{
- if (!hasError) {
+ case USE_T:{if (!hasError) {
+
s = use_clause();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case LIBRARY_T:{
- if (!hasError) {
+ case LIBRARY_T:{if (!hasError) {
+
s = library_clause();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case CONTEXT_T:{
- if (!hasError) {
+ case CONTEXT_T:{if (!hasError) {
+
s = context_ref();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -9605,31 +11214,38 @@ assert(false);
}
-void VhdlParser::package_instantiation_declaration() {QCString s,s1,s2;
- if (!hasError) {
+void VhdlParser::package_instantiation_declaration() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
jj_consume_token(NEW_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s2 = signature();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
gen_assoc_list();
}
+
break;
}
default:
@@ -9638,35 +11254,43 @@ void VhdlParser::package_instantiation_declaration() {QCString s,s1,s2;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCString q=" is new "+s1+s2;
addVhdlType(s.data(),getLine(PACKAGE_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"package",q.data(),Public);
}
-QCString VhdlParser::interface_package_declaration() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::interface_package_declaration() {QCString s,s1;if (!hasError) {
+
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
jj_consume_token(NEW_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
gen_assoc_list();
}
+
break;
}
default:
@@ -9674,37 +11298,45 @@ QCString VhdlParser::interface_package_declaration() {QCString s,s1;
;
}
}
+
current->name=s;
return "package "+s+" is new "+s1;
assert(false);
}
-QCString VhdlParser::subprogram_instantiation_declaration() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::subprogram_instantiation_declaration() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
jj_consume_token(IS_T);
}
if (!hasError) {
+
jj_consume_token(NEW_T);
}
if (!hasError) {
+
s1 = name();
}
if (!hasError) {
+
s2 = signature();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{
- if (!hasError) {
+ case GENERIC_T:{if (!hasError) {
+
gen_assoc_list();
}
+
break;
}
default:
@@ -9713,8 +11345,10 @@ QCString VhdlParser::subprogram_instantiation_declaration() {QCString s,s1,s2;
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
QCString q= " is new "+s1+s2;
addVhdlType(s.data(),getLine(FUNCTION_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"function ",q.data(),Public);
return q;
@@ -9722,113 +11356,141 @@ assert(false);
}
-void VhdlParser::gen_assoc_list() {
- if (!hasError) {
+void VhdlParser::gen_assoc_list() {if (!hasError) {
+
jj_consume_token(GENERIC_T);
}
if (!hasError) {
+
jj_consume_token(MAP_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
association_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
}
-void VhdlParser::gen_interface_list() {
- if (!hasError) {
+void VhdlParser::gen_interface_list() {if (!hasError) {
+
jj_consume_token(GENERIC_T);
}
if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
//int u=s_str.iLine;
parse_sec=GEN_SEC;
}
if (!hasError) {
+
interface_list();
}
if (!hasError) {
+
// QCString vo=$3;
parse_sec=0;
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
}
-void VhdlParser::case_scheme() {
- if (!hasError) {
+void VhdlParser::case_scheme() {if (!hasError) {
+
jj_consume_token(CASE_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(GENERATE_T);
}
if (!hasError) {
+
when_stats();
}
if (!hasError) {
- if (jj_2_106(3)) {
- if (!hasError) {
+
+ if (jj_2_107(3)) {if (!hasError) {
+
ttend();
}
+
} else {
;
}
}
if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
jj_consume_token(GENERATE_T);
}
if (!hasError) {
+
generate_statement_body();
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::when_stats() {
- if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+void VhdlParser::when_stats() {if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
- if (jj_2_107(2)) {
- if (!hasError) {
+
+ if (jj_2_108(2)) {if (!hasError) {
+
label();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
+
} else {
;
}
}
if (!hasError) {
+
choices();
}
if (!hasError) {
+
jj_consume_token(ARROW_T);
}
if (!hasError) {
+
generate_statement_body();
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{
;
@@ -9841,20 +11503,23 @@ void VhdlParser::when_stats() {
}
end_label_50: ;
}
+
}
-void VhdlParser::ttend() {
- if (!hasError) {
+void VhdlParser::ttend() {if (!hasError) {
+
jj_consume_token(END_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
identifier();
}
+
break;
}
default:
@@ -9863,23 +11528,27 @@ void VhdlParser::ttend() {
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::generate_statement_body() {
- if (!hasError) {
+void VhdlParser::generate_statement_body() {if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
if (!hasError) {
+
generate_statement_body();
}
+
}
-void VhdlParser::generate_statement_body1() {
- if (!hasError) {
+void VhdlParser::generate_statement_body1() {if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
case ATTRIBUTE_T:
@@ -9899,23 +11568,26 @@ void VhdlParser::generate_statement_body1() {
case SUBTYPE_T:
case TYPE_T:
case USE_T:
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
while (!hasError) {
- if (jj_2_108(2147483647)) {
+ if (jj_2_109(2147483647)) {
;
} else {
goto end_label_51;
- }
- if (!hasError) {
+ }if (!hasError) {
+
block_declarative_item();
}
+
}
end_label_51: ;
}
if (!hasError) {
+
jj_consume_token(BEGIN_T);
}
+
break;
}
default:
@@ -9924,6 +11596,7 @@ void VhdlParser::generate_statement_body1() {
}
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -9943,35 +11616,43 @@ void VhdlParser::generate_statement_body1() {
default:
jj_la1[260] = jj_gen;
goto end_label_52;
- }
- if (!hasError) {
+ }if (!hasError) {
+
concurrent_statement();
}
+
}
end_label_52: ;
}
+
}
-QCString VhdlParser::external_name() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::external_name() {QCString s,s1,s2;if (!hasError) {
+
jj_consume_token(SLSL_T);
}
if (!hasError) {
+
s = sig_stat();
}
if (!hasError) {
+
s1 = external_pathname();
}
if (!hasError) {
+
jj_consume_token(COLON_T);
}
if (!hasError) {
+
s2 = subtype_indication();
}
if (!hasError) {
+
jj_consume_token(RSRS_T);
}
+
QCString t="<<"+s;
QCString t1=s1+":"+s2+">>";
return s+s1;
@@ -9981,31 +11662,37 @@ assert(false);
QCString VhdlParser::sig_stat() {Token *t;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONSTANT_T:{
- if (!hasError) {
+ case CONSTANT_T:{if (!hasError) {
+
t = jj_consume_token(CONSTANT_T);
}
if (!hasError) {
+
return t->image.data();
}
+
break;
}
- case SIGNAL_T:{
- if (!hasError) {
+ case SIGNAL_T:{if (!hasError) {
+
t = jj_consume_token(SIGNAL_T);
}
if (!hasError) {
+
return t->image.data();
}
+
break;
}
- case VARIABLE_T:{
- if (!hasError) {
+ case VARIABLE_T:{if (!hasError) {
+
t = jj_consume_token(VARIABLE_T);
}
if (!hasError) {
+
return t->image.data();
}
+
break;
}
default:
@@ -10019,31 +11706,37 @@ assert(false);
QCString VhdlParser::external_pathname() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOT_T:{
- if (!hasError) {
+ case DOT_T:{if (!hasError) {
+
s = absolute_pathname();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case NEG_T:{
- if (!hasError) {
+ case NEG_T:{if (!hasError) {
+
s = relative_pathname();
}
if (!hasError) {
+
return s;
}
+
break;
}
- case AT_T:{
- if (!hasError) {
+ case AT_T:{if (!hasError) {
+
s = package_path_name();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -10056,31 +11749,38 @@ assert(false);
QCString VhdlParser::absolute_pathname() {QCString s,s1;
- if (jj_2_109(2147483647)) {
- if (!hasError) {
+ if (jj_2_110(2147483647)) {if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s = pathname_element_list();
}
if (!hasError) {
+
s1 = identifier();
}
if (!hasError) {
+
return "."+s+s1;
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOT_T:{
- if (!hasError) {
+ case DOT_T:{if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
return "."+s;
}
+
break;
}
default:
@@ -10093,39 +11793,46 @@ assert(false);
}
-QCString VhdlParser::relative_pathname() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::relative_pathname() {QCString s,s1,s2;if (!hasError) {
+
s = neg_list();
}
if (!hasError) {
- if (jj_2_110(2147483647)) {
- if (!hasError) {
+
+ if (jj_2_111(2147483647)) {if (!hasError) {
+
s1 = pathname_element_list();
}
+
} else {
;
}
}
if (!hasError) {
+
s2 = identifier();
}
+
return s+s1+s2;
assert(false);
}
-QCString VhdlParser::neg_list() {QCString s;
- if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+QCString VhdlParser::neg_list() {QCString s;if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
jj_consume_token(NEG_T);
}
if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s+="^.";
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NEG_T:{
;
@@ -10138,27 +11845,32 @@ s+="^.";
}
end_label_53: ;
}
+
return s;
assert(false);
}
-QCString VhdlParser::pathname_element() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::pathname_element() {QCString s,s1;if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = expression();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -10166,6 +11878,7 @@ QCString VhdlParser::pathname_element() {QCString s,s1;
;
}
}
+
if(!s1.isEmpty())
return s+"("+s1+")";
@@ -10174,69 +11887,81 @@ assert(false);
}
-QCString VhdlParser::pathname_element_list() {QCString s,s1,s2;
- if (!hasError) {
+QCString VhdlParser::pathname_element_list() {QCString s,s1,s2;if (!hasError) {
if (!hasError) {
+
s = pathname_element();
}
if (!hasError) {
+
jj_consume_token(DOT_T);
}
+
}
if (!hasError) {
+
s+=".";
}
if (!hasError) {
+
while (!hasError) {
- if (jj_2_111(2147483647)) {
+ if (jj_2_112(2147483647)) {
;
} else {
goto end_label_54;
- }
- if (!hasError) {
+ }if (!hasError) {
+
s1 = pathname_element();
}
if (!hasError) {
+
jj_consume_token(DOT_T);
}
if (!hasError) {
+
s2+=s1;s2+=".";
}
+
}
end_label_54: ;
}
+
return s+s2;
assert(false);
}
-QCString VhdlParser::package_path_name() {QCString s;
- if (!hasError) {
+QCString VhdlParser::package_path_name() {QCString s;if (!hasError) {
+
jj_consume_token(AT_T);
}
if (!hasError) {
+
s = name();
}
+
return "@"+s;
assert(false);
}
void VhdlParser::conditional_signal_assignment_wave() {
- if (jj_2_112(2147483647)) {
- if (!hasError) {
+ if (jj_2_113(2147483647)) {if (!hasError) {
+
conditional_force_assignment();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
conditional_waveform_assignment();
}
+
break;
}
default:
@@ -10248,21 +11973,24 @@ void VhdlParser::conditional_signal_assignment_wave() {
}
-void VhdlParser::conditional_waveform_assignment() {
- if (!hasError) {
+void VhdlParser::conditional_waveform_assignment() {if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{
- if (!hasError) {
+ case TRANSPORT_T:{if (!hasError) {
+
delay_mechanism();
}
+
break;
}
default:
@@ -10271,20 +11999,25 @@ void VhdlParser::conditional_waveform_assignment() {
}
}
if (!hasError) {
+
waveform_element();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ELSE_T:{
- if (!hasError) {
+ case ELSE_T:{if (!hasError) {
+
else_wave_list();
}
+
break;
}
default:
@@ -10293,27 +12026,33 @@ void VhdlParser::conditional_waveform_assignment() {
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
-void VhdlParser::else_wave_list() {
- if (!hasError) {
+void VhdlParser::else_wave_list() {if (!hasError) {
+
jj_consume_token(ELSE_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{
- if (!hasError) {
+ case WHEN_T:{if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
expression();
}
+
break;
}
default:
@@ -10321,26 +12060,31 @@ void VhdlParser::else_wave_list() {
;
}
}
+
}
-void VhdlParser::conditional_force_assignment() {
- if (!hasError) {
+void VhdlParser::conditional_force_assignment() {if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
jj_consume_token(FORCE_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IN_T:
- case OUT_T:{
- if (!hasError) {
+ case OUT_T:{if (!hasError) {
+
inout_stat();
}
+
break;
}
default:
@@ -10349,12 +12093,15 @@ void VhdlParser::conditional_force_assignment() {
}
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
case NEW_T:
@@ -10371,13 +12118,15 @@ void VhdlParser::conditional_force_assignment() {
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{
- if (!hasError) {
+ case BIT_STRING_LITERAL:{if (!hasError) {
+
expression();
}
if (!hasError) {
+
else_stat();
}
+
break;
}
default:
@@ -10386,22 +12135,26 @@ void VhdlParser::conditional_force_assignment() {
}
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
void VhdlParser::selected_signal_assignment_wave() {
- if (jj_2_113(2147483647)) {
- if (!hasError) {
+ if (jj_2_114(2147483647)) {if (!hasError) {
+
selected_force_assignment();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WITH_T:{
- if (!hasError) {
+ case WITH_T:{if (!hasError) {
+
selected_waveform_assignment();
}
+
break;
}
default:
@@ -10413,22 +12166,26 @@ void VhdlParser::selected_signal_assignment_wave() {
}
-void VhdlParser::selected_variable_assignment() {
- if (!hasError) {
+void VhdlParser::selected_variable_assignment() {if (!hasError) {
+
jj_consume_token(WITH_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(SELECT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{
- if (!hasError) {
+ case Q_T:{if (!hasError) {
+
jj_consume_token(Q_T);
}
+
break;
}
default:
@@ -10437,31 +12194,37 @@ void VhdlParser::selected_variable_assignment() {
}
}
if (!hasError) {
+
select_name();
}
if (!hasError) {
+
jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
+
sel_var_list();
}
+
}
void VhdlParser::select_name() {
- if (jj_2_114(2147483647)) {
- if (!hasError) {
+ if (jj_2_115(2147483647)) {if (!hasError) {
+
aggregate();
}
+
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
name();
}
+
break;
}
default:
@@ -10473,22 +12236,26 @@ void VhdlParser::select_name() {
}
-void VhdlParser::selected_waveform_assignment() {
- if (!hasError) {
+void VhdlParser::selected_waveform_assignment() {if (!hasError) {
+
jj_consume_token(WITH_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(SELECT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{
- if (!hasError) {
+ case Q_T:{if (!hasError) {
+
jj_consume_token(Q_T);
}
+
break;
}
default:
@@ -10497,19 +12264,23 @@ void VhdlParser::selected_waveform_assignment() {
}
}
if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{
- if (!hasError) {
+ case TRANSPORT_T:{if (!hasError) {
+
delay_mechanism();
}
+
break;
}
default:
@@ -10518,27 +12289,33 @@ void VhdlParser::selected_waveform_assignment() {
}
}
if (!hasError) {
+
sel_wave_list();
}
+
}
-void VhdlParser::selected_force_assignment() {
- if (!hasError) {
+void VhdlParser::selected_force_assignment() {if (!hasError) {
+
jj_consume_token(WITH_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(SELECT_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{
- if (!hasError) {
+ case Q_T:{if (!hasError) {
+
jj_consume_token(Q_T);
}
+
break;
}
default:
@@ -10547,21 +12324,26 @@ void VhdlParser::selected_force_assignment() {
}
}
if (!hasError) {
+
target();
}
if (!hasError) {
+
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
+
jj_consume_token(FORCE_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IN_T:
- case OUT_T:{
- if (!hasError) {
+ case OUT_T:{if (!hasError) {
+
inout_stat();
}
+
break;
}
default:
@@ -10570,34 +12352,41 @@ void VhdlParser::selected_force_assignment() {
}
}
if (!hasError) {
+
sel_var_list();
}
+
}
-void VhdlParser::sel_var_list() {
- if (!hasError) {
+void VhdlParser::sel_var_list() {if (!hasError) {
if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
choices();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMMA_T:{
- if (!hasError) {
+ case COMMA_T:{if (!hasError) {
+
jj_consume_token(COMMA_T);
}
+
break;
}
- case SEMI_T:{
- if (!hasError) {
+ case SEMI_T:{if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -10606,35 +12395,42 @@ void VhdlParser::sel_var_list() {
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
}
if (!hasError) {
+
while (!hasError) {
- if (jj_2_115(2147483647)) {
+ if (jj_2_116(2147483647)) {
;
} else {
goto end_label_55;
- }
- if (!hasError) {
+ }if (!hasError) {
+
expression();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
choices();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMMA_T:{
- if (!hasError) {
+ case COMMA_T:{if (!hasError) {
+
jj_consume_token(COMMA_T);
}
+
break;
}
- case SEMI_T:{
- if (!hasError) {
+ case SEMI_T:{if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
break;
}
default:
@@ -10643,23 +12439,28 @@ void VhdlParser::sel_var_list() {
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
}
end_label_55: ;
}
+
}
-void VhdlParser::sel_wave_list() {
- if (!hasError) {
+void VhdlParser::sel_wave_list() {if (!hasError) {
+
waveform_element();
}
if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
choices();
}
if (!hasError) {
+
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -10669,34 +12470,40 @@ void VhdlParser::sel_wave_list() {
default:
jj_la1[281] = jj_gen;
goto end_label_56;
- }
- if (!hasError) {
+ }if (!hasError) {
+
jj_consume_token(COMMA_T);
}
if (!hasError) {
+
sel_wave_list();
}
+
}
end_label_56: ;
}
if (!hasError) {
+
jj_consume_token(SEMI_T);
}
+
}
void VhdlParser::inout_stat() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IN_T:{
- if (!hasError) {
+ case IN_T:{if (!hasError) {
+
jj_consume_token(IN_T);
}
+
break;
}
- case OUT_T:{
- if (!hasError) {
+ case OUT_T:{if (!hasError) {
+
jj_consume_token(OUT_T);
}
+
break;
}
default:
@@ -10707,24 +12514,28 @@ void VhdlParser::inout_stat() {
}
-void VhdlParser::else_stat() {
- if (!hasError) {
- while (!hasError) {
- if (!hasError) {
+void VhdlParser::else_stat() {if (!hasError) {
+
+ while (!hasError) {if (!hasError) {
+
jj_consume_token(ELSE_T);
}
if (!hasError) {
+
expression();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{
- if (!hasError) {
+ case WHEN_T:{if (!hasError) {
+
jj_consume_token(WHEN_T);
}
if (!hasError) {
+
expression();
}
+
break;
}
default:
@@ -10732,6 +12543,7 @@ void VhdlParser::else_stat() {
;
}
}
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ELSE_T:{
;
@@ -10744,29 +12556,34 @@ void VhdlParser::else_stat() {
}
end_label_57: ;
}
+
}
QCString VhdlParser::interface_subprogram_declaration() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROCEDURE_T:{
- if (!hasError) {
+ case PROCEDURE_T:{if (!hasError) {
+
s = iproc();
}
if (!hasError) {
+
return s;
}
+
break;
}
case FUNCTION_T:
case IMPURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
s = ifunc();
}
if (!hasError) {
+
return s;
}
+
break;
}
default:
@@ -10778,38 +12595,43 @@ assert(false);
}
-QCString VhdlParser::iproc() {QCString s,s1;
- if (!hasError) {
+QCString VhdlParser::iproc() {QCString s,s1;if (!hasError) {
+
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
+
s = identifier();
}
if (!hasError) {
+
s1 = param();
}
+
current->name=s;
return "procedure "+s+s1;
assert(false);
}
-QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;
- if (!hasError) {
+QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IMPURE_T:
case PURE_T:{
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
t = jj_consume_token(PURE_T);
}
+
break;
}
- case IMPURE_T:{
- if (!hasError) {
+ case IMPURE_T:{if (!hasError) {
+
t = jj_consume_token(IMPURE_T);
}
+
break;
}
default:
@@ -10825,39 +12647,48 @@ QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *
}
}
if (!hasError) {
+
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
+
s = name();
}
if (!hasError) {
+
s1 = param();
}
if (!hasError) {
+
jj_consume_token(RETURN_T);
}
if (!hasError) {
+
s2 = name();
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{
- if (!hasError) {
+ case IS_T:{if (!hasError) {
+
t1 = jj_consume_token(IS_T);
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
s3 = identifier();
}
+
break;
}
- case BOX_T:{
- if (!hasError) {
+ case BOX_T:{if (!hasError) {
+
t2 = jj_consume_token(BOX_T);
}
+
break;
}
default:
@@ -10866,6 +12697,7 @@ QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
+
break;
}
default:
@@ -10873,6 +12705,7 @@ QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *
;
}
}
+
QCString q;
if(t) q=t->image.data();
if(t2) s3="<>";
@@ -10895,13 +12728,14 @@ assert(false);
}
-QCString VhdlParser::param() {QCString s,s1;Token *tok=0;
- if (!hasError) {
+QCString VhdlParser::param() {QCString s,s1;Token *tok=0;if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PARAMETER_T:{
- if (!hasError) {
+ case PARAMETER_T:{if (!hasError) {
+
tok = jj_consume_token(PARAMETER_T);
}
+
break;
}
default:
@@ -10910,20 +12744,25 @@ QCString VhdlParser::param() {QCString s,s1;Token *tok=0;
}
}
if (!hasError) {
+
param_sec=PARAM_SEC;
}
if (!hasError) {
+
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{
- if (!hasError) {
+ case LPAREN_T:{if (!hasError) {
+
jj_consume_token(LPAREN_T);
}
if (!hasError) {
+
s1 = interface_list();
}
if (!hasError) {
+
jj_consume_token(RPAREN_T);
}
+
break;
}
default:
@@ -10931,6 +12770,7 @@ param_sec=PARAM_SEC;
;
}
}
+
if(tok)
{
s = tok->image.data();
@@ -10947,19 +12787,21 @@ void VhdlParser::parseInline() {
case POSTPONED_T:
case PROCESS_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{
- if (!hasError) {
+ case EXTENDED_CHARACTER:{if (!hasError) {
+
process_statement();
}
+
break;
}
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{
- if (!hasError) {
+ case PURE_T:{if (!hasError) {
+
subprogram_declaration();
}
+
break;
}
default:
@@ -10970,31 +12812,33 @@ void VhdlParser::parseInline() {
}
- VhdlParser::VhdlParser(TokenManager *tokenManager){
- head = nullptr;
- ReInit(tokenManager);
+ VhdlParser::VhdlParser(TokenManager *tm){
+ head = NULL;
+ errorHandlerCreated = false;
+ ReInit(tm);
}
VhdlParser::~VhdlParser()
{
clear();
}
-void VhdlParser::ReInit(TokenManager* tokenManager){
+void VhdlParser::ReInit(TokenManager *tm){
clear();
errorHandler = new ErrorHandler();
+ errorHandlerCreated = true;
hasError = false;
- token_source = tokenManager;
+ token_source = tm;
head = token = new Token();
token->kind = 0;
- token->next = nullptr;
+ token->next = NULL;
jj_lookingAhead = false;
jj_rescan = false;
jj_done = false;
- jj_scanpos = jj_lastpos = nullptr;
+ jj_scanpos = jj_lastpos = NULL;
jj_gc = 0;
jj_kind = -1;
- indent = 0;
- trace = false;
+ trace_indent = 0;
+ trace_enabled = false;
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 293; i++) jj_la1[i] = -1;
@@ -11013,25 +12857,25 @@ void VhdlParser::clear(){
t = next;
}
}
- if (errorHandler) {
- delete errorHandler, errorHandler = nullptr;
+ if (errorHandlerCreated) {
+ delete errorHandler;
}
}
Token * VhdlParser::jj_consume_token(int kind) {
Token *oldToken;
- if ((oldToken = token)->next != nullptr) token = token->next;
+ if ((oldToken = token)->next != NULL) token = token->next;
else token = token->next = token_source->getNextToken();
jj_ntk = -1;
if (token->kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
- for (int i = 0; i < 115; i++) {
+ for (int i = 0; i < 116; i++) {
JJCalls *c = &jj_2_rtns[i];
- while (c != nullptr) {
- if (c->gen < jj_gen) c->first = nullptr;
+ while (c != NULL) {
+ if (c->gen < jj_gen) c->first = NULL;
c = c->next;
}
}
@@ -11040,7 +12884,7 @@ Token * VhdlParser::jj_consume_token(int kind) {
}
token = oldToken;
jj_kind = kind;
- JJString image = kind >= 0 ? tokenImage[kind] : tokenImage[0];
+ JAVACC_STRING_TYPE image = kind >= 0 ? tokenImage[kind] : tokenImage[0];
errorHandler->handleUnexpectedToken(kind, image.substr(1, image.size() - 2), getToken(1), this);
hasError = true;
return token;
@@ -11050,7 +12894,7 @@ Token * VhdlParser::jj_consume_token(int kind) {
bool VhdlParser::jj_scan_token(int kind){
if (jj_scanpos == jj_lastpos) {
jj_la--;
- if (jj_scanpos->next == nullptr) {
+ if (jj_scanpos->next == NULL) {
jj_lastpos = jj_scanpos = jj_scanpos->next = token_source->getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos->next;
@@ -11060,8 +12904,8 @@ bool VhdlParser::jj_scan_token(int kind){
}
if (jj_rescan) {
int i = 0; Token *tok = token;
- while (tok != nullptr && tok != jj_scanpos) { i++; tok = tok->next; }
- if (tok != nullptr) jj_add_error_token(kind, i);
+ while (tok != NULL && tok != jj_scanpos) { i++; tok = tok->next; }
+ if (tok != NULL) jj_add_error_token(kind, i);
}
if (jj_scanpos->kind != kind) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) { return jj_done = true; }
@@ -11072,7 +12916,7 @@ bool VhdlParser::jj_scan_token(int kind){
/** Get the next Token. */
Token * VhdlParser::getNextToken(){
- if (token->next != nullptr) token = token->next;
+ if (token->next != NULL) token = token->next;
else token = token->next = token_source->getNextToken();
jj_ntk = -1;
jj_gen++;
@@ -11084,7 +12928,7 @@ Token * VhdlParser::getNextToken(){
Token * VhdlParser::getToken(int index){
Token *t = token;
for (int i = 0; i < index; i++) {
- if (t->next != nullptr) t = t->next;
+ if (t->next != NULL) t = t->next;
else t = t->next = token_source->getNextToken();
}
return t;
@@ -11092,7 +12936,7 @@ Token * VhdlParser::getToken(int index){
int VhdlParser::jj_ntk_f(){
- if ((jj_nt=token->next) == nullptr)
+ if ((jj_nt=token->next) == NULL)
return (jj_ntk = (token->next=token_source->getNextToken())->kind);
else
return (jj_ntk = jj_nt->kind);
@@ -11108,11 +12952,6 @@ int VhdlParser::jj_ntk_f(){
}
- bool VhdlParser::trace_enabled() {
- return trace;
- }
-
-
void VhdlParser::enable_tracing() {
}
@@ -11122,7 +12961,7 @@ int VhdlParser::jj_ntk_f(){
void VhdlParser::jj_rescan_token(){
jj_rescan = true;
- for (int i = 0; i < 115; i++) {
+ for (int i = 0; i < 116; i++) {
JJCalls *p = &jj_2_rtns[i];
do {
if (p->gen > jj_gen) {
@@ -11243,10 +13082,11 @@ int VhdlParser::jj_ntk_f(){
case 112: jj_3_113(); break;
case 113: jj_3_114(); break;
case 114: jj_3_115(); break;
+ case 115: jj_3_116(); break;
}
}
p = p->next;
- } while (p != nullptr);
+ } while (p != NULL);
}
jj_rescan = false;
}
@@ -11255,7 +13095,7 @@ int VhdlParser::jj_ntk_f(){
void VhdlParser::jj_save(int index, int xla){
JJCalls *p = &jj_2_rtns[index];
while (p->gen > jj_gen) {
- if (p->next == nullptr) { p = p->next = new JJCalls(); break; }
+ if (p->next == NULL) { p = p->next = new JJCalls(); break; }
p = p->next;
}
p->gen = jj_gen + xla - jj_la; p->first = token; p->arg = xla;
diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h
index a9f14d1..efdfe33 100644
--- a/vhdlparser/VhdlParser.h
+++ b/vhdlparser/VhdlParser.h
@@ -4,7 +4,9 @@
#include "CharStream.h"
#include "Token.h"
#include "TokenManager.h"
+#include "VhdlParserTokenManager.h"
#include "vhdljjparser.h"
+
#include "VhdlParserConstants.h"
#include "ErrorHandler.h"
namespace vhdl {
@@ -15,288 +17,566 @@ namespace parser {
JJCalls* next;
Token* first;
~JJCalls() { if (next) delete next; }
- JJCalls() { next = nullptr; arg = 0; gen = -1; first = nullptr; }
+ JJCalls() { next = NULL; arg = 0; gen = -1; first = NULL; }
};
class VhdlParser {
-public:
+ public:
+
QCString abstract_literal();
+
QCString access_type_definition();
+
QCString actual_designator();
+
QCString actual_parameter_part();
+
QCString actual_part();
+
QCString adding_operator();
+
QCString aggregate();
+
QCString alias_declaration();
+
QCString alias_designator();
+
void allocator();
+
void architecture_body();
+
void architecture_declarative_part();
+
void architecture_statement_part();
+
QCString array_type_definition();
+
QCString assertion();
+
QCString assertion_statement();
+
QCString association_element();
+
QCString association_list();
+
QCString attribute_declaration();
+
QCString attribute_designator();
+
QCString attribute_name();
+
QCString attribute_specification();
+
QCString base();
+
QCString base_specifier();
+
QCString base_unit_declaration();
+
QCString based_integer();
+
QCString based_literal();
+
QCString basic_identifier();
+
void binding_indication();
+
QCString bit_string_literal();
+
QCString bit_value();
+
void block_configuration();
+
void block_declarative_item();
+
void block_declarative_part();
+
void block_header();
+
void block_specification();
+
void block_statement();
+
void block_statement_part();
+
void case_statement();
+
void case_statement_alternative();
+
QCString character_literal();
+
QCString choice();
+
QCString choices();
+
void component_configuration();
+
void component_declaration();
+
void component_instantiation_statement();
+
void component_specification();
+
QCString composite_type_definition();
+
void concurrent_assertion_statement();
+
void concurrent_procedure_call_statement();
+
void concurrent_signal_assignment_statement();
+
void concurrent_statement();
+
QCString condition();
+
QCString condition_clause();
+
void conditional_signal_assignment();
+
void conditional_waveforms();
+
void configuration_declaration();
+
void configuration_declarative_item();
+
void configuration_declarative_part();
+
void configuration_item();
+
void configuration_specification();
+
QCString constant_declaration();
+
QCString constraint_array_definition();
+
void context_clause();
+
QCString constraint();
+
void context_item();
+
QCString decimal_literal();
+
QCString delay_mechanism();
+
void design_file();
+
void design_unit();
+
QCString designator();
+
QCString direction();
+
void disconnection_specification();
+
void guarded_signal_specificatio();
+
QCString discrete_range();
+
QCString element_association();
+
QCString element_declaration();
+
QCString entity_aspect();
+
QCString entity_class();
+
QCString entity_class_entry();
+
QCString entity_class_entry_list();
+
void entity_declaration();
+
void entity_declarative_item();
+
void entity_declarative_part();
+
QCString entity_designator();
+
void entity_header();
+
QCString entity_name_list();
+
QCString entity_specification();
+
void entity_statement();
+
void entity_statement_part();
+
QCString entity_tag();
+
QCString enumeration_literal();
+
QCString enumeration_type_definition();
+
QCString exit_statement();
+
QCString expression();
+
QCString logop();
+
QCString extended_identifier();
+
QCString factor();
+
QCString file_declaration();
+
QCString file_logical_name();
+
QCString file_open_information();
+
QCString file_type_definition();
+
QCString floating_type_definition();
+
QCString formal_designator();
+
QCString formal_parameter_list();
+
QCString formal_part();
+
QCString full_type_declaration();
+
QCString function_call();
+
void generate_statement();
+
void generate_scheme();
+
void generic_clause();
+
QCString generic_list();
+
void generic_map_aspect();
+
QCString group_constituent();
+
QCString group_constituent_list();
+
QCString group_declaration();
+
QCString group_template_declaration();
+
void guarded_signal_specification();
+
QCString identifier();
+
QCString identifier_list();
+
void if_statement();
+
QCString incomplete_type_declaration();
+
QCString index_constraint();
+
QCString index_specification();
+
QCString index_subtype_definition();
+
QCString instantiation_unit();
+
QCString instantiation_list();
+
QCString integer();
+
QCString integer_type_definition();
+
QCString interface_declaration();
+
QCString interface_element();
+
QCString interface_file_declaration();
+
QCString interface_list();
+
QCString interface_variable_declaration();
+
QCString iteration_scheme();
+
QCString label();
+
QCString library_clause();
+
QCString library_unit();
+
QCString literal();
+
QCString logical_operator();
+
QCString loop_statement();
+
QCString miscellaneous_operator();
+
QCString mode();
+
QCString multiplying_operation();
+
QCString name();
+
QCString name_ext1();
+
QCString name_ext();
+
QCString test_att_name();
+
QCString indexed_name();
+
QCString next_statement();
+
QCString null_statement();
+
QCString numeric_literal();
+
QCString object_class();
+
QCString operator_symbol();
+
void options();
+
void package_body();
+
void package_body_declarative_item();
+
void package_body_declarative_part();
+
void package_declaration();
+
void geninter();
+
void package_declarative_item();
+
void package_declarative_part();
+
QCString parameter_specification();
+
QCString physical_literal();
+
QCString physical_type_definition();
+
void port_clause();
+
QCString port_list();
+
void port_map_aspect();
+
QCString primary();
+
void primary_unit();
+
QCString procedure_call();
+
QCString procedure_call_statement();
+
QCString process_declarative_item();
+
QCString process_declarative_part();
+
void process_statement();
+
void process_statement_part();
+
QCString qualified_expression();
+
QCString range();
+
QCString range_constraint();
+
void record_type_definition();
+
QCString relation();
+
QCString relation_operator();
+
QCString report_statement();
+
QCString return_statement();
+
QCString scalar_type_definition();
+
void secondary_unit();
+
QCString secondary_unit_declaration();
+
QCString selected_name();
+
void selected_signal_assignment();
+
void selected_waveforms();
+
QCString sensitivity_clause();
+
QCString sensitivity_list();
+
QCString sequence_of_statement();
+
QCString sequential_statement();
+
QCString shift_expression();
+
QCString shift_operator();
+
QCString sign();
+
QCString signal_assignment_statement();
+
void semi();
+
void signal_declaration();
+
QCString signal_kind();
+
QCString signal_list();
+
QCString signature();
+
QCString simple_expression();
+
void simple_name();
+
QCString slice_name();
+
QCString string_literal();
+
void subprogram_body();
+
void subprogram_declaration();
+
void subprogram_1();
+
QCString subprogram_declarative_item();
+
QCString subprogram_declarative_part();
+
void subprogram_kind();
+
void subprogram_specification();
+
void subprogram_statement_part();
+
QCString subtype_declaration();
+
QCString subtype_indication();
+
QCString suffix();
+
QCString target();
+
QCString term();
+
QCString timeout_clause();
+
QCString type_conversion();
+
QCString type_declaration();
+
QCString type_definition();
+
QCString type_mark();
+
QCString unconstraint_array_definition();
+
QCString use_clause();
+
QCString variable_assignment_statement();
+
QCString variable_declaration();
+
QCString wait_statement();
+
QCString waveform();
+
QCString waveform_element();
+
QCString protected_type_body();
+
void protected_type_body_declarative_item();
+
void protected_type_body_declarative_part();
+
QCString protected_type_declaration();
+
void protected_type_declarative_item();
+
void protected_type_declarative_part();
+
QCString context_ref();
+
void context_declaration();
+
QCString libustcont_stats();
+
void package_instantiation_declaration();
+
QCString interface_package_declaration();
+
QCString subprogram_instantiation_declaration();
+
void gen_assoc_list();
+
void gen_interface_list();
+
void case_scheme();
+
void when_stats();
+
void ttend();
+
void generate_statement_body();
+
void generate_statement_body1();
+
QCString external_name();
+
QCString sig_stat();
+
QCString external_pathname();
+
QCString absolute_pathname();
+
QCString relative_pathname();
+
QCString neg_list();
+
QCString pathname_element();
+
QCString pathname_element_list();
+
QCString package_path_name();
+
void conditional_signal_assignment_wave();
+
void conditional_waveform_assignment();
+
void else_wave_list();
+
void conditional_force_assignment();
+
void selected_signal_assignment_wave();
+
void selected_variable_assignment();
+
void select_name();
+
void selected_waveform_assignment();
+
void selected_force_assignment();
+
void sel_var_list();
+
void sel_wave_list();
+
void inout_stat();
+
void else_stat();
+
QCString interface_subprogram_declaration();
+
QCString iproc();
+
QCString ifunc();
+
QCString param();
+
void parseInline();
inline bool jj_2_1(int xla)
{
@@ -1218,6 +1498,14 @@ void parseInline();
{ jj_save(114, xla); }
}
+ inline bool jj_2_116(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_116() || jj_done);
+ { jj_save(115, xla); }
+ }
+
inline bool jj_3_43()
{
if (jj_done) return true;
@@ -1240,26 +1528,27 @@ void parseInline();
return false;
}
- inline bool jj_3R_442()
+ inline bool jj_3R_443()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_407()) return true;
+ if (jj_3R_408()) return true;
return false;
}
- inline bool jj_3R_366()
+ inline bool jj_3R_367()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_441()) return false;
+ if (jj_3R_442()) {
jj_scanpos = xsp;
- if (jj_3R_442()) return true;
+ if (jj_3R_443()) return true;
+ }
return false;
}
- inline bool jj_3R_441()
+ inline bool jj_3R_442()
{
if (jj_done) return true;
if (jj_scan_token(WHILE_T)) return true;
@@ -1270,19 +1559,19 @@ void parseInline();
inline bool jj_3R_197()
{
if (jj_done) return true;
- if (jj_3R_345()) return true;
+ if (jj_3R_346()) return true;
return false;
}
- inline bool jj_3R_399()
+ inline bool jj_3R_400()
{
if (jj_done) return true;
if (jj_scan_token(SEMI_T)) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_399()) return true;
return false;
}
- inline bool jj_3R_411()
+ inline bool jj_3R_412()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -1296,13 +1585,16 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(116)) return false;
+ if (jj_scan_token(116)) {
jj_scanpos = xsp;
- if (!jj_scan_token(100)) return false;
+ if (jj_scan_token(100)) {
jj_scanpos = xsp;
- if (!jj_scan_token(31)) return false;
+ if (jj_scan_token(31)) {
jj_scanpos = xsp;
if (jj_scan_token(101)) return true;
+ }
+ }
+ }
return false;
}
@@ -1324,14 +1616,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_312()
+ inline bool jj_3R_313()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_399()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_399()) { jj_scanpos = xsp; break; }
+ if (jj_3R_400()) { jj_scanpos = xsp; break; }
}
return false;
}
@@ -1346,10 +1638,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_398()
+ inline bool jj_3R_399()
{
if (jj_done) return true;
- if (jj_3R_489()) return true;
+ if (jj_3R_490()) return true;
return false;
}
@@ -1360,15 +1652,15 @@ void parseInline();
return false;
}
- inline bool jj_3R_557()
+ inline bool jj_3R_558()
{
if (jj_done) return true;
- if (jj_3R_612()) return true;
+ if (jj_3R_613()) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_556()
+ inline bool jj_3R_557()
{
if (jj_done) return true;
if (jj_3R_92()) return true;
@@ -1389,7 +1681,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_555()
+ inline bool jj_3R_556()
{
if (jj_done) return true;
if (jj_3R_107()) return true;
@@ -1403,22 +1695,27 @@ void parseInline();
return false;
}
- inline bool jj_3R_489()
+ inline bool jj_3R_490()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_39()) return false;
+ if (jj_3_39()) {
jj_scanpos = xsp;
- if (!jj_3R_555()) return false;
+ if (jj_3R_556()) {
jj_scanpos = xsp;
- if (!jj_3_40()) return false;
+ if (jj_3_40()) {
jj_scanpos = xsp;
- if (!jj_3_41()) return false;
+ if (jj_3_41()) {
jj_scanpos = xsp;
- if (!jj_3R_556()) return false;
+ if (jj_3R_557()) {
jj_scanpos = xsp;
- if (jj_3R_557()) return true;
+ if (jj_3R_558()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
@@ -1438,55 +1735,57 @@ void parseInline();
return false;
}
- inline bool jj_3R_624()
+ inline bool jj_3R_625()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_414()
+ inline bool jj_3R_696()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_413()
+ inline bool jj_3R_415()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_695()
+ inline bool jj_3R_414()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_330()
+ inline bool jj_3R_331()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_412()) return false;
+ if (jj_3R_413()) {
jj_scanpos = xsp;
- if (!jj_3R_413()) return false;
+ if (jj_3R_414()) {
jj_scanpos = xsp;
- if (jj_3R_414()) return true;
+ if (jj_3R_415()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_412()
+ inline bool jj_3R_413()
{
if (jj_done) return true;
if (jj_3R_196()) return true;
return false;
}
- inline bool jj_3R_327()
+ inline bool jj_3R_328()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
@@ -1494,7 +1793,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_326()
+ inline bool jj_3R_327()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
@@ -1503,7 +1802,20 @@ void parseInline();
if (jj_3_38()) jj_scanpos = xsp;
if (jj_3R_59()) return true;
xsp = jj_scanpos;
- if (jj_3R_411()) jj_scanpos = xsp;
+ if (jj_3R_412()) jj_scanpos = xsp;
+ return false;
+ }
+
+ inline bool jj_3R_426()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(IS_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_696()) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(145)) return true;
+ }
return false;
}
@@ -1512,11 +1824,13 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_325()) return false;
+ if (jj_3R_326()) {
jj_scanpos = xsp;
- if (!jj_3R_326()) return false;
+ if (jj_3R_327()) {
jj_scanpos = xsp;
- if (jj_3R_327()) return true;
+ if (jj_3R_328()) return true;
+ }
+ }
return false;
}
@@ -1527,7 +1841,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_325()
+ inline bool jj_3R_326()
{
if (jj_done) return true;
Token * xsp;
@@ -1537,18 +1851,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_425()
- {
- if (jj_done) return true;
- if (jj_scan_token(IS_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_695()) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(145)) return true;
- return false;
- }
-
inline bool jj_3R_154()
{
if (jj_done) return true;
@@ -1558,28 +1860,29 @@ void parseInline();
return false;
}
- inline bool jj_3R_621()
+ inline bool jj_3R_622()
{
if (jj_done) return true;
if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_620()
+ inline bool jj_3R_621()
{
if (jj_done) return true;
if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_564()
+ inline bool jj_3R_565()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_620()) return false;
+ if (jj_3R_621()) {
jj_scanpos = xsp;
- if (jj_3R_621()) return true;
+ if (jj_3R_622()) return true;
+ }
return false;
}
@@ -1597,7 +1900,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_531()
+ inline bool jj_3R_532()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
@@ -1606,42 +1909,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_623()
+ inline bool jj_3R_624()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_258()) return true;
+ if (jj_3R_259()) return true;
return false;
}
- inline bool jj_3R_622()
+ inline bool jj_3R_623()
{
if (jj_done) return true;
if (jj_scan_token(ELSIF_T)) return true;
if (jj_3R_79()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_258()) return true;
+ if (jj_3R_259()) return true;
return false;
}
- inline bool jj_3R_344()
+ inline bool jj_3R_520()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_313()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_519()
+ inline bool jj_3R_345()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_312()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_254()
+ inline bool jj_3R_255()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -1654,21 +1957,21 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_254()) jj_scanpos = xsp;
+ if (jj_3R_255()) jj_scanpos = xsp;
if (jj_scan_token(IF_T)) return true;
if (jj_3R_79()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_258()) return true;
+ if (jj_3R_259()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_622()) { jj_scanpos = xsp; break; }
+ if (jj_3R_623()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_623()) jj_scanpos = xsp;
+ if (jj_3R_624()) jj_scanpos = xsp;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(IF_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_624()) jj_scanpos = xsp;
+ if (jj_3R_625()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -1680,34 +1983,34 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_344()) { jj_scanpos = xsp; break; }
+ if (jj_3R_345()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_423()
+ inline bool jj_3R_424()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(77)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_519()) jj_scanpos = xsp;
+ if (jj_3R_520()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_164()
+ inline bool jj_3_116()
{
if (jj_done) return true;
- if (jj_scan_token(BASIC_IDENTIFIER)) return true;
+ if (jj_3R_58()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
return false;
}
- inline bool jj_3_115()
+ inline bool jj_3R_164()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(WHEN_T)) return true;
+ if (jj_scan_token(BASIC_IDENTIFIER)) return true;
return false;
}
@@ -1723,21 +2026,22 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_163()) return false;
+ if (jj_3R_163()) {
jj_scanpos = xsp;
if (jj_3R_164()) return true;
+ }
return false;
}
- inline bool jj_3R_544()
+ inline bool jj_3R_545()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_543()) return true;
+ if (jj_3R_544()) return true;
return false;
}
- inline bool jj_3R_385()
+ inline bool jj_3R_386()
{
if (jj_done) return true;
if (jj_3R_58()) return true;
@@ -1745,41 +2049,42 @@ void parseInline();
if (jj_3R_85()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(134)) return false;
+ if (jj_scan_token(134)) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
return false;
}
- inline bool jj_3R_65()
+ inline bool jj_3R_446()
{
if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_473()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_529()) return true;
return false;
}
- inline bool jj_3R_445()
+ inline bool jj_3R_530()
{
if (jj_done) return true;
- if (jj_3R_528()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_448()) return true;
return false;
}
- inline bool jj_3R_529()
+ inline bool jj_3R_65()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_447()) return true;
+ if (jj_scan_token(GROUP_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_474()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_545()
+ inline bool jj_3R_546()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
@@ -1787,137 +2092,132 @@ void parseInline();
return false;
}
- inline bool jj_3R_304()
- {
- if (jj_done) return true;
- if (jj_3R_383()) return true;
- return false;
- }
-
- inline bool jj_3R_382()
+ inline bool jj_3R_305()
{
if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_474()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_384()) return true;
return false;
}
- inline bool jj_3R_424()
+ inline bool jj_3R_425()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(84)) return false;
+ if (jj_scan_token(84)) {
jj_scanpos = xsp;
if (jj_scan_token(52)) return true;
+ }
return false;
}
- inline bool jj_3R_343()
+ inline bool jj_3R_344()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_424()) jj_scanpos = xsp;
+ if (jj_3R_425()) jj_scanpos = xsp;
if (jj_scan_token(FUNCTION_T)) return true;
if (jj_3R_59()) return true;
- if (jj_3R_423()) return true;
+ if (jj_3R_424()) return true;
if (jj_scan_token(RETURN_T)) return true;
if (jj_3R_59()) return true;
xsp = jj_scanpos;
- if (jj_3R_425()) jj_scanpos = xsp;
+ if (jj_3R_426()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_474()
+ inline bool jj_3R_383()
{
if (jj_done) return true;
- if (jj_3R_543()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_544()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(GROUP_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_475()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_607()
+ inline bool jj_3R_475()
{
if (jj_done) return true;
- if (jj_3R_351()) return true;
+ if (jj_3R_544()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_545()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_303()
+ inline bool jj_3R_304()
{
if (jj_done) return true;
if (jj_3R_58()) return true;
- if (jj_3R_384()) return true;
+ if (jj_3R_385()) return true;
return false;
}
- inline bool jj_3R_342()
+ inline bool jj_3R_343()
{
if (jj_done) return true;
if (jj_scan_token(PROCEDURE_T)) return true;
if (jj_3R_69()) return true;
- if (jj_3R_423()) return true;
+ if (jj_3R_424()) return true;
return false;
}
- inline bool jj_3R_606()
+ inline bool jj_3R_608()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_352()) return true;
return false;
}
- inline bool jj_3R_543()
+ inline bool jj_3R_607()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_606()) return false;
- jj_scanpos = xsp;
- if (jj_3R_607()) return true;
+ if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_70()
+ inline bool jj_3R_544()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(MAP_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_165()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_607()) {
+ jj_scanpos = xsp;
+ if (jj_3R_608()) return true;
+ }
return false;
}
inline bool jj_3R_194()
{
if (jj_done) return true;
- if (jj_3R_343()) return true;
+ if (jj_3R_344()) return true;
return false;
}
- inline bool jj_3R_170()
+ inline bool jj_3R_70()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(MAP_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_165()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3R_193()
{
if (jj_done) return true;
- if (jj_3R_342()) return true;
+ if (jj_3R_343()) return true;
return false;
}
@@ -1926,42 +2226,50 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_193()) return false;
+ if (jj_3R_193()) {
jj_scanpos = xsp;
if (jj_3R_194()) return true;
+ }
return false;
}
- inline bool jj_3R_158()
+ inline bool jj_3R_170()
{
if (jj_done) return true;
- if (jj_3R_312()) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_475()
+ inline bool jj_3R_476()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
if (jj_3R_58()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_545()) jj_scanpos = xsp;
+ if (jj_3R_546()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_384()
+ inline bool jj_3R_385()
{
if (jj_done) return true;
Token * xsp;
- if (jj_3R_475()) return true;
+ if (jj_3R_476()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_475()) { jj_scanpos = xsp; break; }
+ if (jj_3R_476()) { jj_scanpos = xsp; break; }
}
return false;
}
+ inline bool jj_3R_158()
+ {
+ if (jj_done) return true;
+ if (jj_3R_313()) return true;
+ return false;
+ }
+
inline bool jj_3R_66()
{
if (jj_done) return true;
@@ -1973,25 +2281,26 @@ void parseInline();
return false;
}
- inline bool jj_3R_383()
+ inline bool jj_3R_384()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(53)) return false;
+ if (jj_scan_token(53)) {
jj_scanpos = xsp;
if (jj_scan_token(75)) return true;
+ }
return false;
}
- inline bool jj_3R_446()
+ inline bool jj_3R_447()
{
if (jj_done) return true;
- if (jj_3R_404()) return true;
+ if (jj_3R_405()) return true;
return false;
}
- inline bool jj_3R_321()
+ inline bool jj_3R_322()
{
if (jj_done) return true;
if (jj_scan_token(IF_T)) return true;
@@ -1999,41 +2308,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_168()
+ inline bool jj_3R_448()
{
if (jj_done) return true;
+ if (jj_3R_445()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_85()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_320()) return false;
- jj_scanpos = xsp;
- if (jj_3R_321()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_530()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_320()
+ inline bool jj_3R_168()
{
if (jj_done) return true;
- if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_407()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_321()) {
+ jj_scanpos = xsp;
+ if (jj_3R_322()) return true;
+ }
return false;
}
- inline bool jj_3R_447()
+ inline bool jj_3R_321()
{
if (jj_done) return true;
- if (jj_3R_444()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_529()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_408()) return true;
return false;
}
- inline bool jj_3R_305()
+ inline bool jj_3R_306()
{
if (jj_done) return true;
if (jj_3R_58()) return true;
@@ -2041,41 +2351,25 @@ void parseInline();
if (jj_3R_85()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(134)) return false;
+ if (jj_scan_token(134)) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
while (true) {
xsp = jj_scanpos;
- if (jj_3R_385()) { jj_scanpos = xsp; break; }
+ if (jj_3R_386()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_74()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_168()) return true;
- if (jj_scan_token(GENERATE_T)) return true;
- if (jj_3R_169()) return true;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(GENERATE_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_170()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
- inline bool jj_3R_302()
+ inline bool jj_3R_303()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ if (jj_3R_384()) return true;
return false;
}
- inline bool jj_3_111()
+ inline bool jj_3_112()
{
if (jj_done) return true;
if (jj_3R_142()) return true;
@@ -2083,13 +2377,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_104()
+ inline bool jj_3R_74()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_225()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_168()) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_169()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_170()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -2106,19 +2407,29 @@ void parseInline();
if (jj_scan_token(LESSTHAN_T)) return true;
if (jj_scan_token(FORCE_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_304()) jj_scanpos = xsp;
- if (jj_3R_305()) return true;
+ if (jj_3R_305()) jj_scanpos = xsp;
+ if (jj_3R_306()) return true;
return false;
}
- inline bool jj_3_114()
+ inline bool jj_3R_104()
+ {
+ if (jj_done) return true;
+ if (jj_3R_59()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_226()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3_115()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3R_368()
+ inline bool jj_3R_369()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
@@ -2130,12 +2441,12 @@ void parseInline();
if (jj_3R_114()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_446()) jj_scanpos = xsp;
- if (jj_3R_447()) return true;
+ if (jj_3R_447()) jj_scanpos = xsp;
+ if (jj_3R_448()) return true;
return false;
}
- inline bool jj_3R_300()
+ inline bool jj_3R_301()
{
if (jj_done) return true;
if (jj_3R_142()) return true;
@@ -2143,14 +2454,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_686()
+ inline bool jj_3R_687()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_574()
+ inline bool jj_3R_575()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
@@ -2158,39 +2469,33 @@ void parseInline();
return false;
}
- inline bool jj_3R_685()
+ inline bool jj_3R_686()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3R_662()
+ inline bool jj_3R_663()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_685()) return false;
+ if (jj_3R_686()) {
jj_scanpos = xsp;
- if (jj_3R_686()) return true;
- return false;
- }
-
- inline bool jj_3R_462()
- {
- if (jj_done) return true;
- if (jj_3R_533()) return true;
+ if (jj_3R_687()) return true;
+ }
return false;
}
- inline bool jj_3_113()
+ inline bool jj_3_114()
{
if (jj_done) return true;
if (jj_3R_144()) return true;
return false;
}
- inline bool jj_3R_526()
+ inline bool jj_3R_527()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
@@ -2199,50 +2504,49 @@ void parseInline();
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_662()) return true;
+ if (jj_3R_663()) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_305()) return true;
+ if (jj_3R_306()) return true;
return false;
}
- inline bool jj_3R_443()
+ inline bool jj_3R_444()
{
if (jj_done) return true;
- if (jj_3R_404()) return true;
+ if (jj_3R_405()) return true;
return false;
}
- inline bool jj_3R_270()
+ inline bool jj_3R_463()
{
if (jj_done) return true;
- if (jj_3R_368()) return true;
+ if (jj_3R_534()) return true;
return false;
}
- inline bool jj_3R_127()
+ inline bool jj_3R_271()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_269()) return false;
- jj_scanpos = xsp;
- if (jj_3R_270()) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_269()
+ inline bool jj_3R_127()
{
if (jj_done) return true;
- if (jj_3R_144()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_270()) {
+ jj_scanpos = xsp;
+ if (jj_3R_271()) return true;
+ }
return false;
}
- inline bool jj_3R_156()
+ inline bool jj_3R_270()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_311()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_144()) return true;
return false;
}
@@ -2254,96 +2558,98 @@ void parseInline();
if (jj_scan_token(FORCE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_302()) jj_scanpos = xsp;
+ if (jj_3R_303()) jj_scanpos = xsp;
if (jj_3R_58()) return true;
if (jj_scan_token(WHEN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_303()) jj_scanpos = xsp;
+ if (jj_3R_304()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_136()
+ inline bool jj_3R_156()
{
if (jj_done) return true;
- if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_576()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_312()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_528()
+ inline bool jj_3R_529()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
if (jj_3R_58()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_574()) jj_scanpos = xsp;
+ if (jj_3R_575()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_112()
+ inline bool jj_3_113()
{
if (jj_done) return true;
if (jj_3R_143()) return true;
return false;
}
- inline bool jj_3R_323()
+ inline bool jj_3R_136()
{
if (jj_done) return true;
- if (jj_3R_409()) return true;
+ if (jj_scan_token(TYPE_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_577()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_63()
+ inline bool jj_3R_324()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_156()) jj_scanpos = xsp;
+ if (jj_3R_410()) return true;
return false;
}
- inline bool jj_3R_367()
+ inline bool jj_3R_368()
{
if (jj_done) return true;
if (jj_3R_114()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_443()) jj_scanpos = xsp;
- if (jj_3R_444()) return true;
+ if (jj_3R_444()) jj_scanpos = xsp;
+ if (jj_3R_445()) return true;
if (jj_scan_token(WHEN_T)) return true;
if (jj_3R_58()) return true;
xsp = jj_scanpos;
- if (jj_3R_445()) jj_scanpos = xsp;
+ if (jj_3R_446()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_569()
+ inline bool jj_3R_63()
{
if (jj_done) return true;
- if (jj_3R_312()) return true;
+ if (jj_3R_59()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_156()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_268()
+ inline bool jj_3R_269()
{
if (jj_done) return true;
- if (jj_3R_367()) return true;
+ if (jj_3R_368()) return true;
return false;
}
- inline bool jj_3R_397()
+ inline bool jj_3R_570()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_3R_313()) return true;
return false;
}
@@ -2352,31 +2658,40 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_267()) return false;
+ if (jj_3R_268()) {
jj_scanpos = xsp;
- if (jj_3R_268()) return true;
+ if (jj_3R_269()) return true;
+ }
return false;
}
- inline bool jj_3R_267()
+ inline bool jj_3R_268()
{
if (jj_done) return true;
if (jj_3R_143()) return true;
return false;
}
- inline bool jj_3R_311()
+ inline bool jj_3R_398()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(INTEGER)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_312()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_396()) return false;
+ if (jj_3R_397()) {
jj_scanpos = xsp;
- if (jj_3R_397()) return true;
+ if (jj_3R_398()) return true;
+ }
return false;
}
- inline bool jj_3R_396()
+ inline bool jj_3R_397()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
@@ -2391,12 +2706,12 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_300()) { jj_scanpos = xsp; break; }
+ if (jj_3R_301()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_554()
+ inline bool jj_3R_555()
{
if (jj_done) return true;
if (jj_scan_token(AT_T)) return true;
@@ -2404,7 +2719,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_301()
+ inline bool jj_3R_302()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -2413,14 +2728,14 @@ void parseInline();
return false;
}
- inline bool jj_3_110()
+ inline bool jj_3_111()
{
if (jj_done) return true;
if (jj_3R_141()) return true;
return false;
}
- inline bool jj_3R_656()
+ inline bool jj_3R_657()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
@@ -2429,29 +2744,29 @@ void parseInline();
return false;
}
- inline bool jj_3R_579()
+ inline bool jj_3R_612()
{
if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_141()) return true;
return false;
}
- inline bool jj_3R_611()
+ inline bool jj_3R_580()
{
if (jj_done) return true;
- if (jj_3R_141()) return true;
+ if (jj_scan_token(OPEN_T)) return true;
+ if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_533()
+ inline bool jj_3R_534()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_579()) jj_scanpos = xsp;
+ if (jj_3R_580()) jj_scanpos = xsp;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_580()) return true;
+ if (jj_3R_581()) return true;
return false;
}
@@ -2461,65 +2776,73 @@ void parseInline();
if (jj_3R_69()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_301()) jj_scanpos = xsp;
+ if (jj_3R_302()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_580()
+ inline bool jj_3R_640()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_scan_token(NEG_T)) return true;
+ if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_639()
+ inline bool jj_3R_581()
{
if (jj_done) return true;
- if (jj_scan_token(NEG_T)) return true;
- if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_610()
+ inline bool jj_3R_611()
{
if (jj_done) return true;
Token * xsp;
- if (jj_3R_639()) return true;
+ if (jj_3R_640()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_639()) { jj_scanpos = xsp; break; }
+ if (jj_3R_640()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_448()
+ inline bool jj_3_110()
{
if (jj_done) return true;
- if (jj_scan_token(DOUBLEMULT_T)) return true;
- if (jj_3R_369()) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_141()) return true;
return false;
}
- inline bool jj_3_109()
+ inline bool jj_3R_554()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_141()) return true;
+ if (jj_3R_611()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_612()) jj_scanpos = xsp;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_553()
+ inline bool jj_3R_449()
{
if (jj_done) return true;
- if (jj_3R_610()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_611()) jj_scanpos = xsp;
+ if (jj_scan_token(DOUBLEMULT_T)) return true;
+ if (jj_3R_370()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_610()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(DOT_T)) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_375()
+ inline bool jj_3R_376()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
@@ -2528,12 +2851,12 @@ void parseInline();
if (jj_3R_84()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_462()) jj_scanpos = xsp;
+ if (jj_3R_463()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_263()
+ inline bool jj_3R_264()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -2544,43 +2867,50 @@ void parseInline();
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_141()) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_283()
+ inline bool jj_3R_553()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_609()) {
+ jj_scanpos = xsp;
+ if (jj_3R_610()) return true;
+ }
+ return false;
+ }
+
+ inline bool jj_3R_284()
{
if (jj_done) return true;
if (jj_scan_token(NOT_T)) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_370()) return true;
return false;
}
- inline bool jj_3R_282()
+ inline bool jj_3R_283()
{
if (jj_done) return true;
if (jj_scan_token(ABS_T)) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_370()) return true;
return false;
}
- inline bool jj_3R_608()
+ inline bool jj_3R_489()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_141()) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_555()) return true;
return false;
}
- inline bool jj_3R_552()
+ inline bool jj_3R_488()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_608()) return false;
- jj_scanpos = xsp;
- if (jj_3R_609()) return true;
+ if (jj_3R_554()) return true;
return false;
}
@@ -2589,28 +2919,38 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_281()) return false;
+ if (jj_3R_282()) {
jj_scanpos = xsp;
- if (!jj_3R_282()) return false;
+ if (jj_3R_283()) {
jj_scanpos = xsp;
- if (jj_3R_283()) return true;
+ if (jj_3R_284()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_281()
+ inline bool jj_3R_282()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_370()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_448()) jj_scanpos = xsp;
+ if (jj_3R_449()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_488()
+ inline bool jj_3R_396()
{
if (jj_done) return true;
- if (jj_3R_554()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_487()) {
+ jj_scanpos = xsp;
+ if (jj_3R_488()) {
+ jj_scanpos = xsp;
+ if (jj_3R_489()) return true;
+ }
+ }
return false;
}
@@ -2621,155 +2961,154 @@ void parseInline();
return false;
}
- inline bool jj_3R_395()
+ inline bool jj_3_107()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_486()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_487()) return false;
- jj_scanpos = xsp;
- if (jj_3R_488()) return true;
+ if (jj_3R_138()) return true;
return false;
}
- inline bool jj_3R_486()
+ inline bool jj_3R_697()
{
if (jj_done) return true;
- if (jj_3R_552()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_696()
+ inline bool jj_3R_486()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_96()) return true;
+ if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
inline bool jj_3R_146()
{
if (jj_done) return true;
- if (jj_3R_308()) return true;
+ if (jj_3R_309()) return true;
if (jj_3R_145()) return true;
return false;
}
- inline bool jj_3_106()
+ inline bool jj_3R_485()
{
if (jj_done) return true;
- if (jj_3R_138()) return true;
+ if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_393()
+ inline bool jj_3R_394()
{
if (jj_done) return true;
if (jj_scan_token(OR_T)) return true;
return false;
}
- inline bool jj_3R_392()
+ inline bool jj_3R_393()
{
if (jj_done) return true;
if (jj_scan_token(XOR_T)) return true;
return false;
}
- inline bool jj_3R_485()
+ inline bool jj_3R_392()
{
if (jj_done) return true;
- if (jj_scan_token(VARIABLE_T)) return true;
+ if (jj_scan_token(XNOR_T)) return true;
return false;
}
- inline bool jj_3R_391()
+ inline bool jj_3R_395()
{
if (jj_done) return true;
- if (jj_scan_token(XNOR_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_484()) {
+ jj_scanpos = xsp;
+ if (jj_3R_485()) {
+ jj_scanpos = xsp;
+ if (jj_3R_486()) return true;
+ }
+ }
return false;
}
inline bool jj_3R_484()
{
if (jj_done) return true;
- if (jj_scan_token(SIGNAL_T)) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_390()
+ inline bool jj_3R_391()
{
if (jj_done) return true;
if (jj_scan_token(NOR_T)) return true;
return false;
}
- inline bool jj_3R_389()
+ inline bool jj_3R_390()
{
if (jj_done) return true;
if (jj_scan_token(NAND_T)) return true;
return false;
}
- inline bool jj_3R_394()
+ inline bool jj_3_109()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_483()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_484()) return false;
- jj_scanpos = xsp;
- if (jj_3R_485()) return true;
+ if (jj_3R_140()) return true;
return false;
}
- inline bool jj_3R_483()
+ inline bool jj_3R_275()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_3R_132()) return true;
return false;
}
- inline bool jj_3R_308()
+ inline bool jj_3R_309()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_388()) return false;
+ if (jj_3R_389()) {
jj_scanpos = xsp;
- if (!jj_3R_389()) return false;
+ if (jj_3R_390()) {
jj_scanpos = xsp;
- if (!jj_3R_390()) return false;
+ if (jj_3R_391()) {
jj_scanpos = xsp;
- if (!jj_3R_391()) return false;
+ if (jj_3R_392()) {
jj_scanpos = xsp;
- if (!jj_3R_392()) return false;
+ if (jj_3R_393()) {
jj_scanpos = xsp;
- if (jj_3R_393()) return true;
+ if (jj_3R_394()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_388()
+ inline bool jj_3R_389()
{
if (jj_done) return true;
if (jj_scan_token(AND_T)) return true;
return false;
}
- inline bool jj_3_108()
- {
- if (jj_done) return true;
- if (jj_3R_140()) return true;
- return false;
- }
-
- inline bool jj_3R_274()
+ inline bool jj_3R_311()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_scan_token(SLSL_T)) return true;
+ if (jj_3R_395()) return true;
+ if (jj_3R_396()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_84()) return true;
+ if (jj_scan_token(RSRS_T)) return true;
return false;
}
@@ -2785,32 +3124,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_310()
- {
- if (jj_done) return true;
- if (jj_scan_token(SLSL_T)) return true;
- if (jj_3R_394()) return true;
- if (jj_3R_395()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
- if (jj_scan_token(RSRS_T)) return true;
- return false;
- }
-
- inline bool jj_3R_408()
+ inline bool jj_3R_409()
{
if (jj_done) return true;
if (jj_3R_140()) return true;
return false;
}
- inline bool jj_3R_322()
+ inline bool jj_3R_323()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_408()) { jj_scanpos = xsp; break; }
+ if (jj_3R_409()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(BEGIN_T)) return true;
return false;
@@ -2821,15 +3148,30 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_322()) jj_scanpos = xsp;
+ if (jj_3R_323()) jj_scanpos = xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_323()) { jj_scanpos = xsp; break; }
+ if (jj_3R_324()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_264()
+ inline bool jj_3R_285()
+ {
+ if (jj_done) return true;
+ if (jj_3R_69()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_662()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(BEGIN_T)) return true;
+ if (jj_3R_662()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_265()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
@@ -2837,14 +3179,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_284()
+ inline bool jj_3R_235()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_132()) return true;
return false;
}
- inline bool jj_3R_262()
+ inline bool jj_3R_263()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -2852,11 +3194,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_661()
+ inline bool jj_3_108()
{
if (jj_done) return true;
- if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_661()) return true;
+ if (jj_3R_139()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
@@ -2865,32 +3207,28 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_262()) jj_scanpos = xsp;
- if (jj_scan_token(EXIT_T)) return true;
- xsp = jj_scanpos;
if (jj_3R_263()) jj_scanpos = xsp;
+ if (jj_scan_token(EXIT_T)) return true;
xsp = jj_scanpos;
if (jj_3R_264()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_265()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_234()
- {
- if (jj_done) return true;
- if (jj_3R_132()) return true;
- return false;
- }
-
- inline bool jj_3_107()
+ inline bool jj_3R_138()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(END_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_285()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_687()
+ inline bool jj_3R_688()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -2898,47 +3236,48 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_696()) { jj_scanpos = xsp; break; }
+ if (jj_3R_697()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_138()
+ inline bool jj_3R_641()
{
if (jj_done) return true;
- if (jj_scan_token(END_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_284()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_132()) return true;
return false;
}
- inline bool jj_3R_640()
+ inline bool jj_3R_652()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_108()) jj_scanpos = xsp;
+ if (jj_3R_85()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ if (jj_3R_662()) return true;
return false;
}
inline bool jj_3R_208()
{
if (jj_done) return true;
- if (jj_3R_351()) return true;
+ if (jj_3R_352()) return true;
return false;
}
- inline bool jj_3R_651()
+ inline bool jj_3R_619()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_107()) jj_scanpos = xsp;
- if (jj_3R_85()) return true;
- if (jj_scan_token(ARROW_T)) return true;
- if (jj_3R_661()) return true;
+ if (jj_3R_652()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_652()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -2954,56 +3293,46 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_207()) return false;
+ if (jj_3R_207()) {
jj_scanpos = xsp;
if (jj_3R_208()) return true;
+ }
return false;
}
- inline bool jj_3R_618()
+ inline bool jj_3R_695()
{
if (jj_done) return true;
- Token * xsp;
- if (jj_3R_651()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_651()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_352()) return true;
return false;
}
- inline bool jj_3R_694()
+ inline bool jj_3R_561()
{
if (jj_done) return true;
- if (jj_3R_351()) return true;
+ if (jj_scan_token(CASE_T)) return true;
+ if (jj_3R_58()) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_619()) return true;
return false;
}
- inline bool jj_3R_693()
+ inline bool jj_3R_694()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_683()
+ inline bool jj_3R_684()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_693()) return false;
+ if (jj_3R_694()) {
jj_scanpos = xsp;
- if (jj_3R_694()) return true;
- return false;
- }
-
- inline bool jj_3R_560()
- {
- if (jj_done) return true;
- if (jj_scan_token(CASE_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(GENERATE_T)) return true;
- if (jj_3R_618()) return true;
+ if (jj_3R_695()) return true;
+ }
return false;
}
@@ -3026,7 +3355,7 @@ void parseInline();
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_312()) return true;
+ if (jj_3R_313()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -3042,65 +3371,67 @@ void parseInline();
return false;
}
- inline bool jj_3R_469()
+ inline bool jj_3R_470()
{
if (jj_done) return true;
- if (jj_3R_538()) return true;
- if (jj_scan_token(COLON_T)) return true;
if (jj_3R_539()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_540()) return true;
return false;
}
- inline bool jj_3R_684()
+ inline bool jj_3R_685()
{
if (jj_done) return true;
- if (jj_3R_233()) return true;
+ if (jj_3R_234()) return true;
return false;
}
- inline bool jj_3R_584()
+ inline bool jj_3R_585()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_583()
+ inline bool jj_3R_584()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_637()
+ inline bool jj_3R_638()
{
if (jj_done) return true;
- if (jj_3R_658()) return true;
+ if (jj_3R_659()) return true;
return false;
}
- inline bool jj_3R_582()
+ inline bool jj_3R_583()
{
if (jj_done) return true;
Token * xsp;
- if (jj_3R_637()) return true;
+ if (jj_3R_638()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_637()) { jj_scanpos = xsp; break; }
+ if (jj_3R_638()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_538()
+ inline bool jj_3R_539()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_582()) return false;
+ if (jj_3R_583()) {
jj_scanpos = xsp;
- if (!jj_3R_583()) return false;
+ if (jj_3R_584()) {
jj_scanpos = xsp;
- if (jj_3R_584()) return true;
+ if (jj_3R_585()) return true;
+ }
+ }
return false;
}
@@ -3112,35 +3443,35 @@ void parseInline();
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(NEW_T)) return true;
if (jj_3R_59()) return true;
- if (jj_3R_233()) return true;
+ if (jj_3R_234()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_274()) jj_scanpos = xsp;
+ if (jj_3R_275()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_658()
+ inline bool jj_3R_107()
{
if (jj_done) return true;
- if (jj_3R_683()) return true;
+ if (jj_scan_token(PACKAGE_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_684()) jj_scanpos = xsp;
+ if (jj_3R_641()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_107()
+ inline bool jj_3R_659()
{
if (jj_done) return true;
- if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_684()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_640()) jj_scanpos = xsp;
+ if (jj_3R_685()) jj_scanpos = xsp;
return false;
}
@@ -3152,10 +3483,10 @@ void parseInline();
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(NEW_T)) return true;
if (jj_3R_59()) return true;
- if (jj_3R_233()) return true;
+ if (jj_3R_234()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_234()) jj_scanpos = xsp;
+ if (jj_3R_235()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -3181,295 +3512,290 @@ void parseInline();
return false;
}
- inline bool jj_3R_542()
+ inline bool jj_3R_543()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_541()) return true;
+ if (jj_3R_542()) return true;
return false;
}
- inline bool jj_3R_682()
+ inline bool jj_3R_683()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_253()
+ inline bool jj_3R_254()
{
if (jj_done) return true;
- if (jj_3R_365()) return true;
+ if (jj_3R_366()) return true;
return false;
}
- inline bool jj_3R_692()
+ inline bool jj_3R_693()
{
if (jj_done) return true;
- if (jj_3R_702()) return true;
+ if (jj_3R_703()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_681()
+ inline bool jj_3R_682()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_692()) { jj_scanpos = xsp; break; }
+ if (jj_3R_693()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_605()
+ inline bool jj_3R_720()
{
if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
- return false;
- }
-
- inline bool jj_3R_719()
- {
- if (jj_done) return true;
- if (jj_3R_381()) return true;
+ if (jj_3R_382()) return true;
return false;
}
- inline bool jj_3R_718()
+ inline bool jj_3R_606()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_348()
+ inline bool jj_3R_719()
{
if (jj_done) return true;
- if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_717()
+ inline bool jj_3R_718()
{
if (jj_done) return true;
- if (jj_3R_346()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_702()
+ inline bool jj_3R_703()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_717()) return false;
+ if (jj_3R_718()) {
jj_scanpos = xsp;
- if (!jj_3R_718()) return false;
+ if (jj_3R_719()) {
jj_scanpos = xsp;
- if (jj_3R_719()) return true;
+ if (jj_3R_720()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_473()
+ inline bool jj_3R_349()
{
if (jj_done) return true;
- if (jj_3R_541()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_542()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(ENTITY_T)) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_680()
+ inline bool jj_3R_681()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_252()
+ inline bool jj_3R_253()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
+ if (jj_3R_365()) return true;
return false;
}
- inline bool jj_3R_657()
+ inline bool jj_3R_474()
{
if (jj_done) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_3R_681()) return true;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_3R_542()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_682()) jj_scanpos = xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_543()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_541()
+ inline bool jj_3R_658()
{
if (jj_done) return true;
- if (jj_3R_539()) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_3R_682()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_605()) jj_scanpos = xsp;
+ if (jj_3R_683()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_691()
+ inline bool jj_3R_692()
{
if (jj_done) return true;
- if (jj_3R_701()) return true;
+ if (jj_3R_702()) return true;
return false;
}
- inline bool jj_3R_619()
+ inline bool jj_3R_542()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_540()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_606()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_104()
+ inline bool jj_3_105()
{
if (jj_done) return true;
if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_679()
+ inline bool jj_3R_680()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_691()) { jj_scanpos = xsp; break; }
+ if (jj_3R_692()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_601()
+ inline bool jj_3R_620()
{
if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_600()
+ inline bool jj_3R_602()
{
if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
+ if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_599()
+ inline bool jj_3R_717()
{
if (jj_done) return true;
- if (jj_scan_token(UNITS_T)) return true;
+ if (jj_3R_383()) return true;
return false;
}
- inline bool jj_3R_598()
+ inline bool jj_3R_601()
{
if (jj_done) return true;
- if (jj_scan_token(LITERAL_T)) return true;
+ if (jj_scan_token(GROUP_T)) return true;
return false;
}
- inline bool jj_3R_716()
+ inline bool jj_3R_600()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_scan_token(UNITS_T)) return true;
return false;
}
- inline bool jj_3R_597()
+ inline bool jj_3R_599()
{
if (jj_done) return true;
- if (jj_scan_token(LABEL_T)) return true;
+ if (jj_scan_token(LITERAL_T)) return true;
return false;
}
- inline bool jj_3R_596()
+ inline bool jj_3_106()
{
if (jj_done) return true;
- if (jj_scan_token(COMPONENT_T)) return true;
+ if (jj_3R_65()) return true;
return false;
}
- inline bool jj_3R_595()
+ inline bool jj_3R_716()
{
if (jj_done) return true;
- if (jj_scan_token(VARIABLE_T)) return true;
+ if (jj_3R_382()) return true;
return false;
}
- inline bool jj_3_105()
+ inline bool jj_3R_598()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_scan_token(LABEL_T)) return true;
return false;
}
inline bool jj_3R_715()
{
if (jj_done) return true;
- if (jj_3R_381()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_594()
+ inline bool jj_3R_597()
{
if (jj_done) return true;
- if (jj_scan_token(SIGNAL_T)) return true;
+ if (jj_scan_token(COMPONENT_T)) return true;
return false;
}
- inline bool jj_3R_714()
+ inline bool jj_3R_596()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_593()
+ inline bool jj_3R_714()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_592()
+ inline bool jj_3R_595()
{
if (jj_done) return true;
- if (jj_scan_token(SUBTYPE_T)) return true;
+ if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_713()
+ inline bool jj_3R_594()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_591()
+ inline bool jj_3R_713()
{
if (jj_done) return true;
- if (jj_scan_token(TYPE_T)) return true;
+ if (jj_3R_377()) return true;
return false;
}
- inline bool jj_3R_590()
+ inline bool jj_3R_593()
{
if (jj_done) return true;
- if (jj_scan_token(PACKAGE_T)) return true;
+ if (jj_scan_token(SUBTYPE_T)) return true;
return false;
}
@@ -3480,10 +3806,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_589()
+ inline bool jj_3R_592()
{
if (jj_done) return true;
- if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_scan_token(TYPE_T)) return true;
return false;
}
@@ -3494,24 +3820,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_588()
+ inline bool jj_3R_591()
{
if (jj_done) return true;
- if (jj_scan_token(PROCEDURE_T)) return true;
+ if (jj_scan_token(PACKAGE_T)) return true;
return false;
}
inline bool jj_3R_710()
{
if (jj_done) return true;
- if (jj_3R_374()) return true;
+ if (jj_3R_373()) return true;
return false;
}
- inline bool jj_3R_587()
+ inline bool jj_3R_590()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_scan_token(FUNCTION_T)) return true;
return false;
}
@@ -3522,10 +3848,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_586()
+ inline bool jj_3R_589()
{
if (jj_done) return true;
- if (jj_scan_token(ARCHITECTURE_T)) return true;
+ if (jj_scan_token(PROCEDURE_T)) return true;
return false;
}
@@ -3536,123 +3862,158 @@ void parseInline();
return false;
}
+ inline bool jj_3R_588()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_707()
{
if (jj_done) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_525()) return true;
return false;
}
- inline bool jj_3R_706()
+ inline bool jj_3R_587()
{
if (jj_done) return true;
- if (jj_3R_524()) return true;
+ if (jj_scan_token(ARCHITECTURE_T)) return true;
return false;
}
- inline bool jj_3R_585()
+ inline bool jj_3R_706()
{
if (jj_done) return true;
- if (jj_scan_token(ENTITY_T)) return true;
+ if (jj_3R_92()) return true;
return false;
}
- inline bool jj_3R_539()
+ inline bool jj_3R_702()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_585()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_586()) return false;
+ if (jj_3R_706()) {
jj_scanpos = xsp;
- if (!jj_3R_587()) return false;
+ if (jj_3R_707()) {
jj_scanpos = xsp;
- if (!jj_3R_588()) return false;
+ if (jj_3R_708()) {
jj_scanpos = xsp;
- if (!jj_3R_589()) return false;
+ if (jj_3R_709()) {
jj_scanpos = xsp;
- if (!jj_3R_590()) return false;
+ if (jj_3R_710()) {
jj_scanpos = xsp;
- if (!jj_3R_591()) return false;
+ if (jj_3R_711()) {
jj_scanpos = xsp;
- if (!jj_3R_592()) return false;
+ if (jj_3R_712()) {
jj_scanpos = xsp;
- if (!jj_3R_593()) return false;
+ if (jj_3R_713()) {
jj_scanpos = xsp;
- if (!jj_3R_594()) return false;
+ if (jj_3R_714()) {
jj_scanpos = xsp;
- if (!jj_3R_595()) return false;
+ if (jj_3R_715()) {
jj_scanpos = xsp;
- if (!jj_3R_596()) return false;
+ if (jj_3R_716()) {
jj_scanpos = xsp;
- if (!jj_3R_597()) return false;
+ if (jj_3_106()) {
jj_scanpos = xsp;
- if (!jj_3R_598()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_599()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_600()) return false;
- jj_scanpos = xsp;
- if (jj_3R_601()) return true;
+ if (jj_3R_717()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_705()
+ inline bool jj_3R_586()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_scan_token(ENTITY_T)) return true;
return false;
}
- inline bool jj_3R_701()
+ inline bool jj_3R_540()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_705()) return false;
+ if (jj_3R_586()) {
+ jj_scanpos = xsp;
+ if (jj_3R_587()) {
+ jj_scanpos = xsp;
+ if (jj_3R_588()) {
+ jj_scanpos = xsp;
+ if (jj_3R_589()) {
jj_scanpos = xsp;
- if (!jj_3R_706()) return false;
+ if (jj_3R_590()) {
jj_scanpos = xsp;
- if (!jj_3R_707()) return false;
+ if (jj_3R_591()) {
jj_scanpos = xsp;
- if (!jj_3R_708()) return false;
+ if (jj_3R_592()) {
jj_scanpos = xsp;
- if (!jj_3R_709()) return false;
+ if (jj_3R_593()) {
jj_scanpos = xsp;
- if (!jj_3R_710()) return false;
+ if (jj_3R_594()) {
jj_scanpos = xsp;
- if (!jj_3R_711()) return false;
+ if (jj_3R_595()) {
jj_scanpos = xsp;
- if (!jj_3R_712()) return false;
+ if (jj_3R_596()) {
jj_scanpos = xsp;
- if (!jj_3R_713()) return false;
+ if (jj_3R_597()) {
jj_scanpos = xsp;
- if (!jj_3R_714()) return false;
+ if (jj_3R_598()) {
jj_scanpos = xsp;
- if (!jj_3R_715()) return false;
+ if (jj_3R_599()) {
jj_scanpos = xsp;
- if (!jj_3_105()) return false;
+ if (jj_3R_600()) {
jj_scanpos = xsp;
- if (jj_3R_716()) return true;
+ if (jj_3R_601()) {
+ jj_scanpos = xsp;
+ if (jj_3R_602()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_563()
+ inline bool jj_3R_252()
{
if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
+ if (jj_3R_364()) return true;
return false;
}
- inline bool jj_3R_251()
+ inline bool jj_3R_564()
{
if (jj_done) return true;
- if (jj_3R_363()) return true;
+ if (jj_scan_token(OPEN_T)) return true;
return false;
}
- inline bool jj_3R_562()
+ inline bool jj_3R_563()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
@@ -3660,35 +4021,37 @@ void parseInline();
return false;
}
- inline bool jj_3R_561()
+ inline bool jj_3R_562()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_619()) jj_scanpos = xsp;
+ if (jj_3R_620()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_505()
+ inline bool jj_3R_528()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_561()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_562()) return false;
- jj_scanpos = xsp;
- if (jj_3R_563()) return true;
+ if (jj_scan_token(AFTER_T)) return true;
+ if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_527()
+ inline bool jj_3R_506()
{
if (jj_done) return true;
- if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_562()) {
+ jj_scanpos = xsp;
+ if (jj_3R_563()) {
+ jj_scanpos = xsp;
+ if (jj_3R_564()) return true;
+ }
+ }
return false;
}
@@ -3697,21 +4060,21 @@ void parseInline();
if (jj_done) return true;
if (jj_scan_token(PROTECTED_T)) return true;
if (jj_scan_token(BODY_T)) return true;
- if (jj_3R_679()) return true;
+ if (jj_3R_680()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(PROTECTED_T)) return true;
if (jj_scan_token(BODY_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_680()) jj_scanpos = xsp;
+ if (jj_3R_681()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_495()
+ inline bool jj_3R_496()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_444()) return true;
+ if (jj_3R_445()) return true;
return false;
}
@@ -3723,7 +4086,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_704()
+ inline bool jj_3R_705()
{
if (jj_done) return true;
if (jj_3R_196()) return true;
@@ -3740,24 +4103,24 @@ void parseInline();
return false;
}
- inline bool jj_3_29()
+ inline bool jj_3R_445()
{
if (jj_done) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_528()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_444()
+ inline bool jj_3_29()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_527()) jj_scanpos = xsp;
+ if (jj_3R_83()) return true;
return false;
}
- inline bool jj_3R_358()
+ inline bool jj_3R_359()
{
if (jj_done) return true;
if (jj_3R_85()) return true;
@@ -3765,85 +4128,87 @@ void parseInline();
return false;
}
- inline bool jj_3R_235()
+ inline bool jj_3R_236()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_358()) jj_scanpos = xsp;
+ if (jj_3R_359()) jj_scanpos = xsp;
if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_160()
+ inline bool jj_3R_407()
{
if (jj_done) return true;
- if (jj_3R_84()) return true;
+ if (jj_scan_token(UNAFFECTED_T)) return true;
return false;
}
- inline bool jj_3R_406()
+ inline bool jj_3R_160()
{
if (jj_done) return true;
- if (jj_scan_token(UNAFFECTED_T)) return true;
+ if (jj_3R_84()) return true;
return false;
}
- inline bool jj_3R_159()
+ inline bool jj_3R_318()
{
if (jj_done) return true;
- if (jj_3R_83()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_406()) {
+ jj_scanpos = xsp;
+ if (jj_3R_407()) return true;
+ }
return false;
}
- inline bool jj_3R_67()
+ inline bool jj_3R_406()
{
if (jj_done) return true;
+ if (jj_3R_445()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_159()) return false;
- jj_scanpos = xsp;
- if (jj_3R_160()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_496()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_317()
+ inline bool jj_3R_159()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_405()) return false;
- jj_scanpos = xsp;
- if (jj_3R_406()) return true;
+ if (jj_3R_83()) return true;
return false;
}
- inline bool jj_3R_405()
+ inline bool jj_3R_67()
{
if (jj_done) return true;
- if (jj_3R_444()) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_495()) { jj_scanpos = xsp; break; }
+ xsp = jj_scanpos;
+ if (jj_3R_159()) {
+ jj_scanpos = xsp;
+ if (jj_3R_160()) return true;
}
return false;
}
- inline bool jj_3R_470()
+ inline bool jj_3R_251()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_69()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_250()
+ inline bool jj_3R_471()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_541()) return true;
if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_59()) return true;
return false;
}
@@ -3852,30 +4217,30 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_250()) jj_scanpos = xsp;
- if (jj_scan_token(WAIT_T)) return true;
- xsp = jj_scanpos;
if (jj_3R_251()) jj_scanpos = xsp;
+ if (jj_scan_token(WAIT_T)) return true;
xsp = jj_scanpos;
if (jj_3R_252()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_253()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_254()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_380()
+ inline bool jj_3R_381()
{
if (jj_done) return true;
if (jj_scan_token(DISCONNECT_T)) return true;
- if (jj_3R_470()) return true;
+ if (jj_3R_471()) return true;
if (jj_scan_token(AFTER_T)) return true;
if (jj_3R_58()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_458()
+ inline bool jj_3R_459()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
@@ -3883,7 +4248,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_238()
+ inline bool jj_3R_239()
{
if (jj_done) return true;
if (jj_scan_token(DOWNTO_T)) return true;
@@ -3895,53 +4260,55 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_237()) return false;
+ if (jj_3R_238()) {
jj_scanpos = xsp;
- if (jj_3R_238()) return true;
+ if (jj_3R_239()) return true;
+ }
return false;
}
- inline bool jj_3R_237()
+ inline bool jj_3R_238()
{
if (jj_done) return true;
if (jj_scan_token(TO_T)) return true;
return false;
}
- inline bool jj_3R_568()
+ inline bool jj_3R_155()
{
if (jj_done) return true;
- if (jj_3R_309()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_154()) return true;
return false;
}
- inline bool jj_3R_155()
+ inline bool jj_3R_569()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_154()) return true;
+ if (jj_3R_310()) return true;
return false;
}
- inline bool jj_3R_567()
+ inline bool jj_3R_568()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_520()
+ inline bool jj_3R_521()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_567()) return false;
+ if (jj_3R_568()) {
jj_scanpos = xsp;
- if (jj_3R_568()) return true;
+ if (jj_3R_569()) return true;
+ }
return false;
}
- inline bool jj_3R_461()
+ inline bool jj_3R_462()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
@@ -3949,25 +4316,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_558()
- {
- if (jj_done) return true;
- if (jj_scan_token(REJECT_T)) return true;
- if (jj_3R_58()) return true;
- return false;
- }
-
- inline bool jj_3R_494()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_558()) jj_scanpos = xsp;
- if (jj_scan_token(INERTIAL_T)) return true;
- return false;
- }
-
- inline bool jj_3R_374()
+ inline bool jj_3R_375()
{
if (jj_done) return true;
Token * xsp;
@@ -3978,52 +4327,64 @@ void parseInline();
if (jj_scan_token(COLON_T)) return true;
if (jj_3R_84()) return true;
xsp = jj_scanpos;
- if (jj_3R_461()) jj_scanpos = xsp;
+ if (jj_3R_462()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_472()
+ inline bool jj_3R_559()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(REJECT_T)) return true;
+ if (jj_3R_58()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_473()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_471()) return true;
+ if (jj_3R_472()) return true;
return false;
}
- inline bool jj_3R_404()
+ inline bool jj_3R_495()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_493()) return false;
- jj_scanpos = xsp;
- if (jj_3R_494()) return true;
+ if (jj_3R_559()) jj_scanpos = xsp;
+ if (jj_scan_token(INERTIAL_T)) return true;
return false;
}
- inline bool jj_3R_493()
+ inline bool jj_3R_440()
{
if (jj_done) return true;
- if (jj_scan_token(TRANSPORT_T)) return true;
+ if (jj_3R_527()) return true;
return false;
}
- inline bool jj_3R_439()
+ inline bool jj_3R_405()
{
if (jj_done) return true;
- if (jj_3R_526()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_494()) {
+ jj_scanpos = xsp;
+ if (jj_3R_495()) return true;
+ }
return false;
}
- inline bool jj_3_28()
+ inline bool jj_3R_494()
{
if (jj_done) return true;
- if (jj_3R_82()) return true;
+ if (jj_scan_token(TRANSPORT_T)) return true;
return false;
}
- inline bool jj_3_103()
+ inline bool jj_3_104()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -4031,23 +4392,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_361()
+ inline bool jj_3R_362()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_438()) return false;
+ if (jj_3R_439()) {
jj_scanpos = xsp;
- if (jj_3R_439()) return true;
+ if (jj_3R_440()) return true;
+ }
return false;
}
- inline bool jj_3R_438()
+ inline bool jj_3R_439()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_103()) jj_scanpos = xsp;
+ if (jj_3_104()) jj_scanpos = xsp;
if (jj_3R_114()) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
if (jj_3R_58()) return true;
@@ -4055,6 +4417,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_28()
+ {
+ if (jj_done) return true;
+ if (jj_3R_82()) return true;
+ return false;
+ }
+
inline bool jj_3_27()
{
if (jj_done) return true;
@@ -4062,7 +4431,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_276()
+ inline bool jj_3R_277()
{
if (jj_done) return true;
if (jj_3R_82()) return true;
@@ -4074,43 +4443,34 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_275()) return false;
+ if (jj_3R_276()) {
jj_scanpos = xsp;
- if (jj_3R_276()) return true;
+ if (jj_3R_277()) return true;
+ }
return false;
}
- inline bool jj_3R_275()
+ inline bool jj_3R_276()
{
if (jj_done) return true;
if (jj_3R_81()) return true;
return false;
}
- inline bool jj_3R_381()
+ inline bool jj_3R_382()
{
if (jj_done) return true;
if (jj_scan_token(USE_T)) return true;
- if (jj_3R_471()) return true;
+ if (jj_3R_472()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_472()) { jj_scanpos = xsp; break; }
+ if (jj_3R_473()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_703()
- {
- if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_82()) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_84()) return true;
- return false;
- }
-
inline bool jj_3R_62()
{
if (jj_done) return true;
@@ -4128,6 +4488,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_704()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_82()) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_84()) return true;
+ return false;
+ }
+
inline bool jj_3R_157()
{
if (jj_done) return true;
@@ -4135,6 +4505,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_637()
+ {
+ if (jj_done) return true;
+ if (jj_3R_658()) return true;
+ return false;
+ }
+
+ inline bool jj_3_103()
+ {
+ if (jj_done) return true;
+ if (jj_3R_137()) return true;
+ return false;
+ }
+
inline bool jj_3R_636()
{
if (jj_done) return true;
@@ -4142,7 +4526,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_372()
+ inline bool jj_3R_373()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
@@ -4151,18 +4535,11 @@ void parseInline();
if (jj_3R_84()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_458()) jj_scanpos = xsp;
+ if (jj_3R_459()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_102()
- {
- if (jj_done) return true;
- if (jj_3R_137()) return true;
- return false;
- }
-
inline bool jj_3R_635()
{
if (jj_done) return true;
@@ -4184,103 +4561,103 @@ void parseInline();
return false;
}
- inline bool jj_3_26()
- {
- if (jj_done) return true;
- if (jj_3R_80()) return true;
- return false;
- }
-
- inline bool jj_3R_632()
- {
- if (jj_done) return true;
- if (jj_3R_653()) return true;
- return false;
- }
-
- inline bool jj_3R_576()
+ inline bool jj_3R_577()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_632()) return false;
+ if (jj_3R_633()) {
jj_scanpos = xsp;
- if (!jj_3R_633()) return false;
+ if (jj_3R_634()) {
jj_scanpos = xsp;
- if (!jj_3R_634()) return false;
+ if (jj_3R_635()) {
jj_scanpos = xsp;
- if (!jj_3R_635()) return false;
+ if (jj_3R_636()) {
jj_scanpos = xsp;
- if (!jj_3_102()) return false;
+ if (jj_3_103()) {
jj_scanpos = xsp;
- if (jj_3R_636()) return true;
+ if (jj_3R_637()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_379()
+ inline bool jj_3_26()
+ {
+ if (jj_done) return true;
+ if (jj_3R_80()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_380()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
if (jj_3R_177()) return true;
- if (jj_3R_331()) return true;
+ if (jj_3R_332()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_566()
+ inline bool jj_3_99()
{
if (jj_done) return true;
- if (jj_3R_332()) return true;
+ if (jj_3R_133()) return true;
return false;
}
- inline bool jj_3_98()
+ inline bool jj_3R_458()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
+ if (jj_3R_532()) return true;
return false;
}
- inline bool jj_3R_457()
+ inline bool jj_3R_567()
{
if (jj_done) return true;
- if (jj_3R_531()) return true;
+ if (jj_3R_333()) return true;
return false;
}
- inline bool jj_3R_565()
+ inline bool jj_3_102()
{
if (jj_done) return true;
- if (jj_3R_80()) return true;
+ if (jj_3R_136()) return true;
return false;
}
- inline bool jj_3R_507()
+ inline bool jj_3R_371()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_565()) return false;
+ if (jj_3_102()) {
jj_scanpos = xsp;
- if (jj_3R_566()) return true;
+ if (jj_3R_458()) return true;
+ }
return false;
}
- inline bool jj_3_101()
+ inline bool jj_3R_566()
{
if (jj_done) return true;
- if (jj_3R_136()) return true;
+ if (jj_3R_80()) return true;
return false;
}
- inline bool jj_3R_370()
+ inline bool jj_3R_508()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_101()) return false;
+ if (jj_3R_566()) {
jj_scanpos = xsp;
- if (jj_3R_457()) return true;
+ if (jj_3R_567()) return true;
+ }
return false;
}
@@ -4294,7 +4671,7 @@ void parseInline();
return false;
}
- inline bool jj_3_100()
+ inline bool jj_3_101()
{
if (jj_done) return true;
if (jj_3R_134()) return true;
@@ -4309,7 +4686,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_365()
+ inline bool jj_3R_366()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
@@ -4324,12 +4701,12 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3_100()) { jj_scanpos = xsp; break; }
+ if (jj_3_101()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_246()
+ inline bool jj_3R_247()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
@@ -4341,80 +4718,73 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_245()) return false;
+ if (jj_3R_246()) {
jj_scanpos = xsp;
- if (jj_3R_246()) return true;
+ if (jj_3R_247()) return true;
+ }
return false;
}
- inline bool jj_3_99()
+ inline bool jj_3_100()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_245()
+ inline bool jj_3R_246()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3_25()
- {
- if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
- if (jj_scan_token(ELSE_T)) return true;
- return false;
- }
-
- inline bool jj_3R_349()
+ inline bool jj_3_98()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3_97()
+ inline bool jj_3R_218()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_217()
+ inline bool jj_3_25()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_79()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
return false;
}
- inline bool jj_3R_216()
+ inline bool jj_3R_350()
{
if (jj_done) return true;
- if (jj_3R_309()) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_215()
+ inline bool jj_3R_217()
{
if (jj_done) return true;
- if (jj_3R_351()) return true;
+ if (jj_3R_310()) return true;
return false;
}
- inline bool jj_3R_319()
+ inline bool jj_3R_216()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_352()) return true;
return false;
}
- inline bool jj_3R_214()
+ inline bool jj_3R_215()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
@@ -4426,23 +4796,24 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_214()) return false;
+ if (jj_3R_215()) {
jj_scanpos = xsp;
- if (!jj_3R_215()) return false;
+ if (jj_3R_216()) {
jj_scanpos = xsp;
- if (!jj_3R_216()) return false;
+ if (jj_3R_217()) {
jj_scanpos = xsp;
- if (jj_3R_217()) return true;
+ if (jj_3R_218()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_318()
+ inline bool jj_3R_320()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
if (jj_3R_79()) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_317()) return true;
return false;
}
@@ -4453,6 +4824,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_319()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_79()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_318()) return true;
+ return false;
+ }
+
inline bool jj_3R_84()
{
if (jj_done) return true;
@@ -4468,14 +4849,14 @@ void parseInline();
inline bool jj_3R_167()
{
if (jj_done) return true;
- if (jj_3R_317()) return true;
+ if (jj_3R_318()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_318()) { jj_scanpos = xsp; break; }
+ if (jj_3R_319()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_319()) jj_scanpos = xsp;
+ if (jj_3R_320()) jj_scanpos = xsp;
return false;
}
@@ -4490,7 +4871,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_371()
+ inline bool jj_3R_372()
{
if (jj_done) return true;
if (jj_scan_token(SUBTYPE_T)) return true;
@@ -4501,25 +4882,25 @@ void parseInline();
return false;
}
- inline bool jj_3R_630()
+ inline bool jj_3R_631()
{
if (jj_done) return true;
if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3R_571()
+ inline bool jj_3R_572()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_630()) { jj_scanpos = xsp; break; }
+ if (jj_3R_631()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_364()
+ inline bool jj_3R_365()
{
if (jj_done) return true;
if (jj_scan_token(UNTIL_T)) return true;
@@ -4534,35 +4915,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_523()
+ inline bool jj_3R_524()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_569()) return true;
+ if (jj_3R_570()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_24()
+ inline bool jj_3R_522()
{
if (jj_done) return true;
- if (jj_3R_78()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_313()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_521()
+ inline bool jj_3_97()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_312()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_132()) return true;
+ return false;
+ }
+
+ inline bool jj_3_24()
+ {
+ if (jj_done) return true;
+ if (jj_3R_78()) return true;
return false;
}
inline bool jj_3_96()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_3R_131()) return true;
return false;
}
@@ -4573,10 +4961,15 @@ void parseInline();
return false;
}
- inline bool jj_3_95()
+ inline bool jj_3R_523()
{
if (jj_done) return true;
- if (jj_3R_131()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(84)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(52)) return true;
+ }
return false;
}
@@ -4595,14 +4988,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_522()
+ inline bool jj_3R_433()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(84)) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
+ if (jj_3R_523()) jj_scanpos = xsp;
+ if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_3R_521()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_524()) jj_scanpos = xsp;
+ if (jj_scan_token(RETURN_T)) return true;
+ if (jj_3R_157()) return true;
return false;
}
@@ -4618,29 +5015,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_503()
+ inline bool jj_3R_504()
{
if (jj_done) return true;
if (jj_3R_78()) return true;
return false;
}
- inline bool jj_3R_432()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_522()) jj_scanpos = xsp;
- if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_520()) return true;
- xsp = jj_scanpos;
- if (jj_3R_523()) jj_scanpos = xsp;
- if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_157()) return true;
- return false;
- }
-
- inline bool jj_3R_502()
+ inline bool jj_3R_503()
{
if (jj_done) return true;
if (jj_3R_77()) return true;
@@ -4662,7 +5044,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_501()
+ inline bool jj_3R_502()
{
if (jj_done) return true;
if (jj_3R_76()) return true;
@@ -4689,7 +5071,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_500()
+ inline bool jj_3R_501()
{
if (jj_done) return true;
if (jj_3R_87()) return true;
@@ -4706,94 +5088,111 @@ void parseInline();
return false;
}
- inline bool jj_3R_499()
- {
- if (jj_done) return true;
- if (jj_3R_560()) return true;
- return false;
- }
-
- inline bool jj_3R_498()
+ inline bool jj_3R_500()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_561()) return true;
return false;
}
- inline bool jj_3R_346()
+ inline bool jj_3R_347()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_431()) return false;
+ if (jj_3R_432()) {
jj_scanpos = xsp;
- if (jj_3R_432()) return true;
+ if (jj_3R_433()) return true;
+ }
return false;
}
- inline bool jj_3R_431()
+ inline bool jj_3R_432()
{
if (jj_done) return true;
if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_520()) return true;
+ if (jj_3R_521()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_521()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3_95()) jj_scanpos = xsp;
+ if (jj_3R_522()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3_96()) jj_scanpos = xsp;
- if (jj_3R_423()) return true;
+ xsp = jj_scanpos;
+ if (jj_3_97()) jj_scanpos = xsp;
+ if (jj_3R_424()) return true;
return false;
}
- inline bool jj_3R_497()
+ inline bool jj_3R_499()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_498()
{
if (jj_done) return true;
if (jj_3R_88()) return true;
return false;
}
- inline bool jj_3R_409()
+ inline bool jj_3R_632()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_496()) return false;
+ if (jj_scan_token(46)) {
jj_scanpos = xsp;
- if (!jj_3R_497()) return false;
+ if (jj_scan_token(80)) return true;
+ }
+ return false;
+ }
+
+ inline bool jj_3R_410()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_497()) {
+ jj_scanpos = xsp;
+ if (jj_3R_498()) {
jj_scanpos = xsp;
- if (!jj_3R_498()) return false;
+ if (jj_3R_499()) {
jj_scanpos = xsp;
- if (!jj_3R_499()) return false;
+ if (jj_3R_500()) {
jj_scanpos = xsp;
- if (!jj_3R_500()) return false;
+ if (jj_3R_501()) {
jj_scanpos = xsp;
- if (!jj_3R_501()) return false;
+ if (jj_3R_502()) {
jj_scanpos = xsp;
- if (!jj_3R_502()) return false;
+ if (jj_3R_503()) {
jj_scanpos = xsp;
- if (!jj_3R_503()) return false;
+ if (jj_3R_504()) {
jj_scanpos = xsp;
if (jj_scan_token(189)) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_496()
+ inline bool jj_3R_497()
{
if (jj_done) return true;
- if (jj_3R_559()) return true;
+ if (jj_3R_560()) return true;
return false;
}
- inline bool jj_3R_631()
+ inline bool jj_3R_630()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_scan_token(46)) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(80)) return true;
+ if (jj_3R_653()) return true;
return false;
}
@@ -4804,35 +5203,35 @@ void parseInline();
return false;
}
- inline bool jj_3R_629()
+ inline bool jj_3R_571()
{
if (jj_done) return true;
- if (jj_3R_652()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_630()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_570()
+ inline bool jj_3_94()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_629()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_172()
+ inline bool jj_3R_675()
{
if (jj_done) return true;
- if (jj_3R_324()) return true;
+ if (jj_3R_383()) return true;
return false;
}
- inline bool jj_3_93()
+ inline bool jj_3R_172()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_325()) return true;
return false;
}
@@ -4858,39 +5257,33 @@ void parseInline();
return false;
}
- inline bool jj_3R_76()
+ inline bool jj_3_95()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_16()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (!jj_3R_171()) return false;
- jj_scanpos = xsp;
- if (jj_3R_172()) return true;
+ if (jj_3R_65()) return true;
return false;
}
inline bool jj_3R_673()
{
if (jj_done) return true;
- if (jj_3R_381()) return true;
- return false;
- }
-
- inline bool jj_3_94()
- {
- if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_672()
+ inline bool jj_3R_76()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_16()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_171()) {
+ jj_scanpos = xsp;
+ if (jj_3R_172()) return true;
+ }
return false;
}
@@ -4902,23 +5295,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_78()
+ inline bool jj_3R_672()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_15()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_176()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_64()) return true;
return false;
}
inline bool jj_3R_671()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_377()) return true;
return false;
}
@@ -4936,53 +5323,66 @@ void parseInline();
return false;
}
- inline bool jj_3_14()
+ inline bool jj_3R_574()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_521()) return true;
return false;
}
- inline bool jj_3_13()
+ inline bool jj_3R_78()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_15()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_3R_176()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3R_668()
{
if (jj_done) return true;
- if (jj_3R_374()) return true;
+ if (jj_3R_373()) return true;
return false;
}
- inline bool jj_3R_573()
+ inline bool jj_3R_667()
{
if (jj_done) return true;
- if (jj_3R_520()) return true;
+ if (jj_3R_372()) return true;
return false;
}
- inline bool jj_3R_667()
+ inline bool jj_3R_666()
{
if (jj_done) return true;
- if (jj_3R_372()) return true;
+ if (jj_3R_525()) return true;
return false;
}
- inline bool jj_3R_666()
+ inline bool jj_3_14()
{
if (jj_done) return true;
- if (jj_3R_371()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3_13()
+ {
+ if (jj_done) return true;
+ if (jj_3R_70()) return true;
return false;
}
inline bool jj_3R_665()
{
if (jj_done) return true;
- if (jj_3R_524()) return true;
+ if (jj_3R_371()) return true;
return false;
}
@@ -4999,93 +5399,85 @@ void parseInline();
return false;
}
- inline bool jj_3R_678()
- {
- if (jj_done) return true;
- if (jj_3R_690()) return true;
- return false;
- }
-
inline bool jj_3R_664()
{
if (jj_done) return true;
- if (jj_3R_370()) return true;
- return false;
- }
-
- inline bool jj_3R_677()
- {
- if (jj_done) return true;
- if (jj_3R_689()) return true;
- return false;
- }
-
- inline bool jj_3R_663()
- {
- if (jj_done) return true;
if (jj_3R_92()) return true;
return false;
}
- inline bool jj_3R_654()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_677()) return false;
- jj_scanpos = xsp;
- if (jj_3R_678()) return true;
- return false;
- }
-
- inline bool jj_3R_652()
+ inline bool jj_3R_653()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_663()) return false;
+ if (jj_3R_664()) {
jj_scanpos = xsp;
- if (!jj_3R_664()) return false;
+ if (jj_3R_665()) {
jj_scanpos = xsp;
- if (!jj_3R_665()) return false;
+ if (jj_3R_666()) {
jj_scanpos = xsp;
- if (!jj_3R_666()) return false;
+ if (jj_3R_667()) {
jj_scanpos = xsp;
- if (!jj_3R_667()) return false;
+ if (jj_3R_668()) {
jj_scanpos = xsp;
- if (!jj_3R_668()) return false;
+ if (jj_3R_669()) {
jj_scanpos = xsp;
- if (!jj_3R_669()) return false;
+ if (jj_3R_670()) {
jj_scanpos = xsp;
- if (!jj_3R_670()) return false;
+ if (jj_3R_671()) {
jj_scanpos = xsp;
- if (!jj_3R_671()) return false;
+ if (jj_3R_672()) {
jj_scanpos = xsp;
- if (!jj_3R_672()) return false;
+ if (jj_3R_673()) {
jj_scanpos = xsp;
- if (!jj_3R_673()) return false;
+ if (jj_3R_674()) {
jj_scanpos = xsp;
- if (!jj_3_94()) return false;
+ if (jj_3_95()) {
jj_scanpos = xsp;
- if (jj_3R_674()) return true;
+ if (jj_3R_675()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_175()
+ inline bool jj_3R_679()
{
if (jj_done) return true;
- if (jj_3R_328()) return true;
+ if (jj_3R_691()) return true;
return false;
}
- inline bool jj_3R_174()
+ inline bool jj_3R_678()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_690()) return true;
return false;
}
- inline bool jj_3R_460()
+ inline bool jj_3R_655()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_678()) {
+ jj_scanpos = xsp;
+ if (jj_3R_679()) return true;
+ }
+ return false;
+ }
+
+ inline bool jj_3R_461()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
@@ -5093,42 +5485,57 @@ void parseInline();
return false;
}
- inline bool jj_3R_468()
+ inline bool jj_3R_175()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_329()) return true;
return false;
}
- inline bool jj_3_92()
+ inline bool jj_3R_174()
+ {
+ if (jj_done) return true;
+ if (jj_3R_70()) return true;
+ return false;
+ }
+
+ inline bool jj_3_93()
{
if (jj_done) return true;
if (jj_3R_130()) return true;
return false;
}
- inline bool jj_3R_347()
+ inline bool jj_3R_348()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_433()) return false;
+ if (jj_3R_434()) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
return false;
}
- inline bool jj_3R_433()
+ inline bool jj_3R_434()
{
if (jj_done) return true;
- if (jj_3R_524()) return true;
+ if (jj_3R_525()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_469()
+ {
+ if (jj_done) return true;
+ if (jj_3R_69()) return true;
return false;
}
inline bool jj_3R_177()
{
if (jj_done) return true;
- if (jj_3R_330()) return true;
+ if (jj_3R_331()) return true;
if (jj_scan_token(COLON_T)) return true;
if (jj_3R_59()) return true;
return false;
@@ -5137,15 +5544,15 @@ void parseInline();
inline bool jj_3R_200()
{
if (jj_done) return true;
- if (jj_3R_346()) return true;
if (jj_3R_347()) return true;
+ if (jj_3R_348()) return true;
return false;
}
- inline bool jj_3R_572()
+ inline bool jj_3R_573()
{
if (jj_done) return true;
- if (jj_3R_631()) return true;
+ if (jj_3R_632()) return true;
return false;
}
@@ -5161,13 +5568,29 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_199()) return false;
+ if (jj_3R_199()) {
jj_scanpos = xsp;
if (jj_3R_200()) return true;
+ }
return false;
}
- inline bool jj_3_91()
+ inline bool jj_3_92()
+ {
+ if (jj_done) return true;
+ if (jj_3R_128()) return true;
+ if (jj_3R_129()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_460()
+ {
+ if (jj_done) return true;
+ if (jj_3R_533()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_162()
{
if (jj_done) return true;
if (jj_3R_128()) return true;
@@ -5190,46 +5613,48 @@ void parseInline();
return false;
}
- inline bool jj_3R_459()
- {
- if (jj_done) return true;
- if (jj_3R_532()) return true;
- return false;
- }
-
- inline bool jj_3R_162()
+ inline bool jj_3R_468()
{
if (jj_done) return true;
- if (jj_3R_128()) return true;
- if (jj_3R_129()) return true;
+ if (jj_3R_538()) return true;
return false;
}
inline bool jj_3R_467()
{
if (jj_done) return true;
- if (jj_3R_537()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_466()
+ inline bool jj_3R_179()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_3R_333()) return true;
return false;
}
- inline bool jj_3R_179()
+ inline bool jj_3R_178()
{
if (jj_done) return true;
if (jj_3R_332()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_178()
+ inline bool jj_3R_525()
{
if (jj_done) return true;
- if (jj_3R_331()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_571()) return true;
+ if (jj_scan_token(BEGIN_T)) return true;
+ if (jj_3R_572()) return true;
+ if (jj_scan_token(END_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_573()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_574()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -5242,7 +5667,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_377()
+ inline bool jj_3R_378()
{
if (jj_done) return true;
if (jj_scan_token(COMPONENT_T)) return true;
@@ -5251,30 +5676,13 @@ void parseInline();
xsp = jj_scanpos;
if (jj_scan_token(56)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_466()) jj_scanpos = xsp;
- xsp = jj_scanpos;
if (jj_3R_467()) jj_scanpos = xsp;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(COMPONENT_T)) return true;
xsp = jj_scanpos;
if (jj_3R_468()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
- inline bool jj_3R_524()
- {
- if (jj_done) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_570()) return true;
- if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_571()) return true;
if (jj_scan_token(END_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_572()) jj_scanpos = xsp;
+ if (jj_scan_token(COMPONENT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_573()) jj_scanpos = xsp;
+ if (jj_3R_469()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -5295,7 +5703,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_355()
+ inline bool jj_3R_356()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
@@ -5328,6 +5736,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_435()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_59()) return true;
+ return false;
+ }
+
inline bool jj_3_10()
{
if (jj_done) return true;
@@ -5335,57 +5751,65 @@ void parseInline();
return false;
}
- inline bool jj_3R_336()
+ inline bool jj_3R_337()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_434()
+ inline bool jj_3R_161()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_314()) return true;
return false;
}
- inline bool jj_3R_335()
+ inline bool jj_3R_336()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_334()
+ inline bool jj_3R_68()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_161()) jj_scanpos = xsp;
+ if (jj_3R_129()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_162()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ inline bool jj_3R_335()
{
if (jj_done) return true;
if (jj_3R_68()) return true;
return false;
}
- inline bool jj_3R_161()
+ inline bool jj_3R_358()
{
if (jj_done) return true;
- if (jj_3R_313()) return true;
+ if (jj_scan_token(RETURN_T)) return true;
+ if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_68()
+ inline bool jj_3R_639()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_161()) jj_scanpos = xsp;
- if (jj_3R_129()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_162()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_627()
+ inline bool jj_3R_628()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -5397,17 +5821,20 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_333()) return false;
+ if (jj_3R_334()) {
jj_scanpos = xsp;
- if (!jj_3R_334()) return false;
+ if (jj_3R_335()) {
jj_scanpos = xsp;
- if (!jj_3R_335()) return false;
+ if (jj_3R_336()) {
jj_scanpos = xsp;
- if (jj_3R_336()) return true;
+ if (jj_3R_337()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_333()
+ inline bool jj_3R_334()
{
if (jj_done) return true;
if (jj_3R_67()) return true;
@@ -5417,39 +5844,36 @@ void parseInline();
inline bool jj_3R_357()
{
if (jj_done) return true;
- if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_59()) return true;
- return false;
- }
-
- inline bool jj_3R_638()
- {
- if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
if (jj_3R_59()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_435()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_356()
+ inline bool jj_3R_234()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(LBRACKET_T)) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_434()) { jj_scanpos = xsp; break; }
- }
+ xsp = jj_scanpos;
+ if (jj_3R_357()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_358()) jj_scanpos = xsp;
+ if (jj_scan_token(RBRACKET_T)) return true;
return false;
}
- inline bool jj_3R_351()
+ inline bool jj_3R_352()
{
if (jj_done) return true;
if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_613()
+ inline bool jj_3R_614()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -5458,108 +5882,98 @@ void parseInline();
return false;
}
- inline bool jj_3R_233()
- {
- if (jj_done) return true;
- if (jj_scan_token(LBRACKET_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_356()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_357()) jj_scanpos = xsp;
- if (jj_scan_token(RBRACKET_T)) return true;
- return false;
- }
-
- inline bool jj_3R_604()
+ inline bool jj_3R_605()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_603()
+ inline bool jj_3R_604()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_602()
+ inline bool jj_3R_603()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_638()) { jj_scanpos = xsp; break; }
+ if (jj_3R_639()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_540()
+ inline bool jj_3R_541()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_602()) return false;
+ if (jj_3R_603()) {
jj_scanpos = xsp;
- if (!jj_3R_603()) return false;
+ if (jj_3R_604()) {
jj_scanpos = xsp;
- if (jj_3R_604()) return true;
+ if (jj_3R_605()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_578()
+ inline bool jj_3R_579()
{
if (jj_done) return true;
if (jj_scan_token(BUS_T)) return true;
return false;
}
- inline bool jj_3R_625()
+ inline bool jj_3R_578()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
- if (jj_scan_token(ARROW_T)) return true;
- if (jj_3R_258()) return true;
+ if (jj_scan_token(REGISTER_T)) return true;
return false;
}
- inline bool jj_3R_617()
+ inline bool jj_3R_533()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_578()) {
+ jj_scanpos = xsp;
+ if (jj_3R_579()) return true;
+ }
return false;
}
inline bool jj_3R_626()
{
if (jj_done) return true;
- if (jj_3R_625()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_85()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ if (jj_3R_259()) return true;
return false;
}
- inline bool jj_3R_577()
+ inline bool jj_3R_618()
{
if (jj_done) return true;
- if (jj_scan_token(REGISTER_T)) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_532()
+ inline bool jj_3R_627()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_577()) return false;
- jj_scanpos = xsp;
- if (jj_3R_578()) return true;
+ if (jj_3R_626()) return true;
return false;
}
- inline bool jj_3R_659()
+ inline bool jj_3R_660()
{
if (jj_done) return true;
if (jj_3R_70()) return true;
@@ -5567,7 +5981,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_373()
+ inline bool jj_3R_374()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
@@ -5576,14 +5990,14 @@ void parseInline();
if (jj_3R_84()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_459()) jj_scanpos = xsp;
- xsp = jj_scanpos;
if (jj_3R_460()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_461()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_255()
+ inline bool jj_3R_256()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -5591,68 +6005,68 @@ void parseInline();
return false;
}
+ inline bool jj_3_91()
+ {
+ if (jj_done) return true;
+ if (jj_3R_127()) return true;
+ return false;
+ }
+
inline bool jj_3R_121()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_255()) jj_scanpos = xsp;
+ if (jj_3R_256()) jj_scanpos = xsp;
if (jj_scan_token(CASE_T)) return true;
if (jj_3R_58()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_625()) return true;
+ if (jj_3R_626()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_626()) { jj_scanpos = xsp; break; }
+ if (jj_3R_627()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(CASE_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_627()) jj_scanpos = xsp;
+ if (jj_3R_628()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_650()
+ inline bool jj_3R_651()
{
if (jj_done) return true;
- if (jj_3R_409()) return true;
+ if (jj_3R_410()) return true;
return false;
}
inline bool jj_3_90()
{
if (jj_done) return true;
- if (jj_3R_127()) return true;
+ if (jj_3R_126()) return true;
return false;
}
- inline bool jj_3R_616()
+ inline bool jj_3R_617()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_650()) { jj_scanpos = xsp; break; }
+ if (jj_3R_651()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3_89()
- {
- if (jj_done) return true;
- if (jj_3R_126()) return true;
- return false;
- }
-
- inline bool jj_3R_525()
+ inline bool jj_3R_526()
{
if (jj_done) return true;
- if (jj_3R_404()) return true;
+ if (jj_3R_405()) return true;
return false;
}
- inline bool jj_3_88()
+ inline bool jj_3_89()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -5660,74 +6074,76 @@ void parseInline();
return false;
}
- inline bool jj_3R_437()
+ inline bool jj_3R_438()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_88()) jj_scanpos = xsp;
+ if (jj_3_89()) jj_scanpos = xsp;
if (jj_3R_114()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_525()) jj_scanpos = xsp;
- if (jj_3R_317()) return true;
+ if (jj_3R_526()) jj_scanpos = xsp;
+ if (jj_3R_318()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_660()
- {
- if (jj_done) return true;
- if (jj_3R_328()) return true;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
- inline bool jj_3R_436()
+ inline bool jj_3R_437()
{
if (jj_done) return true;
if (jj_3R_127()) return true;
return false;
}
- inline bool jj_3R_386()
+ inline bool jj_3R_387()
{
if (jj_done) return true;
- if (jj_3R_476()) return true;
+ if (jj_3R_477()) return true;
if (jj_3R_68()) return true;
return false;
}
- inline bool jj_3R_506()
+ inline bool jj_3R_661()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_564()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_329()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_360()
+ inline bool jj_3R_361()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_435()) return false;
+ if (jj_3R_436()) {
jj_scanpos = xsp;
- if (!jj_3R_436()) return false;
+ if (jj_3R_437()) {
jj_scanpos = xsp;
- if (jj_3R_437()) return true;
+ if (jj_3R_438()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_435()
+ inline bool jj_3R_436()
{
if (jj_done) return true;
if (jj_3R_126()) return true;
return false;
}
- inline bool jj_3R_559()
+ inline bool jj_3R_507()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_565()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_560()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -5735,194 +6151,207 @@ void parseInline();
if (jj_scan_token(BLOCK_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_613()) jj_scanpos = xsp;
+ if (jj_3R_614()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(56)) jj_scanpos = xsp;
- if (jj_3R_614()) return true;
if (jj_3R_615()) return true;
- if (jj_scan_token(BEGIN_T)) return true;
if (jj_3R_616()) return true;
+ if (jj_scan_token(BEGIN_T)) return true;
+ if (jj_3R_617()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(BLOCK_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_617()) jj_scanpos = xsp;
+ if (jj_3R_618()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_9()
+ inline bool jj_3R_402()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_401()
+ inline bool jj_3_9()
{
if (jj_done) return true;
- if (jj_scan_token(MINUS_T)) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_418()
+ inline bool jj_3R_314()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_506()) jj_scanpos = xsp;
+ if (jj_3R_401()) {
+ jj_scanpos = xsp;
+ if (jj_3R_402()) return true;
+ }
return false;
}
- inline bool jj_3R_313()
+ inline bool jj_3R_401()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_400()) return false;
- jj_scanpos = xsp;
- if (jj_3R_401()) return true;
+ if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3R_400()
+ inline bool jj_3R_552()
{
if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
+ if (jj_scan_token(ROR_T)) return true;
return false;
}
- inline bool jj_3R_551()
+ inline bool jj_3R_419()
{
if (jj_done) return true;
- if (jj_scan_token(ROR_T)) return true;
+ if (jj_3R_59()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_507()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_550()
+ inline bool jj_3R_551()
{
if (jj_done) return true;
if (jj_scan_token(ROL_T)) return true;
return false;
}
- inline bool jj_3R_648()
+ inline bool jj_3R_550()
{
if (jj_done) return true;
- if (jj_3R_537()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_660()) jj_scanpos = xsp;
+ if (jj_scan_token(SRA_T)) return true;
return false;
}
inline bool jj_3R_549()
{
if (jj_done) return true;
- if (jj_scan_token(SRA_T)) return true;
+ if (jj_scan_token(SLA_T)) return true;
return false;
}
inline bool jj_3R_548()
{
if (jj_done) return true;
- if (jj_scan_token(SLA_T)) return true;
+ if (jj_scan_token(SRL_T)) return true;
return false;
}
- inline bool jj_3R_647()
+ inline bool jj_3R_649()
+ {
+ if (jj_done) return true;
+ if (jj_3R_538()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_661()) jj_scanpos = xsp;
+ return false;
+ }
+
+ inline bool jj_3R_648()
{
if (jj_done) return true;
if (jj_3R_66()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_659()) jj_scanpos = xsp;
+ if (jj_3R_660()) jj_scanpos = xsp;
return false;
}
inline bool jj_3R_547()
{
if (jj_done) return true;
- if (jj_scan_token(SRL_T)) return true;
+ if (jj_scan_token(SLL_T)) return true;
return false;
}
- inline bool jj_3R_614()
+ inline bool jj_3R_477()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_647()) jj_scanpos = xsp;
+ if (jj_3R_547()) {
+ jj_scanpos = xsp;
+ if (jj_3R_548()) {
+ jj_scanpos = xsp;
+ if (jj_3R_549()) {
+ jj_scanpos = xsp;
+ if (jj_3R_550()) {
+ jj_scanpos = xsp;
+ if (jj_3R_551()) {
+ jj_scanpos = xsp;
+ if (jj_3R_552()) return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ inline bool jj_3R_615()
+ {
+ if (jj_done) return true;
+ Token * xsp;
xsp = jj_scanpos;
if (jj_3R_648()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_649()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_649()
+ inline bool jj_3R_650()
{
if (jj_done) return true;
if (jj_3R_140()) return true;
return false;
}
- inline bool jj_3R_615()
+ inline bool jj_3R_616()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_649()) { jj_scanpos = xsp; break; }
+ if (jj_3R_650()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_546()
- {
- if (jj_done) return true;
- if (jj_scan_token(SLL_T)) return true;
- return false;
- }
-
- inline bool jj_3R_476()
+ inline bool jj_3R_307()
{
if (jj_done) return true;
+ if (jj_3R_68()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_546()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_547()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_548()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_549()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_550()) return false;
- jj_scanpos = xsp;
- if (jj_3R_551()) return true;
+ if (jj_3R_387()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_306()
+ inline bool jj_3R_245()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_386()) jj_scanpos = xsp;
+ if (jj_3R_363()) return true;
return false;
}
- inline bool jj_3R_299()
+ inline bool jj_3R_300()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_383()) return true;
return false;
}
- inline bool jj_3R_244()
+ inline bool jj_3_88()
{
if (jj_done) return true;
- if (jj_3R_362()) return true;
+ if (jj_3R_125()) return true;
return false;
}
@@ -5936,7 +6365,7 @@ void parseInline();
inline bool jj_3_87()
{
if (jj_done) return true;
- if (jj_3R_125()) return true;
+ if (jj_3R_124()) return true;
return false;
}
@@ -5947,6 +6376,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_299()
+ {
+ if (jj_done) return true;
+ if (jj_3R_382()) return true;
+ return false;
+ }
+
inline bool jj_3R_298()
{
if (jj_done) return true;
@@ -5961,78 +6397,78 @@ void parseInline();
return false;
}
- inline bool jj_3R_296()
+ inline bool jj_3_86()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_123()) return true;
return false;
}
- inline bool jj_3_86()
+ inline bool jj_3R_296()
{
if (jj_done) return true;
- if (jj_3R_124()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_295()
+ inline bool jj_3R_118()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_85()
+ inline bool jj_3_81()
{
if (jj_done) return true;
- if (jj_3R_123()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_118()) jj_scanpos = xsp;
+ if (jj_3R_114()) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
return false;
}
- inline bool jj_3R_118()
+ inline bool jj_3_85()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_122()) return true;
return false;
}
- inline bool jj_3R_293()
+ inline bool jj_3R_294()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ if (jj_3R_378()) return true;
return false;
}
- inline bool jj_3R_294()
+ inline bool jj_3R_295()
{
if (jj_done) return true;
if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_292()
+ inline bool jj_3_84()
{
if (jj_done) return true;
- if (jj_3R_376()) return true;
+ if (jj_3R_121()) return true;
return false;
}
- inline bool jj_3_80()
+ inline bool jj_3R_293()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_118()) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_377()) return true;
return false;
}
- inline bool jj_3_84()
+ inline bool jj_3R_292()
{
if (jj_done) return true;
- if (jj_3R_122()) return true;
+ if (jj_3R_376()) return true;
return false;
}
@@ -6043,17 +6479,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_290()
+ inline bool jj_3_83()
{
if (jj_done) return true;
- if (jj_3R_374()) return true;
+ if (jj_3R_120()) return true;
return false;
}
- inline bool jj_3_83()
+ inline bool jj_3R_290()
{
if (jj_done) return true;
- if (jj_3R_121()) return true;
+ if (jj_3R_374()) return true;
return false;
}
@@ -6078,31 +6514,24 @@ void parseInline();
return false;
}
- inline bool jj_3_82()
+ inline bool jj_3R_421()
{
if (jj_done) return true;
- if (jj_3R_120()) return true;
+ if (jj_3R_508()) return true;
return false;
}
- inline bool jj_3R_286()
+ inline bool jj_3_82()
{
if (jj_done) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_119()) return true;
return false;
}
inline bool jj_3R_420()
{
if (jj_done) return true;
- if (jj_3R_507()) return true;
- return false;
- }
-
- inline bool jj_3R_419()
- {
- if (jj_done) return true;
- if (jj_3R_381()) return true;
+ if (jj_3R_382()) return true;
return false;
}
@@ -6111,54 +6540,62 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_285()) return false;
+ if (jj_3R_286()) {
jj_scanpos = xsp;
- if (!jj_3R_286()) return false;
+ if (jj_3R_287()) {
jj_scanpos = xsp;
- if (!jj_3R_287()) return false;
+ if (jj_3R_288()) {
jj_scanpos = xsp;
- if (!jj_3R_288()) return false;
+ if (jj_3R_289()) {
jj_scanpos = xsp;
- if (!jj_3R_289()) return false;
+ if (jj_3R_290()) {
jj_scanpos = xsp;
- if (!jj_3R_290()) return false;
+ if (jj_3R_291()) {
jj_scanpos = xsp;
- if (!jj_3R_291()) return false;
+ if (jj_3R_292()) {
jj_scanpos = xsp;
- if (!jj_3R_292()) return false;
+ if (jj_3R_293()) {
jj_scanpos = xsp;
- if (!jj_3R_293()) return false;
+ if (jj_3R_294()) {
jj_scanpos = xsp;
- if (!jj_3R_294()) return false;
+ if (jj_3R_295()) {
jj_scanpos = xsp;
- if (!jj_3R_295()) return false;
+ if (jj_3R_296()) {
jj_scanpos = xsp;
- if (!jj_3R_296()) return false;
+ if (jj_3R_297()) {
jj_scanpos = xsp;
- if (!jj_3R_297()) return false;
+ if (jj_3R_298()) {
jj_scanpos = xsp;
- if (!jj_3R_298()) return false;
+ if (jj_3R_299()) {
jj_scanpos = xsp;
- if (!jj_3_8()) return false;
+ if (jj_3_8()) {
jj_scanpos = xsp;
- if (jj_3R_299()) return true;
+ if (jj_3R_300()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_285()
+ inline bool jj_3R_286()
{
if (jj_done) return true;
if (jj_3R_92()) return true;
return false;
}
- inline bool jj_3_81()
- {
- if (jj_done) return true;
- if (jj_3R_119()) return true;
- return false;
- }
-
inline bool jj_3R_113()
{
if (jj_done) return true;
@@ -6167,14 +6604,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_243()
+ inline bool jj_3R_244()
{
if (jj_done) return true;
- if (jj_3R_361()) return true;
+ if (jj_3R_362()) return true;
return false;
}
- inline bool jj_3_76()
+ inline bool jj_3_77()
{
if (jj_done) return true;
Token * xsp;
@@ -6185,19 +6622,26 @@ void parseInline();
return false;
}
- inline bool jj_3R_332()
+ inline bool jj_3_80()
+ {
+ if (jj_done) return true;
+ if (jj_3R_117()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_333()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_418()) return true;
+ if (jj_3R_419()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_419()) { jj_scanpos = xsp; break; }
+ if (jj_3R_420()) { jj_scanpos = xsp; break; }
}
while (true) {
xsp = jj_scanpos;
- if (jj_3R_420()) { jj_scanpos = xsp; break; }
+ if (jj_3R_421()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(FOR_T)) return true;
@@ -6208,29 +6652,22 @@ void parseInline();
inline bool jj_3_79()
{
if (jj_done) return true;
- if (jj_3R_117()) return true;
- return false;
- }
-
- inline bool jj_3_78()
- {
- if (jj_done) return true;
if (jj_3R_116()) return true;
return false;
}
- inline bool jj_3_77()
+ inline bool jj_3_78()
{
if (jj_done) return true;
if (jj_3R_115()) return true;
return false;
}
- inline bool jj_3R_504()
+ inline bool jj_3R_505()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_317()) return true;
+ if (jj_3R_318()) return true;
if (jj_scan_token(WHEN_T)) return true;
if (jj_3R_85()) return true;
return false;
@@ -6241,38 +6678,58 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_242()) return false;
+ if (jj_3R_243()) {
jj_scanpos = xsp;
- if (!jj_3_77()) return false;
+ if (jj_3_78()) {
jj_scanpos = xsp;
- if (!jj_3_78()) return false;
+ if (jj_3_79()) {
jj_scanpos = xsp;
- if (!jj_3_79()) return false;
+ if (jj_3_80()) {
jj_scanpos = xsp;
- if (!jj_3R_243()) return false;
+ if (jj_3R_244()) {
jj_scanpos = xsp;
- if (!jj_3_81()) return false;
+ if (jj_3_82()) {
jj_scanpos = xsp;
- if (!jj_3_82()) return false;
+ if (jj_3_83()) {
jj_scanpos = xsp;
- if (!jj_3_83()) return false;
+ if (jj_3_84()) {
jj_scanpos = xsp;
- if (!jj_3_84()) return false;
+ if (jj_3_85()) {
jj_scanpos = xsp;
- if (!jj_3_85()) return false;
+ if (jj_3_86()) {
jj_scanpos = xsp;
- if (!jj_3_86()) return false;
+ if (jj_3_87()) {
jj_scanpos = xsp;
- if (!jj_3_87()) return false;
+ if (jj_3_88()) {
jj_scanpos = xsp;
- if (jj_3R_244()) return true;
+ if (jj_3R_245()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_242()
+ inline bool jj_3R_243()
{
if (jj_done) return true;
- if (jj_3R_360()) return true;
+ if (jj_3R_361()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_509()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_59()) return true;
return false;
}
@@ -6283,7 +6740,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_239()
+ inline bool jj_3R_240()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -6292,116 +6749,108 @@ void parseInline();
return false;
}
- inline bool jj_3R_508()
+ inline bool jj_3_76()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3_75()
+ inline bool jj_3R_259()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3_76()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_417()
+ inline bool jj_3R_418()
{
if (jj_done) return true;
- if (jj_3R_328()) return true;
+ if (jj_3R_329()) return true;
return false;
}
- inline bool jj_3R_416()
+ inline bool jj_3R_417()
{
if (jj_done) return true;
if (jj_3R_70()) return true;
return false;
}
- inline bool jj_3R_258()
+ inline bool jj_3R_416()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3_75()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(USE_T)) return true;
+ if (jj_3R_506()) return true;
return false;
}
- inline bool jj_3R_415()
+ inline bool jj_3R_422()
{
if (jj_done) return true;
- if (jj_scan_token(USE_T)) return true;
- if (jj_3R_505()) return true;
+ if (jj_3R_59()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_509()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_331()
+ inline bool jj_3R_332()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_415()) jj_scanpos = xsp;
- xsp = jj_scanpos;
if (jj_3R_416()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_417()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_418()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_421()
- {
- if (jj_done) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_508()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- inline bool jj_3R_266()
+ inline bool jj_3R_267()
{
if (jj_done) return true;
if (jj_3R_58()) return true;
return false;
}
- inline bool jj_3R_363()
+ inline bool jj_3R_364()
{
if (jj_done) return true;
if (jj_scan_token(ON_T)) return true;
- if (jj_3R_421()) return true;
+ if (jj_3R_422()) return true;
return false;
}
- inline bool jj_3_74()
+ inline bool jj_3_75()
{
if (jj_done) return true;
if (jj_3R_111()) return true;
return false;
}
- inline bool jj_3R_410()
+ inline bool jj_3R_411()
{
if (jj_done) return true;
- if (jj_3R_317()) return true;
+ if (jj_3R_318()) return true;
if (jj_scan_token(WHEN_T)) return true;
if (jj_3R_85()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_504()) { jj_scanpos = xsp; break; }
+ if (jj_3R_505()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_324()
+ inline bool jj_3R_325()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
@@ -6410,19 +6859,19 @@ void parseInline();
if (jj_3R_114()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
if (jj_3R_166()) return true;
- if (jj_3R_410()) return true;
+ if (jj_3R_411()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_688()
+ inline bool jj_3R_689()
{
if (jj_done) return true;
if (jj_3R_111()) return true;
return false;
}
- inline bool jj_3R_471()
+ inline bool jj_3R_472()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -6431,7 +6880,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_338()
+ inline bool jj_3R_339()
{
if (jj_done) return true;
if (jj_scan_token(SEVERITY_T)) return true;
@@ -6439,7 +6888,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_359()
+ inline bool jj_3R_360()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -6449,93 +6898,95 @@ void parseInline();
return false;
}
- inline bool jj_3R_378()
+ inline bool jj_3R_379()
{
if (jj_done) return true;
if (jj_scan_token(ATTRIBUTE_T)) return true;
- if (jj_3R_219()) return true;
+ if (jj_3R_220()) return true;
if (jj_scan_token(OF_T)) return true;
- if (jj_3R_469()) return true;
+ if (jj_3R_470()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_3R_58()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_315()
+ inline bool jj_3R_316()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_314()) return true;
+ if (jj_3R_315()) return true;
return false;
}
- inline bool jj_3R_110()
+ inline bool jj_3R_677()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(APOSTROPHE_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_81()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_239()) jj_scanpos = xsp;
+ if (jj_3R_689()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_676()
+ inline bool jj_3R_110()
{
if (jj_done) return true;
- if (jj_3R_81()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(APOSTROPHE_T)) return true;
+ if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_688()) jj_scanpos = xsp;
+ if (jj_3R_240()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_354()
+ inline bool jj_3R_676()
{
if (jj_done) return true;
- if (jj_scan_token(RANGE_T)) return true;
+ if (jj_3R_688()) return true;
return false;
}
- inline bool jj_3R_675()
+ inline bool jj_3R_654()
{
if (jj_done) return true;
- if (jj_3R_687()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_676()) {
+ jj_scanpos = xsp;
+ if (jj_3R_677()) return true;
+ }
return false;
}
- inline bool jj_3R_653()
+ inline bool jj_3R_355()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_675()) return false;
- jj_scanpos = xsp;
- if (jj_3R_676()) return true;
+ if (jj_scan_token(RANGE_T)) return true;
return false;
}
- inline bool jj_3R_219()
+ inline bool jj_3R_220()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_353()) return false;
+ if (jj_3R_354()) {
jj_scanpos = xsp;
- if (jj_3R_354()) return true;
+ if (jj_3R_355()) return true;
+ }
return false;
}
- inline bool jj_3R_353()
+ inline bool jj_3R_354()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_265()
+ inline bool jj_3R_266()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -6548,15 +6999,15 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_265()) jj_scanpos = xsp;
+ if (jj_3R_266()) jj_scanpos = xsp;
if (jj_scan_token(RETURN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_266()) jj_scanpos = xsp;
+ if (jj_3R_267()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_249()
+ inline bool jj_3R_250()
{
if (jj_done) return true;
if (jj_scan_token(SEVERITY_T)) return true;
@@ -6564,6 +7015,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_308()
+ {
+ if (jj_done) return true;
+ if (jj_3R_388()) return true;
+ if (jj_3R_307()) return true;
+ return false;
+ }
+
inline bool jj_3_6()
{
if (jj_done) return true;
@@ -6583,7 +7042,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_337()
+ inline bool jj_3R_338()
{
if (jj_done) return true;
if (jj_scan_token(REPORT_T)) return true;
@@ -6591,56 +7050,48 @@ void parseInline();
return false;
}
- inline bool jj_3R_307()
+ inline bool jj_3R_249()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
- if (jj_3R_306()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
inline bool jj_3R_165()
{
if (jj_done) return true;
- if (jj_3R_314()) return true;
+ if (jj_3R_315()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_315()) { jj_scanpos = xsp; break; }
+ if (jj_3R_316()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_248()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
inline bool jj_3R_116()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_248()) jj_scanpos = xsp;
+ if (jj_3R_249()) jj_scanpos = xsp;
if (jj_scan_token(REPORT_T)) return true;
if (jj_3R_58()) return true;
xsp = jj_scanpos;
- if (jj_3R_249()) jj_scanpos = xsp;
+ if (jj_3R_250()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_700()
+ inline bool jj_3R_701()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_402()
+ inline bool jj_3R_403()
{
if (jj_done) return true;
if (jj_3R_63()) return true;
@@ -6648,38 +7099,52 @@ void parseInline();
return false;
}
- inline bool jj_3R_314()
+ inline bool jj_3R_483()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(NOTEQU_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_315()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_402()) jj_scanpos = xsp;
- if (jj_3R_403()) return true;
+ if (jj_3R_403()) jj_scanpos = xsp;
+ if (jj_3R_404()) return true;
return false;
}
inline bool jj_3R_482()
{
if (jj_done) return true;
- if (jj_scan_token(NOTEQU_T)) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
inline bool jj_3R_481()
{
if (jj_done) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(GREATERTHAN_T)) return true;
return false;
}
inline bool jj_3R_480()
{
if (jj_done) return true;
- if (jj_scan_token(GREATERTHAN_T)) return true;
+ if (jj_scan_token(EQU_T)) return true;
return false;
}
- inline bool jj_3R_247()
+ inline bool jj_3R_479()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GT_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_248()
{
if (jj_done) return true;
if (jj_3R_139()) return true;
@@ -6687,17 +7152,34 @@ void parseInline();
return false;
}
- inline bool jj_3R_479()
+ inline bool jj_3R_388()
{
if (jj_done) return true;
- if (jj_scan_token(EQU_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_478()) {
+ jj_scanpos = xsp;
+ if (jj_3R_479()) {
+ jj_scanpos = xsp;
+ if (jj_3R_480()) {
+ jj_scanpos = xsp;
+ if (jj_3R_481()) {
+ jj_scanpos = xsp;
+ if (jj_3R_482()) {
+ jj_scanpos = xsp;
+ if (jj_3R_483()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
inline bool jj_3R_478()
{
if (jj_done) return true;
- if (jj_scan_token(GT_T)) return true;
+ if (jj_scan_token(LT_T)) return true;
return false;
}
@@ -6706,52 +7188,43 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_247()) jj_scanpos = xsp;
+ if (jj_3R_248()) jj_scanpos = xsp;
if (jj_3R_187()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_387()
+ inline bool jj_3R_145()
{
if (jj_done) return true;
+ if (jj_3R_307()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_477()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_478()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_479()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_480()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_481()) return false;
- jj_scanpos = xsp;
- if (jj_3R_482()) return true;
+ if (jj_3R_308()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_477()
+ inline bool jj_3R_700()
{
if (jj_done) return true;
- if (jj_scan_token(LT_T)) return true;
+ if (jj_3R_705()) return true;
return false;
}
- inline bool jj_3R_145()
+ inline bool jj_3R_691()
{
if (jj_done) return true;
- if (jj_3R_306()) return true;
+ if (jj_scan_token(RECORD_T)) return true;
Token * xsp;
+ if (jj_3R_700()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_700()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(RECORD_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_307()) jj_scanpos = xsp;
- return false;
- }
-
- inline bool jj_3R_699()
- {
- if (jj_done) return true;
- if (jj_3R_704()) return true;
+ if (jj_3R_701()) jj_scanpos = xsp;
return false;
}
@@ -6762,9 +7235,9 @@ void parseInline();
if (jj_3R_79()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_337()) jj_scanpos = xsp;
- xsp = jj_scanpos;
if (jj_3R_338()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_339()) jj_scanpos = xsp;
return false;
}
@@ -6775,73 +7248,57 @@ void parseInline();
return false;
}
- inline bool jj_3R_690()
+ inline bool jj_3_73()
{
if (jj_done) return true;
- if (jj_scan_token(RECORD_T)) return true;
- Token * xsp;
- if (jj_3R_699()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_699()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(RECORD_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_700()) jj_scanpos = xsp;
+ if (jj_3R_68()) return true;
+ if (jj_3R_109()) return true;
+ if (jj_3R_68()) return true;
return false;
}
- inline bool jj_3R_698()
+ inline bool jj_3_74()
{
if (jj_done) return true;
- if (jj_3R_703()) return true;
+ if (jj_3R_110()) return true;
return false;
}
- inline bool jj_3_72()
+ inline bool jj_3R_699()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
- if (jj_3R_109()) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_704()) return true;
return false;
}
- inline bool jj_3_73()
+ inline bool jj_3R_81()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_scan_token(RANGE_T)) return true;
+ if (jj_3R_83()) return true;
return false;
}
- inline bool jj_3R_697()
+ inline bool jj_3R_698()
{
if (jj_done) return true;
if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_689()
+ inline bool jj_3R_690()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_697()) return false;
+ if (jj_3R_698()) {
jj_scanpos = xsp;
- if (jj_3R_698()) return true;
- return false;
- }
-
- inline bool jj_3R_81()
- {
- if (jj_done) return true;
- if (jj_scan_token(RANGE_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_699()) return true;
+ }
return false;
}
- inline bool jj_3_71()
+ inline bool jj_3_72()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
@@ -6869,13 +7326,14 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_181()) return false;
+ if (jj_3R_181()) {
jj_scanpos = xsp;
if (jj_3R_182()) return true;
+ }
return false;
}
- inline bool jj_3R_227()
+ inline bool jj_3R_228()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -6884,17 +7342,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_226()
+ inline bool jj_3R_227()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3R_465()
+ inline bool jj_3R_466()
{
if (jj_done) return true;
- if (jj_3R_233()) return true;
+ if (jj_3R_234()) return true;
return false;
}
@@ -6905,13 +7363,14 @@ void parseInline();
if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_226()) return false;
+ if (jj_3R_227()) {
jj_scanpos = xsp;
- if (jj_3R_227()) return true;
+ if (jj_3R_228()) return true;
+ }
return false;
}
- inline bool jj_3R_341()
+ inline bool jj_3R_342()
{
if (jj_done) return true;
if (jj_3R_112()) return true;
@@ -6924,7 +7383,7 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_341()) { jj_scanpos = xsp; break; }
+ if (jj_3R_342()) { jj_scanpos = xsp; break; }
}
return false;
}
@@ -6936,22 +7395,22 @@ void parseInline();
return false;
}
- inline bool jj_3R_236()
+ inline bool jj_3R_340()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_235()) return true;
+ if (jj_3R_422()) return true;
return false;
}
- inline bool jj_3R_339()
+ inline bool jj_3R_237()
{
if (jj_done) return true;
- if (jj_3R_421()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_236()) return true;
return false;
}
- inline bool jj_3R_575()
+ inline bool jj_3R_576()
{
if (jj_done) return true;
if (jj_scan_token(NEW_T)) return true;
@@ -6959,14 +7418,15 @@ void parseInline();
return false;
}
- inline bool jj_3R_530()
+ inline bool jj_3R_531()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_4()) return false;
+ if (jj_3_4()) {
jj_scanpos = xsp;
- if (jj_3R_575()) return true;
+ if (jj_3R_576()) return true;
+ }
return false;
}
@@ -6978,37 +7438,39 @@ void parseInline();
return false;
}
- inline bool jj_3R_536()
+ inline bool jj_3R_537()
{
if (jj_done) return true;
- if (jj_3R_309()) return true;
+ if (jj_3R_310()) return true;
return false;
}
- inline bool jj_3R_535()
+ inline bool jj_3R_536()
{
if (jj_done) return true;
if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_534()
+ inline bool jj_3R_535()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_463()
+ inline bool jj_3R_464()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_534()) return false;
+ if (jj_3R_535()) {
jj_scanpos = xsp;
- if (!jj_3R_535()) return false;
+ if (jj_3R_536()) {
jj_scanpos = xsp;
- if (jj_3R_536()) return true;
+ if (jj_3R_537()) return true;
+ }
+ }
return false;
}
@@ -7018,14 +7480,15 @@ void parseInline();
if (jj_scan_token(LPAREN_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(15)) return false;
+ if (jj_scan_token(15)) {
jj_scanpos = xsp;
- if (jj_3R_339()) return true;
+ if (jj_3R_340()) return true;
+ }
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_464()
+ inline bool jj_3R_465()
{
if (jj_done) return true;
if (jj_scan_token(COLON_T)) return true;
@@ -7033,36 +7496,22 @@ void parseInline();
return false;
}
- inline bool jj_3R_376()
+ inline bool jj_3R_377()
{
if (jj_done) return true;
if (jj_scan_token(ALIAS_T)) return true;
- if (jj_3R_463()) return true;
+ if (jj_3R_464()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_464()) jj_scanpos = xsp;
+ if (jj_3R_465()) jj_scanpos = xsp;
if (jj_scan_token(IS_T)) return true;
if (jj_3R_59()) return true;
xsp = jj_scanpos;
- if (jj_3R_465()) jj_scanpos = xsp;
+ if (jj_3R_466()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_108()
- {
- if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_235()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_236()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_188()
{
if (jj_done) return true;
@@ -7071,17 +7520,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_272()
- {
- if (jj_done) return true;
- if (jj_scan_token(MINUS_T)) return true;
- return false;
- }
-
- inline bool jj_3R_273()
+ inline bool jj_3R_108()
{
if (jj_done) return true;
- if (jj_scan_token(AMPERSAND_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_236()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_237()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -7111,30 +7560,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_340()
+ inline bool jj_3R_341()
{
if (jj_done) return true;
- if (jj_3R_422()) return true;
+ if (jj_3R_423()) return true;
return false;
}
- inline bool jj_3R_128()
+ inline bool jj_3R_273()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_271()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_272()) return false;
- jj_scanpos = xsp;
- if (jj_3R_273()) return true;
+ if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_271()
+ inline bool jj_3R_274()
{
if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
+ if (jj_scan_token(AMPERSAND_T)) return true;
return false;
}
@@ -7144,90 +7587,99 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_340()) { jj_scanpos = xsp; break; }
+ if (jj_3R_341()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3_3()
+ inline bool jj_3R_128()
{
if (jj_done) return true;
- if (jj_3R_60()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_272()) {
+ jj_scanpos = xsp;
+ if (jj_3R_273()) {
+ jj_scanpos = xsp;
+ if (jj_3R_274()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_518()
+ inline bool jj_3R_272()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3R_491()
+ inline bool jj_3R_519()
{
if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
+ if (jj_3R_383()) return true;
return false;
}
- inline bool jj_3R_492()
+ inline bool jj_3_3()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
if (jj_3R_60()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_70()
+ inline bool jj_3R_518()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_382()) return true;
return false;
}
- inline bool jj_3R_517()
+ inline bool jj_3_71()
{
if (jj_done) return true;
- if (jj_3R_381()) return true;
+ if (jj_3R_65()) return true;
return false;
}
- inline bool jj_3R_516()
+ inline bool jj_3R_517()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_403()
+ inline bool jj_3R_492()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_490()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_491()) return false;
- jj_scanpos = xsp;
- if (jj_3R_492()) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_490()
+ inline bool jj_3R_493()
{
if (jj_done) return true;
+ if (jj_3R_59()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_69()
+ inline bool jj_3_70()
{
if (jj_done) return true;
if (jj_3R_64()) return true;
return false;
}
+ inline bool jj_3R_516()
+ {
+ if (jj_done) return true;
+ if (jj_3R_377()) return true;
+ return false;
+ }
+
inline bool jj_3R_515()
{
if (jj_done) return true;
@@ -7235,10 +7687,25 @@ void parseInline();
return false;
}
- inline bool jj_3_2()
+ inline bool jj_3R_404()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_491()) {
+ jj_scanpos = xsp;
+ if (jj_3R_492()) {
+ jj_scanpos = xsp;
+ if (jj_3R_493()) return true;
+ }
+ }
+ return false;
+ }
+
+ inline bool jj_3R_491()
+ {
+ if (jj_done) return true;
+ if (jj_3R_60()) return true;
return false;
}
@@ -7252,14 +7719,14 @@ void parseInline();
inline bool jj_3R_513()
{
if (jj_done) return true;
- if (jj_3R_374()) return true;
+ if (jj_3R_373()) return true;
return false;
}
- inline bool jj_3R_225()
+ inline bool jj_3_2()
{
if (jj_done) return true;
- if (jj_3R_165()) return true;
+ if (jj_3R_59()) return true;
return false;
}
@@ -7277,10 +7744,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_510()
+ inline bool jj_3R_226()
{
if (jj_done) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_165()) return true;
return false;
}
@@ -7291,49 +7758,60 @@ void parseInline();
return false;
}
- inline bool jj_3R_422()
+ inline bool jj_3R_423()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_509()) return false;
+ if (jj_3R_510()) {
jj_scanpos = xsp;
- if (!jj_3R_510()) return false;
+ if (jj_3R_511()) {
jj_scanpos = xsp;
- if (!jj_3R_511()) return false;
+ if (jj_3R_512()) {
jj_scanpos = xsp;
- if (!jj_3R_512()) return false;
+ if (jj_3R_513()) {
jj_scanpos = xsp;
- if (!jj_3R_513()) return false;
+ if (jj_3R_514()) {
jj_scanpos = xsp;
- if (!jj_3R_514()) return false;
+ if (jj_3R_515()) {
jj_scanpos = xsp;
- if (!jj_3R_515()) return false;
+ if (jj_3R_516()) {
jj_scanpos = xsp;
- if (!jj_3_69()) return false;
+ if (jj_3_70()) {
jj_scanpos = xsp;
- if (!jj_3R_516()) return false;
+ if (jj_3R_517()) {
jj_scanpos = xsp;
- if (!jj_3R_517()) return false;
+ if (jj_3R_518()) {
jj_scanpos = xsp;
- if (!jj_3_70()) return false;
+ if (jj_3_71()) {
jj_scanpos = xsp;
- if (jj_3R_518()) return true;
+ if (jj_3R_519()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_509()
+ inline bool jj_3R_510()
{
if (jj_done) return true;
if (jj_3R_92()) return true;
return false;
}
- inline bool jj_3R_329()
+ inline bool jj_3R_330()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_225()) return true;
+ if (jj_3R_226()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -7345,14 +7823,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_152()
- {
- if (jj_done) return true;
- if (jj_3R_58()) return true;
- return false;
- }
-
- inline bool jj_3_68()
+ inline bool jj_3_69()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -7365,12 +7836,19 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_68()) jj_scanpos = xsp;
+ if (jj_3_69()) jj_scanpos = xsp;
if (jj_3R_176()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
+ inline bool jj_3R_152()
+ {
+ if (jj_done) return true;
+ if (jj_3R_58()) return true;
+ return false;
+ }
+
inline bool jj_3R_151()
{
if (jj_done) return true;
@@ -7383,19 +7861,13 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_151()) return false;
+ if (jj_3R_151()) {
jj_scanpos = xsp;
- if (!jj_3R_152()) return false;
+ if (jj_3R_152()) {
jj_scanpos = xsp;
if (jj_3R_153()) return true;
- return false;
- }
-
- inline bool jj_3R_655()
- {
- if (jj_done) return true;
- if (jj_scan_token(ACCESS_T)) return true;
- if (jj_3R_84()) return true;
+ }
+ }
return false;
}
@@ -7405,39 +7877,54 @@ void parseInline();
if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_329()) jj_scanpos = xsp;
+ if (jj_3R_330()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_66()
+ inline bool jj_3_67()
{
if (jj_done) return true;
if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3R_224()
+ inline bool jj_3R_656()
{
if (jj_done) return true;
- if (jj_scan_token(BASED_LITERAL)) return true;
+ if (jj_scan_token(ACCESS_T)) return true;
+ if (jj_3R_84()) return true;
return false;
}
inline bool jj_3R_204()
{
if (jj_done) return true;
- if (jj_3R_350()) return true;
+ if (jj_3R_351()) return true;
return false;
}
- inline bool jj_3R_223()
+ inline bool jj_3R_225()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(BASED_LITERAL)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_224()
{
if (jj_done) return true;
if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_222()
+ inline bool jj_3_68()
+ {
+ if (jj_done) return true;
+ if (jj_3R_107()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_223()
{
if (jj_done) return true;
if (jj_scan_token(DECIMAL_LITERAL)) return true;
@@ -7449,18 +7936,13 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_222()) return false;
+ if (jj_3R_223()) {
jj_scanpos = xsp;
- if (!jj_3R_223()) return false;
+ if (jj_3R_224()) {
jj_scanpos = xsp;
- if (jj_3R_224()) return true;
- return false;
- }
-
- inline bool jj_3_67()
- {
- if (jj_done) return true;
- if (jj_3R_107()) return true;
+ if (jj_3R_225()) return true;
+ }
+ }
return false;
}
@@ -7474,14 +7956,14 @@ void parseInline();
inline bool jj_3R_202()
{
if (jj_done) return true;
- if (jj_3R_349()) return true;
+ if (jj_3R_350()) return true;
return false;
}
inline bool jj_3R_201()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_349()) return true;
return false;
}
@@ -7490,68 +7972,72 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_201()) return false;
+ if (jj_3R_201()) {
jj_scanpos = xsp;
- if (!jj_3R_202()) return false;
+ if (jj_3R_202()) {
jj_scanpos = xsp;
- if (!jj_3R_203()) return false;
+ if (jj_3R_203()) {
jj_scanpos = xsp;
- if (!jj_3_67()) return false;
+ if (jj_3_68()) {
jj_scanpos = xsp;
if (jj_3R_204()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3_65()
+ inline bool jj_3_66()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3_64()
+ inline bool jj_3_65()
{
if (jj_done) return true;
if (jj_3R_106()) return true;
return false;
}
- inline bool jj_3R_456()
+ inline bool jj_3R_457()
{
if (jj_done) return true;
if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3_63()
+ inline bool jj_3_64()
{
if (jj_done) return true;
if (jj_3R_105()) return true;
return false;
}
- inline bool jj_3R_455()
+ inline bool jj_3R_456()
{
if (jj_done) return true;
- if (jj_3R_530()) return true;
+ if (jj_3R_531()) return true;
return false;
}
- inline bool jj_3_62()
+ inline bool jj_3_63()
{
if (jj_done) return true;
if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_454()
+ inline bool jj_3R_455()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3_61()
+ inline bool jj_3_62()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -7560,42 +8046,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_453()
+ inline bool jj_3R_454()
{
if (jj_done) return true;
if (jj_3R_106()) return true;
return false;
}
- inline bool jj_3_60()
+ inline bool jj_3_61()
{
if (jj_done) return true;
if (jj_3R_104()) return true;
return false;
}
- inline bool jj_3R_241()
+ inline bool jj_3R_242()
{
if (jj_done) return true;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_452()
+ inline bool jj_3R_453()
{
if (jj_done) return true;
if (jj_3R_105()) return true;
return false;
}
- inline bool jj_3R_451()
+ inline bool jj_3R_452()
{
if (jj_done) return true;
if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_450()
+ inline bool jj_3R_451()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -7604,37 +8090,44 @@ void parseInline();
return false;
}
- inline bool jj_3R_369()
+ inline bool jj_3R_370()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_449()) return false;
+ if (jj_3R_450()) {
jj_scanpos = xsp;
- if (!jj_3R_450()) return false;
+ if (jj_3R_451()) {
jj_scanpos = xsp;
- if (!jj_3R_451()) return false;
+ if (jj_3R_452()) {
jj_scanpos = xsp;
- if (!jj_3R_452()) return false;
+ if (jj_3R_453()) {
jj_scanpos = xsp;
- if (!jj_3R_453()) return false;
+ if (jj_3R_454()) {
jj_scanpos = xsp;
- if (!jj_3R_454()) return false;
+ if (jj_3R_455()) {
jj_scanpos = xsp;
- if (!jj_3R_455()) return false;
+ if (jj_3R_456()) {
jj_scanpos = xsp;
- if (jj_3R_456()) return true;
+ if (jj_3R_457()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_449()
+ inline bool jj_3R_450()
{
if (jj_done) return true;
if (jj_3R_104()) return true;
return false;
}
- inline bool jj_3R_328()
+ inline bool jj_3R_329()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
@@ -7645,26 +8138,26 @@ void parseInline();
return false;
}
- inline bool jj_3R_581()
+ inline bool jj_3R_582()
{
if (jj_done) return true;
- if (jj_3R_312()) return true;
+ if (jj_3R_313()) return true;
return false;
}
- inline bool jj_3R_240()
+ inline bool jj_3R_241()
{
if (jj_done) return true;
- if (jj_3R_359()) return true;
+ if (jj_3R_360()) return true;
return false;
}
- inline bool jj_3R_537()
+ inline bool jj_3R_538()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_581()) return true;
+ if (jj_3R_582()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
@@ -7679,23 +8172,23 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_240()) { jj_scanpos = xsp; break; }
+ if (jj_3R_241()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(UNITS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_241()) jj_scanpos = xsp;
+ if (jj_3R_242()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_59()
+ inline bool jj_3_60()
{
if (jj_done) return true;
if (jj_3R_103()) return true;
return false;
}
- inline bool jj_3R_221()
+ inline bool jj_3R_222()
{
if (jj_done) return true;
if (jj_3R_103()) return true;
@@ -7707,12 +8200,12 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_221()) jj_scanpos = xsp;
+ if (jj_3R_222()) jj_scanpos = xsp;
if (jj_3R_59()) return true;
return false;
}
- inline bool jj_3R_407()
+ inline bool jj_3R_408()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -7721,28 +8214,28 @@ void parseInline();
return false;
}
- inline bool jj_3_58()
+ inline bool jj_3_59()
{
if (jj_done) return true;
if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3_56()
+ inline bool jj_3_57()
{
if (jj_done) return true;
if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3_57()
+ inline bool jj_3_58()
{
if (jj_done) return true;
if (jj_3R_65()) return true;
return false;
}
- inline bool jj_3R_350()
+ inline bool jj_3R_351()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
@@ -7750,21 +8243,21 @@ void parseInline();
return false;
}
- inline bool jj_3_55()
+ inline bool jj_3_56()
{
if (jj_done) return true;
if (jj_3R_65()) return true;
return false;
}
- inline bool jj_3R_316()
+ inline bool jj_3R_317()
{
if (jj_done) return true;
- if (jj_3R_404()) return true;
+ if (jj_3R_405()) return true;
return false;
}
- inline bool jj_3R_260()
+ inline bool jj_3R_261()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -7778,32 +8271,32 @@ void parseInline();
xsp = jj_scanpos;
if (jj_scan_token(50)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_316()) jj_scanpos = xsp;
+ if (jj_3R_317()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_309()
+ inline bool jj_3R_310()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
- inline bool jj_3R_646()
+ inline bool jj_3R_647()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
return false;
}
- inline bool jj_3R_645()
+ inline bool jj_3R_646()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_644()
+ inline bool jj_3R_645()
{
if (jj_done) return true;
if (jj_scan_token(SHARED_T)) return true;
@@ -7811,54 +8304,59 @@ void parseInline();
return false;
}
- inline bool jj_3_54()
+ inline bool jj_3_55()
{
if (jj_done) return true;
if (jj_3R_102()) return true;
return false;
}
- inline bool jj_3R_643()
+ inline bool jj_3R_644()
{
if (jj_done) return true;
if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_642()
+ inline bool jj_3R_643()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_641()
+ inline bool jj_3R_642()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_612()
+ inline bool jj_3R_613()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_641()) return false;
+ if (jj_3R_642()) {
jj_scanpos = xsp;
- if (!jj_3R_642()) return false;
+ if (jj_3R_643()) {
jj_scanpos = xsp;
- if (!jj_3R_643()) return false;
+ if (jj_3R_644()) {
jj_scanpos = xsp;
- if (!jj_3R_644()) return false;
+ if (jj_3R_645()) {
jj_scanpos = xsp;
- if (!jj_3R_645()) return false;
+ if (jj_3R_646()) {
jj_scanpos = xsp;
- if (jj_3R_646()) return true;
+ if (jj_3R_647()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_352()
+ inline bool jj_3R_353()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
@@ -7885,13 +8383,14 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_205()) return false;
+ if (jj_3R_205()) {
jj_scanpos = xsp;
if (jj_3R_206()) return true;
+ }
return false;
}
- inline bool jj_3R_440()
+ inline bool jj_3R_441()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -7899,12 +8398,12 @@ void parseInline();
return false;
}
- inline bool jj_3R_362()
+ inline bool jj_3R_363()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_440()) jj_scanpos = xsp;
+ if (jj_3R_441()) jj_scanpos = xsp;
if (jj_scan_token(NULL_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
@@ -7918,7 +8417,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_261()
+ inline bool jj_3R_262()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
@@ -7926,14 +8425,14 @@ void parseInline();
return false;
}
- inline bool jj_3_53()
+ inline bool jj_3_54()
{
if (jj_done) return true;
if (jj_scan_token(LBRACKET_T)) return true;
return false;
}
- inline bool jj_3R_259()
+ inline bool jj_3R_260()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -7946,17 +8445,17 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_259()) jj_scanpos = xsp;
- if (jj_scan_token(NEXT_T)) return true;
- xsp = jj_scanpos;
if (jj_3R_260()) jj_scanpos = xsp;
+ if (jj_scan_token(NEXT_T)) return true;
xsp = jj_scanpos;
if (jj_3R_261()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_262()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_220()
+ inline bool jj_3R_221()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -7965,14 +8464,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_218()
+ inline bool jj_3R_219()
{
if (jj_done) return true;
- if (jj_3R_233()) return true;
+ if (jj_3R_234()) return true;
return false;
}
- inline bool jj_3_52()
+ inline bool jj_3_53()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -7991,38 +8490,38 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_218()) jj_scanpos = xsp;
+ if (jj_3R_219()) jj_scanpos = xsp;
if (jj_scan_token(APOSTROPHE_T)) return true;
- if (jj_3R_219()) return true;
+ if (jj_3R_220()) return true;
xsp = jj_scanpos;
- if (jj_3R_220()) jj_scanpos = xsp;
+ if (jj_3R_221()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_48()
+ inline bool jj_3_52()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_67()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_51()
+ inline bool jj_3_48()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_67()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_98()) return true;
return false;
}
- inline bool jj_3_50()
+ inline bool jj_3_51()
{
if (jj_done) return true;
if (jj_3R_100()) return true;
return false;
}
- inline bool jj_3R_213()
+ inline bool jj_3R_214()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -8030,13 +8529,13 @@ void parseInline();
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_352()) { jj_scanpos = xsp; break; }
+ if (jj_3R_353()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_49()
+ inline bool jj_3_50()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
@@ -8044,14 +8543,15 @@ void parseInline();
return false;
}
- inline bool jj_3R_209()
+ inline bool jj_3_49()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_scan_token(APOSTROPHE_T)) return true;
+ if (jj_scan_token(SUBTYPE_T)) return true;
return false;
}
- inline bool jj_3R_212()
+ inline bool jj_3R_213()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
@@ -8060,21 +8560,28 @@ void parseInline();
return false;
}
- inline bool jj_3R_149()
+ inline bool jj_3R_209()
{
if (jj_done) return true;
- if (jj_3R_310()) return true;
+ if (jj_3R_98()) return true;
return false;
}
- inline bool jj_3R_211()
+ inline bool jj_3R_212()
{
if (jj_done) return true;
if (jj_3R_100()) return true;
return false;
}
- inline bool jj_3R_210()
+ inline bool jj_3R_149()
+ {
+ if (jj_done) return true;
+ if (jj_3R_311()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_211()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
@@ -8082,18 +8589,32 @@ void parseInline();
return false;
}
+ inline bool jj_3R_210()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(APOSTROPHE_T)) return true;
+ if (jj_scan_token(SUBTYPE_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_98()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_210()) return false;
+ if (jj_3R_210()) {
+ jj_scanpos = xsp;
+ if (jj_3R_211()) {
jj_scanpos = xsp;
- if (!jj_3R_211()) return false;
+ if (jj_3R_212()) {
jj_scanpos = xsp;
- if (!jj_3R_212()) return false;
+ if (jj_3R_213()) {
jj_scanpos = xsp;
- if (jj_3R_213()) return true;
+ if (jj_3R_214()) return true;
+ }
+ }
+ }
+ }
return false;
}
@@ -8133,7 +8654,7 @@ void parseInline();
inline bool jj_3R_147()
{
if (jj_done) return true;
- if (jj_3R_309()) return true;
+ if (jj_3R_310()) return true;
return false;
}
@@ -8142,31 +8663,33 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_147()) return false;
+ if (jj_3R_147()) {
jj_scanpos = xsp;
- if (!jj_3R_148()) return false;
+ if (jj_3R_148()) {
jj_scanpos = xsp;
if (jj_3R_149()) return true;
+ }
+ }
xsp = jj_scanpos;
if (jj_3R_150()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_280()
+ inline bool jj_3R_281()
{
if (jj_done) return true;
if (jj_scan_token(REM_T)) return true;
return false;
}
- inline bool jj_3R_279()
+ inline bool jj_3R_280()
{
if (jj_done) return true;
if (jj_scan_token(MOD_T)) return true;
return false;
}
- inline bool jj_3R_278()
+ inline bool jj_3R_279()
{
if (jj_done) return true;
if (jj_scan_token(SLASH_T)) return true;
@@ -8178,90 +8701,97 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_277()) return false;
+ if (jj_3R_278()) {
jj_scanpos = xsp;
- if (!jj_3R_278()) return false;
+ if (jj_3R_279()) {
jj_scanpos = xsp;
- if (!jj_3R_279()) return false;
+ if (jj_3R_280()) {
jj_scanpos = xsp;
- if (jj_3R_280()) return true;
+ if (jj_3R_281()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_277()
+ inline bool jj_3R_278()
{
if (jj_done) return true;
if (jj_scan_token(MULT_T)) return true;
return false;
}
- inline bool jj_3R_628()
+ inline bool jj_3R_629()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_430()
+ inline bool jj_3R_431()
{
if (jj_done) return true;
if (jj_scan_token(LINKAGE_T)) return true;
return false;
}
- inline bool jj_3R_429()
+ inline bool jj_3R_430()
{
if (jj_done) return true;
if (jj_scan_token(BUFFER_T)) return true;
return false;
}
- inline bool jj_3R_428()
+ inline bool jj_3R_429()
{
if (jj_done) return true;
if (jj_scan_token(INOUT_T)) return true;
return false;
}
- inline bool jj_3R_427()
+ inline bool jj_3R_428()
{
if (jj_done) return true;
if (jj_scan_token(OUT_T)) return true;
return false;
}
- inline bool jj_3R_345()
+ inline bool jj_3R_346()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_426()) return false;
+ if (jj_3R_427()) {
jj_scanpos = xsp;
- if (!jj_3R_427()) return false;
+ if (jj_3R_428()) {
jj_scanpos = xsp;
- if (!jj_3R_428()) return false;
+ if (jj_3R_429()) {
jj_scanpos = xsp;
- if (!jj_3R_429()) return false;
+ if (jj_3R_430()) {
jj_scanpos = xsp;
- if (jj_3R_430()) return true;
+ if (jj_3R_431()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_426()
+ inline bool jj_3R_427()
{
if (jj_done) return true;
if (jj_scan_token(IN_T)) return true;
return false;
}
- inline bool jj_3R_257()
+ inline bool jj_3R_258()
{
if (jj_done) return true;
- if (jj_3R_366()) return true;
+ if (jj_3R_367()) return true;
return false;
}
- inline bool jj_3R_256()
+ inline bool jj_3R_257()
{
if (jj_done) return true;
if (jj_3R_69()) return true;
@@ -8274,15 +8804,15 @@ void parseInline();
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_256()) jj_scanpos = xsp;
- xsp = jj_scanpos;
if (jj_3R_257()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_258()) jj_scanpos = xsp;
if (jj_scan_token(LOOP_T)) return true;
- if (jj_3R_258()) return true;
+ if (jj_3R_259()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(LOOP_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_628()) jj_scanpos = xsp;
+ if (jj_3R_629()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -8301,7 +8831,7 @@ void parseInline();
return false;
}
- inline bool jj_3R_232()
+ inline bool jj_3R_233()
{
if (jj_done) return true;
if (jj_scan_token(NULL_T)) return true;
@@ -8315,68 +8845,66 @@ void parseInline();
return false;
}
- inline bool jj_3R_231()
+ inline bool jj_3R_232()
{
if (jj_done) return true;
- if (jj_3R_355()) return true;
+ if (jj_3R_356()) return true;
return false;
}
- inline bool jj_3R_230()
+ inline bool jj_3R_231()
{
if (jj_done) return true;
if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_229()
+ inline bool jj_3R_230()
{
if (jj_done) return true;
if (jj_3R_95()) return true;
return false;
}
- inline bool jj_3R_228()
- {
- if (jj_done) return true;
- if (jj_3R_94()) return true;
- return false;
- }
-
inline bool jj_3R_106()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_228()) return false;
+ if (jj_3R_229()) {
jj_scanpos = xsp;
- if (!jj_3R_229()) return false;
+ if (jj_3R_230()) {
jj_scanpos = xsp;
- if (!jj_3R_230()) return false;
+ if (jj_3R_231()) {
jj_scanpos = xsp;
- if (!jj_3R_231()) return false;
+ if (jj_3R_232()) {
jj_scanpos = xsp;
- if (jj_3R_232()) return true;
+ if (jj_3R_233()) return true;
+ }
+ }
+ }
+ }
return false;
}
-
-public:
- void setErrorHandler(ErrorHandler *eh) {
- if (errorHandler) delete errorHandler;
- errorHandler = eh;
+ inline bool jj_3R_229()
+ {
+ if (jj_done) return true;
+ if (jj_3R_94()) return true;
+ return false;
}
- TokenManager *token_source = nullptr;
- CharStream *jj_input_stream = nullptr;
+
+public:
+ TokenManager *token_source;
+ CharStream *jj_input_stream;
/** Current token. */
- Token *token = nullptr;
+ Token *token;
/** Next token. */
- Token *jj_nt = nullptr;
-
+ Token *jj_nt;
private:
int jj_ntk;
- JJCalls jj_2_rtns[116];
+ JJCalls jj_2_rtns[117];
bool jj_rescan;
int jj_gc;
Token *jj_scanpos, *jj_lastpos;
@@ -8386,39 +8914,57 @@ private:
bool jj_semLA;
int jj_gen;
int jj_la1[294];
- ErrorHandler *errorHandler = nullptr;
-
+ ErrorHandler *errorHandler;
+ bool errorHandlerCreated;
protected:
bool hasError;
-
+public:
+ void setErrorHandler(ErrorHandler *eh) {
+ if (errorHandlerCreated) delete errorHandler;
+ errorHandler = eh;
+ errorHandlerCreated = false;
+ }
Token *head;
public:
- VhdlParser(TokenManager *tokenManager);
+
+ VhdlParser(TokenManager *tm);
virtual ~VhdlParser();
-void ReInit(TokenManager* tokenManager);
+
+void ReInit(TokenManager *tm);
+
void clear();
+
Token * jj_consume_token(int kind);
+
bool jj_scan_token(int kind);
+
Token * getNextToken();
+
Token * getToken(int index);
+
int jj_ntk_f();
private:
int jj_kind;
int **jj_expentries;
int *jj_expentry;
+
void jj_add_error_token(int kind, int pos);
protected:
/** Generate ParseException. */
+
virtual void parseError();
private:
- int indent; // trace indentation
- bool trace = false; // trace enabled if true
+ int trace_indent;
+ bool trace_enabled;
public:
- bool trace_enabled();
+
void enable_tracing();
+
void disable_tracing();
+
void jj_rescan_token();
+
void jj_save(int index, int xla);
typedef unsigned long long uint64;
@@ -8426,7 +8972,7 @@ static Entry* current_root;
static Entry* tempEntry;
static Entry* lastEntity ;
static Entry* lastCompound ;
-static std::unique_ptr<Entry> current;
+static std::shared_ptr<Entry> current;
static QCString compSpec;
static QCString currName;
static int levelCounter;
@@ -8437,7 +8983,6 @@ static QCString forL;
static int param_sec ;
static int parse_sec;
static int currP;
-static Entry* currentCompound;
//----------------------------------------
diff --git a/vhdlparser/VhdlParserConstants.h b/vhdlparser/VhdlParserConstants.h
index fe51270..882402b 100644
--- a/vhdlparser/VhdlParserConstants.h
+++ b/vhdlparser/VhdlParserConstants.h
@@ -2,7 +2,7 @@
/**
* Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGenCPP#start()
+ * Generated by org.javacc.parser.OtherFilesGen#start()
*/
#ifndef VHDLPARSERCONSTANTS_H
#define VHDLPARSERCONSTANTS_H
@@ -387,387 +387,387 @@ const int VHDL2008TOOLDIR = 189;
const int DEFAULT = 0;
/** Literal token values. */
- static const JJChar tokenImage_arr_0[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_0[] =
{0x3c, 0x45, 0x4f, 0x46, 0x3e, 0};
- static const JJChar tokenImage_arr_1[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_1[] =
{0x22, 0x20, 0x22, 0};
- static const JJChar tokenImage_arr_2[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_2[] =
{0x22, 0x9, 0x22, 0};
- static const JJChar tokenImage_arr_3[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_3[] =
{0x22, 0xa, 0x22, 0};
- static const JJChar tokenImage_arr_4[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_4[] =
{0x22, 0xd, 0x22, 0};
- static const JJChar tokenImage_arr_5[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_5[] =
{0x22, 0x3c, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_6[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_6[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_7[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_7[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x46, 0x4c, 0x4f, 0x57, 0x43, 0x48, 0x41, 0x52, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_8[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_8[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_9[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_9[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x32, 0x30, 0x30, 0x38, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_10[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_10[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x32, 0x30, 0x30, 0x38, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_11[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_11[] =
{0x22, 0x61, 0x62, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_12[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_12[] =
{0x22, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_13[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_13[] =
{0x22, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_14[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_14[] =
{0x22, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_15[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_15[] =
{0x22, 0x61, 0x6c, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_16[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_16[] =
{0x22, 0x61, 0x6e, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_17[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_17[] =
{0x22, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_18[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_18[] =
{0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_19[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_19[] =
{0x22, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_20[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_20[] =
{0x22, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_21[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_21[] =
{0x22, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_22[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_22[] =
{0x22, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_23[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_23[] =
{0x22, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_24[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_24[] =
{0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0};
- static const JJChar tokenImage_arr_25[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_25[] =
{0x22, 0x62, 0x6f, 0x64, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_26[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_26[] =
{0x22, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_27[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_27[] =
{0x22, 0x62, 0x75, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_28[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_28[] =
{0x22, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_29[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_29[] =
{0x22, 0x63, 0x61, 0x73, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_30[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_30[] =
{0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_31[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_31[] =
{0x22, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_32[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_32[] =
{0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_33[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_33[] =
{0x22, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_34[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_34[] =
{0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_35[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_35[] =
{0x22, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_36[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_36[] =
{0x22, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x6f, 0x22, 0};
- static const JJChar tokenImage_arr_37[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_37[] =
{0x22, 0x65, 0x6c, 0x73, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_38[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_38[] =
{0x22, 0x65, 0x6c, 0x73, 0x69, 0x66, 0x22, 0};
- static const JJChar tokenImage_arr_39[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_39[] =
{0x22, 0x65, 0x6e, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_40[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_40[] =
{0x22, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_41[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_41[] =
{0x22, 0x65, 0x78, 0x69, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_42[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_42[] =
{0x22, 0x66, 0x61, 0x69, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_43[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_43[] =
{0x22, 0x66, 0x69, 0x6c, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_44[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_44[] =
{0x22, 0x66, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_45[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_45[] =
{0x22, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_46[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_46[] =
{0x22, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_47[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_47[] =
{0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_48[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_48[] =
{0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x22, 0};
- static const JJChar tokenImage_arr_49[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_49[] =
{0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0};
- static const JJChar tokenImage_arr_50[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_50[] =
{0x22, 0x67, 0x75, 0x61, 0x72, 0x64, 0x65, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_51[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_51[] =
{0x22, 0x69, 0x66, 0x22, 0};
- static const JJChar tokenImage_arr_52[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_52[] =
{0x22, 0x69, 0x6d, 0x70, 0x75, 0x72, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_53[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_53[] =
{0x22, 0x69, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_54[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_54[] =
{0x22, 0x69, 0x6e, 0x65, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_55[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_55[] =
{0x22, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_56[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_56[] =
{0x22, 0x69, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_57[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_57[] =
{0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_58[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_58[] =
{0x22, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_59[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_59[] =
{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x61, 0x67, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_60[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_60[] =
{0x22, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_61[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_61[] =
{0x22, 0x6c, 0x6f, 0x6f, 0x70, 0x22, 0};
- static const JJChar tokenImage_arr_62[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_62[] =
{0x22, 0x6d, 0x61, 0x70, 0x22, 0};
- static const JJChar tokenImage_arr_63[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_63[] =
{0x22, 0x6d, 0x6f, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_64[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_64[] =
{0x22, 0x6e, 0x61, 0x6e, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_65[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_65[] =
{0x22, 0x6e, 0x65, 0x77, 0x22, 0};
- static const JJChar tokenImage_arr_66[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_66[] =
{0x22, 0x6e, 0x65, 0x78, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_67[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_67[] =
{0x22, 0x6e, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_68[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_68[] =
{0x22, 0x6e, 0x6f, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_69[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_69[] =
{0x22, 0x6e, 0x75, 0x6c, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_70[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_70[] =
{0x22, 0x6f, 0x66, 0x22, 0};
- static const JJChar tokenImage_arr_71[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_71[] =
{0x22, 0x6f, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_72[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_72[] =
{0x22, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_73[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_73[] =
{0x22, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_74[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_74[] =
{0x22, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_75[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_75[] =
{0x22, 0x6f, 0x75, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_76[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_76[] =
{0x22, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_77[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_77[] =
{0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_78[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_78[] =
{0x22, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_79[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_79[] =
{0x22, 0x70, 0x6f, 0x73, 0x74, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_80[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_80[] =
{0x22, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_81[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_81[] =
{0x22, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_82[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_82[] =
{0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_83[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_83[] =
{0x22, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_84[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_84[] =
{0x22, 0x70, 0x75, 0x72, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_85[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_85[] =
{0x22, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_86[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_86[] =
{0x22, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_87[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_87[] =
{0x22, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_88[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_88[] =
{0x22, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_89[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_89[] =
{0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_90[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_90[] =
{0x22, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_91[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_91[] =
{0x22, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_92[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_92[] =
{0x22, 0x72, 0x65, 0x6d, 0x22, 0};
- static const JJChar tokenImage_arr_93[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_93[] =
{0x22, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_94[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_94[] =
{0x22, 0x72, 0x6f, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_95[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_95[] =
{0x22, 0x72, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_96[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_96[] =
{0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_97[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_97[] =
{0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_98[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_98[] =
{0x22, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_99[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_99[] =
{0x22, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0};
- static const JJChar tokenImage_arr_100[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_100[] =
{0x22, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_101[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_101[] =
{0x22, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_102[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_102[] =
{0x22, 0x73, 0x6c, 0x61, 0x22, 0};
- static const JJChar tokenImage_arr_103[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_103[] =
{0x22, 0x73, 0x6c, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_104[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_104[] =
{0x22, 0x73, 0x72, 0x61, 0x22, 0};
- static const JJChar tokenImage_arr_105[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_105[] =
{0x22, 0x73, 0x72, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_106[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_106[] =
{0x22, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x22, 0};
- static const JJChar tokenImage_arr_107[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_107[] =
{0x22, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_108[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_108[] =
{0x22, 0x74, 0x68, 0x65, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_109[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_109[] =
{0x22, 0x74, 0x6f, 0x22, 0};
- static const JJChar tokenImage_arr_110[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_110[] =
{0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_111[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_111[] =
{0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_112[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_112[] =
{0x22, 0x75, 0x6e, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0};
- static const JJChar tokenImage_arr_113[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_113[] =
{0x22, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0};
- static const JJChar tokenImage_arr_114[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_114[] =
{0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0};
- static const JJChar tokenImage_arr_115[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_115[] =
{0x22, 0x75, 0x73, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_116[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_116[] =
{0x22, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_117[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_117[] =
{0x22, 0x76, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_118[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_118[] =
{0x22, 0x76, 0x70, 0x72, 0x6f, 0x70, 0x22, 0};
- static const JJChar tokenImage_arr_119[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_119[] =
{0x22, 0x76, 0x75, 0x6e, 0x69, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_120[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_120[] =
{0x22, 0x77, 0x61, 0x69, 0x74, 0x22, 0};
- static const JJChar tokenImage_arr_121[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_121[] =
{0x22, 0x77, 0x68, 0x65, 0x6e, 0x22, 0};
- static const JJChar tokenImage_arr_122[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_122[] =
{0x22, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x22, 0};
- static const JJChar tokenImage_arr_123[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_123[] =
{0x22, 0x77, 0x69, 0x74, 0x68, 0x22, 0};
- static const JJChar tokenImage_arr_124[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_124[] =
{0x22, 0x78, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_125[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_125[] =
{0x22, 0x78, 0x6e, 0x6f, 0x72, 0x22, 0};
- static const JJChar tokenImage_arr_126[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_126[] =
{0x22, 0x26, 0x22, 0};
- static const JJChar tokenImage_arr_127[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_127[] =
{0x22, 0x27, 0x22, 0};
- static const JJChar tokenImage_arr_128[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_128[] =
{0x22, 0x28, 0x22, 0};
- static const JJChar tokenImage_arr_129[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_129[] =
{0x22, 0x29, 0x22, 0};
- static const JJChar tokenImage_arr_130[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_130[] =
{0x22, 0x2a, 0x2a, 0x22, 0};
- static const JJChar tokenImage_arr_131[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_131[] =
{0x22, 0x2a, 0x22, 0};
- static const JJChar tokenImage_arr_132[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_132[] =
{0x22, 0x2b, 0x22, 0};
- static const JJChar tokenImage_arr_133[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_133[] =
{0x22, 0x2d, 0x22, 0};
- static const JJChar tokenImage_arr_134[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_134[] =
{0x22, 0x2c, 0x22, 0};
- static const JJChar tokenImage_arr_135[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_135[] =
{0x22, 0x3a, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_136[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_136[] =
{0x22, 0x3a, 0x22, 0};
- static const JJChar tokenImage_arr_137[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_137[] =
{0x22, 0x3b, 0x22, 0};
- static const JJChar tokenImage_arr_138[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_138[] =
{0x22, 0x3c, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_139[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_139[] =
{0x22, 0x3e, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_140[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_140[] =
{0x22, 0x3c, 0x22, 0};
- static const JJChar tokenImage_arr_141[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_141[] =
{0x22, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_142[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_142[] =
{0x22, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_143[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_143[] =
{0x22, 0x2f, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_144[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_144[] =
{0x22, 0x3d, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_145[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_145[] =
{0x22, 0x3c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_146[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_146[] =
{0x22, 0x3c, 0x3c, 0x22, 0};
- static const JJChar tokenImage_arr_147[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_147[] =
{0x22, 0x3e, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_148[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_148[] =
{0x22, 0x3f, 0x3f, 0x22, 0};
- static const JJChar tokenImage_arr_149[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_149[] =
{0x22, 0x3f, 0x3e, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_150[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_150[] =
{0x22, 0x3f, 0x3c, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_151[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_151[] =
{0x22, 0x3f, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_152[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_152[] =
{0x22, 0x3f, 0x3c, 0x22, 0};
- static const JJChar tokenImage_arr_153[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_153[] =
{0x22, 0x3f, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_154[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_154[] =
{0x22, 0x3f, 0x2f, 0x3d, 0x22, 0};
- static const JJChar tokenImage_arr_155[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_155[] =
{0x22, 0x3f, 0x22, 0};
- static const JJChar tokenImage_arr_156[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_156[] =
{0x22, 0x7c, 0x22, 0};
- static const JJChar tokenImage_arr_157[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_157[] =
{0x22, 0x2e, 0x22, 0};
- static const JJChar tokenImage_arr_158[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_158[] =
{0x22, 0x2f, 0x22, 0};
- static const JJChar tokenImage_arr_159[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_159[] =
{0x22, 0x40, 0x22, 0};
- static const JJChar tokenImage_arr_160[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_160[] =
{0x22, 0x5e, 0x22, 0};
- static const JJChar tokenImage_arr_161[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_161[] =
{0x22, 0x5b, 0x22, 0};
- static const JJChar tokenImage_arr_162[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_162[] =
{0x22, 0x5d, 0x22, 0};
- static const JJChar tokenImage_arr_163[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_163[] =
{0x22, 0x7b, 0x22, 0};
- static const JJChar tokenImage_arr_164[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_164[] =
{0x22, 0x7d, 0x22, 0};
- static const JJChar tokenImage_arr_165[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_165[] =
{0x22, 0x3c, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_166[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_166[] =
{0x22, 0x3c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_167[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_167[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_168[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_168[] =
{0x22, 0x3c, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_169[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_169[] =
{0x22, 0x3c, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_170[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_170[] =
{0x22, 0x3c, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_171[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_171[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_172[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_172[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_173[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_173[] =
{0x22, 0x3c, 0x45, 0x58, 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_174[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_174[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_175[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_175[] =
{0x22, 0x3c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_176[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_176[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x47, 0x49, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_177[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_177[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x47, 0x49, 0x54, 0x5f, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x44, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_178[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_178[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_179[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_179[] =
{0x22, 0x3c, 0x55, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_180[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_180[] =
{0x22, 0x3c, 0x42, 0x49, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_181[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_181[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_182[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_182[] =
{0x22, 0x3c, 0x53, 0x54, 0x44, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_183[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_183[] =
{0x22, 0x3c, 0x44, 0x49, 0x47, 0x49, 0x54, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_184[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_184[] =
{0x22, 0x3c, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_185[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_185[] =
{0x22, 0x3c, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_186[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_186[] =
{0x22, 0x3c, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_187[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_187[] =
{0x22, 0x3c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_188[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_188[] =
{0x22, 0x3c, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x3e, 0x22, 0};
- static const JJChar tokenImage_arr_189[] =
+ static JAVACC_CHAR_TYPE tokenImage_arr_189[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x32, 0x30, 0x30, 0x38, 0x54, 0x4f, 0x4f, 0x4c, 0x44, 0x49, 0x52, 0x3e, 0x22, 0};
- static const JJChar* const tokenImage[] = {
+ static JAVACC_STRING_TYPE tokenImage[] = {
tokenImage_arr_0,
tokenImage_arr_1,
tokenImage_arr_2,
diff --git a/vhdlparser/VhdlParserTokenManager.cc b/vhdlparser/VhdlParserTokenManager.cc
index 7187449..5edbfc5 100644
--- a/vhdlparser/VhdlParserTokenManager.cc
+++ b/vhdlparser/VhdlParserTokenManager.cc
@@ -13,232 +13,232 @@ static const unsigned long long jjbitVec3[] = {
0x0ULL, 0x0ULL, 0xffffffff00000000ULL, 0xffffffffffffffffULL
};
static const int jjnextStates[] = {
- 54, 55, 56, 57, 58, 61, 65, 66, 67, 76, 21, 48, 49, 2, 37, 38,
+ 58, 59, 60, 61, 62, 65, 69, 70, 71, 80, 21, 50, 51, 2, 37, 38,
0, 3, 4, 5, 7, 12, 13, 15, 16, 24, 23, 25, 33, 34, 36, 39,
- 40, 42, 56, 57, 58, 61, 60, 59, 61, 65, 66, 67, 68, 69, 71, 9,
- 10, 28, 29, 45, 47, 50, 52, 27, 30,
+ 40, 42, 46, 47, 49, 53, 54, 56, 60, 61, 62, 65, 64, 63, 65, 69,
+ 70, 71, 72, 73, 75, 9, 10, 28, 29, 27, 30,
};
-static JJChar jjstrLiteralChars_0[] = {0};
-static JJChar jjstrLiteralChars_1[] = {0};
-static JJChar jjstrLiteralChars_2[] = {0};
-static JJChar jjstrLiteralChars_3[] = {0};
-static JJChar jjstrLiteralChars_4[] = {0};
-static JJChar jjstrLiteralChars_5[] = {0};
-static JJChar jjstrLiteralChars_6[] = {0};
-
-static JJChar jjstrLiteralChars_7[] = {0};
-static JJChar jjstrLiteralChars_8[] = {0};
-static JJChar jjstrLiteralChars_9[] = {0};
-static JJChar jjstrLiteralChars_10[] = {0};
-static JJChar jjstrLiteralChars_11[] = {0};
-static JJChar jjstrLiteralChars_12[] = {0};
-static JJChar jjstrLiteralChars_13[] = {0};
-static JJChar jjstrLiteralChars_14[] = {0};
-static JJChar jjstrLiteralChars_15[] = {0};
-static JJChar jjstrLiteralChars_16[] = {0};
-static JJChar jjstrLiteralChars_17[] = {0};
-static JJChar jjstrLiteralChars_18[] = {0};
-static JJChar jjstrLiteralChars_19[] = {0};
-static JJChar jjstrLiteralChars_20[] = {0};
-
-static JJChar jjstrLiteralChars_21[] = {0};
-static JJChar jjstrLiteralChars_22[] = {0};
-static JJChar jjstrLiteralChars_23[] = {0};
-static JJChar jjstrLiteralChars_24[] = {0};
-static JJChar jjstrLiteralChars_25[] = {0};
-static JJChar jjstrLiteralChars_26[] = {0};
-static JJChar jjstrLiteralChars_27[] = {0};
-static JJChar jjstrLiteralChars_28[] = {0};
-static JJChar jjstrLiteralChars_29[] = {0};
-static JJChar jjstrLiteralChars_30[] = {0};
-static JJChar jjstrLiteralChars_31[] = {0};
-static JJChar jjstrLiteralChars_32[] = {0};
-static JJChar jjstrLiteralChars_33[] = {0};
-static JJChar jjstrLiteralChars_34[] = {0};
-
-static JJChar jjstrLiteralChars_35[] = {0};
-static JJChar jjstrLiteralChars_36[] = {0};
-static JJChar jjstrLiteralChars_37[] = {0};
-static JJChar jjstrLiteralChars_38[] = {0};
-static JJChar jjstrLiteralChars_39[] = {0};
-static JJChar jjstrLiteralChars_40[] = {0};
-static JJChar jjstrLiteralChars_41[] = {0};
-static JJChar jjstrLiteralChars_42[] = {0};
-static JJChar jjstrLiteralChars_43[] = {0};
-static JJChar jjstrLiteralChars_44[] = {0};
-static JJChar jjstrLiteralChars_45[] = {0};
-static JJChar jjstrLiteralChars_46[] = {0};
-static JJChar jjstrLiteralChars_47[] = {0};
-static JJChar jjstrLiteralChars_48[] = {0};
-
-static JJChar jjstrLiteralChars_49[] = {0};
-static JJChar jjstrLiteralChars_50[] = {0};
-static JJChar jjstrLiteralChars_51[] = {0};
-static JJChar jjstrLiteralChars_52[] = {0};
-static JJChar jjstrLiteralChars_53[] = {0};
-static JJChar jjstrLiteralChars_54[] = {0};
-static JJChar jjstrLiteralChars_55[] = {0};
-static JJChar jjstrLiteralChars_56[] = {0};
-static JJChar jjstrLiteralChars_57[] = {0};
-static JJChar jjstrLiteralChars_58[] = {0};
-static JJChar jjstrLiteralChars_59[] = {0};
-static JJChar jjstrLiteralChars_60[] = {0};
-static JJChar jjstrLiteralChars_61[] = {0};
-static JJChar jjstrLiteralChars_62[] = {0};
-
-static JJChar jjstrLiteralChars_63[] = {0};
-static JJChar jjstrLiteralChars_64[] = {0};
-static JJChar jjstrLiteralChars_65[] = {0};
-static JJChar jjstrLiteralChars_66[] = {0};
-static JJChar jjstrLiteralChars_67[] = {0};
-static JJChar jjstrLiteralChars_68[] = {0};
-static JJChar jjstrLiteralChars_69[] = {0};
-static JJChar jjstrLiteralChars_70[] = {0};
-static JJChar jjstrLiteralChars_71[] = {0};
-static JJChar jjstrLiteralChars_72[] = {0};
-static JJChar jjstrLiteralChars_73[] = {0};
-static JJChar jjstrLiteralChars_74[] = {0};
-static JJChar jjstrLiteralChars_75[] = {0};
-static JJChar jjstrLiteralChars_76[] = {0};
-
-static JJChar jjstrLiteralChars_77[] = {0};
-static JJChar jjstrLiteralChars_78[] = {0};
-static JJChar jjstrLiteralChars_79[] = {0};
-static JJChar jjstrLiteralChars_80[] = {0};
-static JJChar jjstrLiteralChars_81[] = {0};
-static JJChar jjstrLiteralChars_82[] = {0};
-static JJChar jjstrLiteralChars_83[] = {0};
-static JJChar jjstrLiteralChars_84[] = {0};
-static JJChar jjstrLiteralChars_85[] = {0};
-static JJChar jjstrLiteralChars_86[] = {0};
-static JJChar jjstrLiteralChars_87[] = {0};
-static JJChar jjstrLiteralChars_88[] = {0};
-static JJChar jjstrLiteralChars_89[] = {0};
-static JJChar jjstrLiteralChars_90[] = {0};
-
-static JJChar jjstrLiteralChars_91[] = {0};
-static JJChar jjstrLiteralChars_92[] = {0};
-static JJChar jjstrLiteralChars_93[] = {0};
-static JJChar jjstrLiteralChars_94[] = {0};
-static JJChar jjstrLiteralChars_95[] = {0};
-static JJChar jjstrLiteralChars_96[] = {0};
-static JJChar jjstrLiteralChars_97[] = {0};
-static JJChar jjstrLiteralChars_98[] = {0};
-static JJChar jjstrLiteralChars_99[] = {0};
-static JJChar jjstrLiteralChars_100[] = {0};
-static JJChar jjstrLiteralChars_101[] = {0};
-static JJChar jjstrLiteralChars_102[] = {0};
-static JJChar jjstrLiteralChars_103[] = {0};
-static JJChar jjstrLiteralChars_104[] = {0};
-
-static JJChar jjstrLiteralChars_105[] = {0};
-static JJChar jjstrLiteralChars_106[] = {0};
-static JJChar jjstrLiteralChars_107[] = {0};
-static JJChar jjstrLiteralChars_108[] = {0};
-static JJChar jjstrLiteralChars_109[] = {0};
-static JJChar jjstrLiteralChars_110[] = {0};
-static JJChar jjstrLiteralChars_111[] = {0};
-static JJChar jjstrLiteralChars_112[] = {0};
-static JJChar jjstrLiteralChars_113[] = {0};
-static JJChar jjstrLiteralChars_114[] = {0};
-static JJChar jjstrLiteralChars_115[] = {0};
-static JJChar jjstrLiteralChars_116[] = {0};
-static JJChar jjstrLiteralChars_117[] = {0};
-static JJChar jjstrLiteralChars_118[] = {0};
-
-static JJChar jjstrLiteralChars_119[] = {0};
-static JJChar jjstrLiteralChars_120[] = {0};
-static JJChar jjstrLiteralChars_121[] = {0};
-static JJChar jjstrLiteralChars_122[] = {0};
-static JJChar jjstrLiteralChars_123[] = {0};
-static JJChar jjstrLiteralChars_124[] = {0};
-static JJChar jjstrLiteralChars_125[] = {0};
-
-static JJChar jjstrLiteralChars_126[] = {0x26, 0};
-static JJChar jjstrLiteralChars_127[] = {0x27, 0};
-
-static JJChar jjstrLiteralChars_128[] = {0x28, 0};
-static JJChar jjstrLiteralChars_129[] = {0x29, 0};
-
-static JJChar jjstrLiteralChars_130[] = {0x2a, 0x2a, 0};
-static JJChar jjstrLiteralChars_131[] = {0x2a, 0};
-
-static JJChar jjstrLiteralChars_132[] = {0x2b, 0};
-static JJChar jjstrLiteralChars_133[] = {0x2d, 0};
-
-static JJChar jjstrLiteralChars_134[] = {0x2c, 0};
-static JJChar jjstrLiteralChars_135[] = {0x3a, 0x3d, 0};
-
-static JJChar jjstrLiteralChars_136[] = {0x3a, 0};
-static JJChar jjstrLiteralChars_137[] = {0x3b, 0};
-
-static JJChar jjstrLiteralChars_138[] = {0x3c, 0x3d, 0};
-static JJChar jjstrLiteralChars_139[] = {0x3e, 0x3d, 0};
-
-static JJChar jjstrLiteralChars_140[] = {0x3c, 0};
-static JJChar jjstrLiteralChars_141[] = {0x3e, 0};
-
-static JJChar jjstrLiteralChars_142[] = {0x3d, 0};
-static JJChar jjstrLiteralChars_143[] = {0x2f, 0x3d, 0};
-
-static JJChar jjstrLiteralChars_144[] = {0x3d, 0x3e, 0};
-static JJChar jjstrLiteralChars_145[] = {0x3c, 0x3e, 0};
-
-static JJChar jjstrLiteralChars_146[] = {0x3c, 0x3c, 0};
-static JJChar jjstrLiteralChars_147[] = {0x3e, 0x3e, 0};
-
-static JJChar jjstrLiteralChars_148[] = {0x3f, 0x3f, 0};
-static JJChar jjstrLiteralChars_149[] = {0x3f, 0x3e, 0x3d, 0};
-
-static JJChar jjstrLiteralChars_150[] = {0x3f, 0x3c, 0x3d, 0};
-static JJChar jjstrLiteralChars_151[] = {0x3f, 0x3e, 0};
-
-static JJChar jjstrLiteralChars_152[] = {0x3f, 0x3c, 0};
-static JJChar jjstrLiteralChars_153[] = {0x3f, 0x3d, 0};
-
-static JJChar jjstrLiteralChars_154[] = {0x3f, 0x2f, 0x3d, 0};
-static JJChar jjstrLiteralChars_155[] = {0x3f, 0};
-
-static JJChar jjstrLiteralChars_156[] = {0x7c, 0};
-static JJChar jjstrLiteralChars_157[] = {0x2e, 0};
-
-static JJChar jjstrLiteralChars_158[] = {0x2f, 0};
-static JJChar jjstrLiteralChars_159[] = {0x40, 0};
-
-static JJChar jjstrLiteralChars_160[] = {0x5e, 0};
-static JJChar jjstrLiteralChars_161[] = {0x5b, 0};
-
-static JJChar jjstrLiteralChars_162[] = {0x5d, 0};
-static JJChar jjstrLiteralChars_163[] = {0x7b, 0};
-
-static JJChar jjstrLiteralChars_164[] = {0x7d, 0};
-static JJChar jjstrLiteralChars_165[] = {0};
-static JJChar jjstrLiteralChars_166[] = {0};
-static JJChar jjstrLiteralChars_167[] = {0};
-static JJChar jjstrLiteralChars_168[] = {0};
-static JJChar jjstrLiteralChars_169[] = {0};
-static JJChar jjstrLiteralChars_170[] = {0};
-static JJChar jjstrLiteralChars_171[] = {0};
-static JJChar jjstrLiteralChars_172[] = {0};
-static JJChar jjstrLiteralChars_173[] = {0};
-static JJChar jjstrLiteralChars_174[] = {0};
-static JJChar jjstrLiteralChars_175[] = {0};
-static JJChar jjstrLiteralChars_176[] = {0};
-static JJChar jjstrLiteralChars_177[] = {0};
-
-static JJChar jjstrLiteralChars_178[] = {0};
-static JJChar jjstrLiteralChars_179[] = {0};
-static JJChar jjstrLiteralChars_180[] = {0};
-static JJChar jjstrLiteralChars_181[] = {0};
-static JJChar jjstrLiteralChars_182[] = {0};
-static JJChar jjstrLiteralChars_183[] = {0};
-static JJChar jjstrLiteralChars_184[] = {0};
-static JJChar jjstrLiteralChars_185[] = {0};
-static JJChar jjstrLiteralChars_186[] = {0};
-static JJChar jjstrLiteralChars_187[] = {0};
-static JJChar jjstrLiteralChars_188[] = {0};
-static JJChar jjstrLiteralChars_189[] = {0};
-static const JJString jjstrLiteralImages[] = {
+static JAVACC_CHAR_TYPE jjstrLiteralChars_0[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_1[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_2[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_3[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_4[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_5[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_6[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_7[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_8[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_9[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_10[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_11[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_12[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_13[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_14[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_15[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_16[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_17[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_18[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_19[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_20[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_21[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_22[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_23[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_24[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_25[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_26[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_27[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_28[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_29[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_30[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_31[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_32[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_33[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_34[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_35[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_36[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_37[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_38[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_39[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_40[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_41[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_42[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_43[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_44[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_45[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_46[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_47[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_48[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_49[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_50[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_51[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_52[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_53[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_54[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_55[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_56[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_57[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_58[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_59[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_60[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_61[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_62[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_63[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_64[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_65[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_66[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_67[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_68[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_69[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_70[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_71[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_72[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_73[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_74[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_75[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_76[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_77[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_78[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_79[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_80[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_81[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_82[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_83[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_84[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_85[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_86[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_87[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_88[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_89[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_90[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_91[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_92[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_93[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_94[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_95[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_96[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_97[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_98[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_99[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_100[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_101[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_102[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_103[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_104[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_105[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_106[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_107[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_108[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_109[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_110[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_111[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_112[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_113[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_114[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_115[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_116[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_117[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_118[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_119[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_120[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_121[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_122[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_123[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_124[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_125[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_126[] = {0x26, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_127[] = {0x27, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_128[] = {0x28, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_129[] = {0x29, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_130[] = {0x2a, 0x2a, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_131[] = {0x2a, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_132[] = {0x2b, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_133[] = {0x2d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_134[] = {0x2c, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_135[] = {0x3a, 0x3d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_136[] = {0x3a, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_137[] = {0x3b, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_138[] = {0x3c, 0x3d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_139[] = {0x3e, 0x3d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_140[] = {0x3c, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_141[] = {0x3e, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_142[] = {0x3d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_143[] = {0x2f, 0x3d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_144[] = {0x3d, 0x3e, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_145[] = {0x3c, 0x3e, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_146[] = {0x3c, 0x3c, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_147[] = {0x3e, 0x3e, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_148[] = {0x3f, 0x3f, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_149[] = {0x3f, 0x3e, 0x3d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_150[] = {0x3f, 0x3c, 0x3d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_151[] = {0x3f, 0x3e, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_152[] = {0x3f, 0x3c, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_153[] = {0x3f, 0x3d, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_154[] = {0x3f, 0x2f, 0x3d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_155[] = {0x3f, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_156[] = {0x7c, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_157[] = {0x2e, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_158[] = {0x2f, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_159[] = {0x40, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_160[] = {0x5e, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_161[] = {0x5b, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_162[] = {0x5d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_163[] = {0x7b, 0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_164[] = {0x7d, 0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_165[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_166[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_167[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_168[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_169[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_170[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_171[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_172[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_173[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_174[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_175[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_176[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_177[] = {0};
+
+static JAVACC_CHAR_TYPE jjstrLiteralChars_178[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_179[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_180[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_181[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_182[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_183[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_184[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_185[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_186[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_187[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_188[] = {0};
+static JAVACC_CHAR_TYPE jjstrLiteralChars_189[] = {0};
+static const JAVACC_STRING_TYPE jjstrLiteralImages[] = {
jjstrLiteralChars_0,
jjstrLiteralChars_1,
jjstrLiteralChars_2,
@@ -432,9 +432,9 @@ jjstrLiteralChars_189,
};
/** Lexer state names. */
-static const JJChar lexStateNames_arr_0[] =
+static const JAVACC_CHAR_TYPE lexStateNames_arr_0[] =
{0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0};
-static const JJString lexStateNames[] = {
+static const JAVACC_STRING_TYPE lexStateNames[] = {
lexStateNames_arr_0,
};
static const unsigned long long jjtoToken[] = {
@@ -444,7 +444,7 @@ static const unsigned long long jjtoSkip[] = {
0x7deULL, 0x0ULL, 0x0ULL,
};
- void VhdlParserTokenManager::setDebugStream(FILE *ds){ debugStream = ds; }
+void VhdlParserTokenManager::setDebugStream(FILE *ds){ debugStream = ds; }
int VhdlParserTokenManager::jjStopAtPos(int pos, int kind){
jjmatchedKind = kind;
@@ -2687,7 +2687,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
curChar = input_stream->readChar();
curPos = 0;
int startsAt = 0;
- jjnewStateCnt = 77;
+ jjnewStateCnt = 81;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
@@ -2916,122 +2916,140 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 44:
if (curChar == 33)
- { jjCheckNAddTwoStates(45, 47); }
+ { jjCheckNAddTwoStates(45, 46); }
break;
case 45:
- { jjCheckNAddTwoStates(45, 47); }
+ if ((0xfffffbffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(45, 46); }
break;
case 46:
- if (curChar == 47 && kind > 9)
- kind = 9;
+ if (curChar == 42)
+ { jjCheckNAddStates(34, 36); }
break;
case 47:
- if (curChar == 42)
- jjstateSet[jjnewStateCnt++] = 46;
+ if ((0xffff7bffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(48, 46); }
break;
case 48:
- if (curChar == 42)
- jjstateSet[jjnewStateCnt++] = 44;
+ if ((0xfffffbffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(48, 46); }
break;
case 49:
- if (curChar == 42)
- { jjCheckNAddTwoStates(50, 52); }
+ if (curChar == 47 && kind > 9)
+ kind = 9;
break;
case 50:
- { jjCheckNAddTwoStates(50, 52); }
+ if (curChar == 42)
+ jjstateSet[jjnewStateCnt++] = 44;
break;
case 51:
- if (curChar == 47 && kind > 10)
- kind = 10;
+ if (curChar == 42)
+ { jjCheckNAddTwoStates(52, 53); }
break;
case 52:
- if (curChar == 42)
- jjstateSet[jjnewStateCnt++] = 51;
+ if ((0xfffffbffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(52, 53); }
break;
case 53:
+ if (curChar == 42)
+ { jjCheckNAddStates(37, 39); }
+ break;
+ case 54:
+ if ((0xffff7bffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(55, 53); }
+ break;
+ case 55:
+ if ((0xfffffbffffffffffULL & l) != 0L)
+ { jjCheckNAddTwoStates(55, 53); }
+ break;
+ case 56:
+ if (curChar == 47 && kind > 10)
+ kind = 10;
+ break;
+ case 57:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 165)
kind = 165;
{ jjCheckNAddStates(0, 10); }
break;
- case 55:
+ case 59:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 165)
kind = 165;
- { jjCheckNAddTwoStates(54, 55); }
+ { jjCheckNAddTwoStates(58, 59); }
break;
- case 57:
+ case 61:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddStates(34, 37); }
+ { jjCheckNAddStates(40, 43); }
break;
- case 58:
+ case 62:
if (curChar == 46)
- { jjCheckNAdd(59); }
+ { jjCheckNAdd(63); }
break;
- case 59:
+ case 63:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddStates(38, 40); }
+ { jjCheckNAddStates(44, 46); }
break;
- case 62:
+ case 66:
if ((0x280000000000ULL & l) != 0L)
- { jjCheckNAdd(63); }
+ { jjCheckNAdd(67); }
break;
- case 63:
+ case 67:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddTwoStates(64, 63); }
+ { jjCheckNAddTwoStates(68, 67); }
break;
- case 66:
+ case 70:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddStates(41, 43); }
+ { jjCheckNAddStates(47, 49); }
break;
- case 67:
+ case 71:
if (curChar == 35)
- { jjCheckNAdd(68); }
+ { jjCheckNAdd(72); }
break;
- case 68:
+ case 72:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddStates(44, 46); }
+ { jjCheckNAddStates(50, 52); }
break;
- case 69:
+ case 73:
if (curChar == 46)
- { jjCheckNAdd(70); }
+ { jjCheckNAdd(74); }
break;
- case 70:
+ case 74:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddTwoStates(70, 71); }
+ { jjCheckNAddTwoStates(74, 75); }
break;
- case 71:
+ case 75:
if (curChar != 35)
break;
if (kind > 172)
kind = 172;
- jjstateSet[jjnewStateCnt++] = 72;
+ jjstateSet[jjnewStateCnt++] = 76;
break;
- case 73:
+ case 77:
if ((0x280000000000ULL & l) != 0L)
- { jjCheckNAdd(74); }
+ { jjCheckNAdd(78); }
break;
- case 74:
+ case 78:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 172)
kind = 172;
- { jjCheckNAddTwoStates(75, 74); }
+ { jjCheckNAddTwoStates(79, 78); }
break;
- case 76:
+ case 80:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddTwoStates(76, 21); }
+ { jjCheckNAddTwoStates(80, 21); }
break;
default : break;
}
@@ -3072,7 +3090,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 9:
if ((0x7fffffffffffffffULL & l) != 0L)
- { jjAddStates(47, 48); }
+ { jjAddStates(53, 54); }
break;
case 12:
if (curChar == 95)
@@ -3126,7 +3144,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 28:
if ((0x7fffffffffffffffULL & l) != 0L)
- { jjAddStates(49, 50); }
+ { jjAddStates(55, 56); }
break;
case 30:
if ((0x7fffffffffffffffULL & l) == 0L)
@@ -3146,50 +3164,58 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
{ jjAddStates(31, 33); }
break;
case 45:
- { jjAddStates(51, 52); }
+ { jjCheckNAddTwoStates(45, 46); }
break;
- case 50:
- { jjAddStates(53, 54); }
+ case 47:
+ case 48:
+ { jjCheckNAddTwoStates(48, 46); }
+ break;
+ case 52:
+ { jjCheckNAddTwoStates(52, 53); }
break;
case 54:
- if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 55;
+ case 55:
+ { jjCheckNAddTwoStates(55, 53); }
break;
- case 56:
+ case 58:
if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 57;
+ jjstateSet[jjnewStateCnt++] = 59;
break;
case 60:
if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 59;
- break;
- case 61:
- if ((0x2000000020ULL & l) != 0L)
- { jjCheckNAddTwoStates(62, 63); }
+ jjstateSet[jjnewStateCnt++] = 61;
break;
case 64:
if (curChar == 95)
- { jjCheckNAdd(63); }
+ jjstateSet[jjnewStateCnt++] = 63;
break;
case 65:
- if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 66;
+ if ((0x2000000020ULL & l) != 0L)
+ { jjCheckNAddTwoStates(66, 67); }
break;
case 68:
+ if (curChar == 95)
+ { jjCheckNAdd(67); }
+ break;
+ case 69:
+ if (curChar == 95)
+ jjstateSet[jjnewStateCnt++] = 70;
+ break;
+ case 72:
if ((0x7fffffe07fffffeULL & l) != 0L)
- { jjCheckNAddStates(44, 46); }
+ { jjCheckNAddStates(50, 52); }
break;
- case 70:
+ case 74:
if ((0x7fffffe07fffffeULL & l) != 0L)
- { jjCheckNAddTwoStates(70, 71); }
+ { jjCheckNAddTwoStates(74, 75); }
break;
- case 72:
+ case 76:
if ((0x2000000020ULL & l) != 0L)
- { jjCheckNAddTwoStates(73, 74); }
+ { jjCheckNAddTwoStates(77, 78); }
break;
- case 75:
+ case 79:
if (curChar == 95)
- { jjCheckNAdd(74); }
+ { jjCheckNAdd(78); }
break;
default : break;
}
@@ -3215,7 +3241,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 9:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- { jjAddStates(47, 48); }
+ { jjAddStates(53, 54); }
break;
case 15:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
@@ -3227,14 +3253,14 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 28:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- { jjAddStates(49, 50); }
+ { jjAddStates(55, 56); }
break;
case 30:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
if (kind > 189)
kind = 189;
- { jjAddStates(55, 56); }
+ { jjAddStates(57, 58); }
break;
case 33:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
@@ -3252,11 +3278,21 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
case 45:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjAddStates(51, 52); }
+ { jjCheckNAddTwoStates(45, 46); }
break;
- case 50:
+ case 47:
+ case 48:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjAddStates(53, 54); }
+ { jjCheckNAddTwoStates(48, 46); }
+ break;
+ case 52:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ { jjCheckNAddTwoStates(52, 53); }
+ break;
+ case 54:
+ case 55:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ { jjCheckNAddTwoStates(55, 53); }
break;
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
@@ -3269,7 +3305,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt), (jjnewStateCnt = startsAt), (i == (startsAt = 77 - startsAt)))
+ if ((i = jjnewStateCnt), (jjnewStateCnt = startsAt), (i == (startsAt = 81 - startsAt)))
break;
if (input_stream->endOfInput()) { break; }
curChar = input_stream->readChar();
@@ -3321,12 +3357,12 @@ bool VhdlParserTokenManager::jjCanMove_1(int hiByte, int i1, int i2, unsigned lo
Token * VhdlParserTokenManager::jjFillToken(){
Token *t;
- JJString curTokenImage;
+ JAVACC_STRING_TYPE curTokenImage;
int beginLine = -1;
int endLine = -1;
int beginColumn = -1;
int endColumn = -1;
- JJString im = jjstrLiteralImages[jjmatchedKind];
+ JAVACC_STRING_TYPE im = jjstrLiteralImages[jjmatchedKind];
curTokenImage = (im.length() == 0) ? input_stream->GetImage() : im;
if (input_stream->getTrackLineColumn()) {
beginLine = input_stream->getBeginLine();
@@ -3337,8 +3373,8 @@ Token * VhdlParserTokenManager::jjFillToken(){
t = Token::newToken(jjmatchedKind);
t->kind = jjmatchedKind;
t->image = curTokenImage;
- t->specialToken = nullptr;
- t->next = nullptr;
+ t->specialToken = NULL;
+ t->next = NULL;
if (input_stream->getTrackLineColumn()) {
t->beginLine = beginLine;
@@ -3353,7 +3389,7 @@ const int defaultLexState = 0;
/** Get the next Token. */
Token * VhdlParserTokenManager::getNextToken(){
- Token *matchedToken = nullptr;
+ Token *matchedToken;
int curPos = 0;
for (;;)
@@ -3386,13 +3422,13 @@ Token * VhdlParserTokenManager::getNextToken(){
}
else
{
- SkipLexicalActions(nullptr);
+ SkipLexicalActions(NULL);
goto EOFLoop;
}
}
int error_line = input_stream->getEndLine();
int error_column = input_stream->getEndColumn();
- JJString error_after;
+ JAVACC_STRING_TYPE error_after;
bool EOFSeen = false;
if (input_stream->endOfInput()) {
EOFSeen = true;
@@ -3447,16 +3483,14 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
case 9 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
- QCString q(image.data());
- q.stripPrefix("/*!");
- q.resize(q.length()-2);
+ QCString q = filter2008VhdlComment(image.data());
::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear();
}
break;
}
case 10 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();
+ ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();
break;
}
default :
@@ -3593,7 +3627,7 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
}
}
/** Reinitialise parser. */
- void VhdlParserTokenManager::ReInit(JAVACC_CHARSTREAM *stream, int lexState) {
+ void VhdlParserTokenManager::ReInit(JAVACC_CHARSTREAM *stream, int lexState, VhdlParser *parserArg) {
clear();
jjmatchedPos = jjnewStateCnt = 0;
curLexState = lexState;
@@ -3601,20 +3635,22 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
ReInitRounds();
debugStream = stdout; // init
SwitchTo(lexState);
+ parser = parserArg;
errorHandler = new TokenManagerErrorHandler();
+ errorHandlerCreated = true;
}
void VhdlParserTokenManager::ReInitRounds() {
int i;
jjround = 0x80000001;
- for (i = 77; i-- > 0;)
+ for (i = 81; i-- > 0;)
jjrounds[i] = 0x80000000;
}
/** Switch to specified lex state. */
void VhdlParserTokenManager::SwitchTo(int lexState) {
if (lexState >= 1 || lexState < 0) {
- JJString message;
+ JAVACC_STRING_TYPE message;
#ifdef WIDE_CHAR
message += L"Error: Ignoring invalid lexical state : ";
message += lexState; message += L". State unchanged.";
@@ -3628,10 +3664,11 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
}
/** Constructor. */
- VhdlParserTokenManager::VhdlParserTokenManager (JAVACC_CHARSTREAM *stream, int lexState)
+ VhdlParserTokenManager::VhdlParserTokenManager (JAVACC_CHARSTREAM *stream, int lexState, VhdlParser *parserArg)
{
- input_stream = nullptr;
- ReInit(stream, lexState);
+ input_stream = NULL;
+ errorHandlerCreated = false;
+ ReInit(stream, lexState, parserArg);
}
// Destructor
@@ -3644,7 +3681,7 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
//Since input_stream was generated outside of TokenManager
//TokenManager should not take care of deleting it
//if (input_stream) delete input_stream;
- if (errorHandler) delete errorHandler, errorHandler = nullptr;
+ if (errorHandlerCreated) delete errorHandler;
}
diff --git a/vhdlparser/VhdlParserTokenManager.h b/vhdlparser/VhdlParserTokenManager.h
index 5100369..96a2449 100644
--- a/vhdlparser/VhdlParserTokenManager.h
+++ b/vhdlparser/VhdlParserTokenManager.h
@@ -9,50 +9,77 @@
#include "VhdlParserConstants.h"
#include "VhdlParser.h"
-
namespace vhdl {
namespace parser {
class VhdlParser;
/** Token Manager. */
class VhdlParserTokenManager : public TokenManager {
-public:
+ public:
+ /** Debug output. */
FILE *debugStream;
- void setDebugStream(FILE *ds);
+ /** Set debug output. */
+
+void setDebugStream(FILE *ds);
+
int jjStopAtPos(int pos, int kind);
+
int jjMoveStringLiteralDfa0_0();
+
int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2);
+
int jjMoveStringLiteralDfa2_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
+
int jjMoveStringLiteralDfa3_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
+
int jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa10_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa11_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa12_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa14_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa15_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa16_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
+
int jjMoveStringLiteralDfa17_0(unsigned long long old1, unsigned long long active1);
+
int jjMoveNfa_0(int startState, int curPos);
+
bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
+
bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
+
Token * jjFillToken();
-public:
- int curLexState;
- int jjnewStateCnt;
- int jjround;
- int jjmatchedPos;
- int jjmatchedKind;
+public: int curLexState;
+public: int jjnewStateCnt;
+public: int jjround;
+public: int jjmatchedPos;
+public: int jjmatchedKind;
+
Token * getNextToken();
+
void SkipLexicalActions(Token *matchedToken);
+
void TokenLexicalActions(Token *matchedToken);
#define jjCheckNAdd(state)\
{\
@@ -84,33 +111,31 @@ void TokenLexicalActions(Token *matchedToken);
#ifndef JAVACC_CHARSTREAM
#define JAVACC_CHARSTREAM CharStream
#endif
-
-private:
- void ReInitRounds();
-
-public:
- VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0);
- virtual ~VhdlParserTokenManager();
- void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0);
+ private: VhdlParser*parser;
+ private: void ReInitRounds();
+ public: VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
+ public: virtual ~VhdlParserTokenManager();
+ void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
void SwitchTo(int lexState);
void clear();
- const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec);
- const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end);
-
+ const JAVACC_SIMPLE_STRING jjKindsForBitVector(int i, unsigned long long vec);
+ const JAVACC_SIMPLE_STRING jjKindsForStateVector(int lexState, int vec[], int start, int end);
JAVACC_CHARSTREAM* input_stream;
- int jjrounds[77];
- int jjstateSet[2 * 77];
- JJString jjimage;
- JJString image;
+ int jjrounds[81];
+ int jjstateSet[2 * 81];
+ JAVACC_STRING_TYPE jjimage;
+ JAVACC_STRING_TYPE image;
int jjimageLen;
int lengthOfMatch;
- JJChar curChar;
- TokenManagerErrorHandler* errorHandler = nullptr;
+ JAVACC_CHAR_TYPE curChar;
+ TokenManagerErrorHandler* errorHandler;
+ bool errorHandlerCreated;
public:
void setErrorHandler(TokenManagerErrorHandler *eh) {
- if (errorHandler) delete errorHandler, errorHandler = nullptr;
+ if (errorHandlerCreated && errorHandler != NULL) delete errorHandler;
errorHandler = eh;
+ errorHandlerCreated = false;
}
};
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index a3d6731..3151528 100644
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -31,7 +31,7 @@ static Entry* current_root;
static Entry* tempEntry;
static Entry* lastEntity ;
static Entry* lastCompound ;
-static std::unique_ptr<Entry> current;
+static std::shared_ptr<Entry> current;
static QCString compSpec;
static QCString currName;
static int levelCounter;
@@ -42,7 +42,6 @@ static QCString forL;
static int param_sec ;
static int parse_sec;
static int currP;
-static Entry* currentCompound;
//----------------------------------------
@@ -108,17 +107,17 @@ SKIP:
// VHDL 2008 doxygen comment /*! .... */
SKIP :
{
- <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!" (~[])* "*/" >
+ <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
{
{
- QCString q(image.data());
- q.stripPrefix("/*!");
- q.resize(q.length()-2);
+ QCString q = filter2008VhdlComment(image.data());
::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear();
}
}
- | <MULT_VHDL_2008_COMMENT : "/*" (~[])* "*/" > {::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();}
-}
+ | <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
+ {
+ ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();}
+ }
/* KEYWORDS */
@@ -1614,6 +1613,9 @@ QCString name_ext1() : {QCString s,s1,s2;}
{
(
+ LOOKAHEAD(<APOSTROPHE_T><SUBTYPE_T>)
+ <APOSTROPHE_T><SUBTYPE_T>{s+="'subtype";}
+|
LOOKAHEAD(<DOT_T> suffix())
<DOT_T> s1=suffix(){s+=".";s+=s1;}
|
@@ -1730,7 +1732,7 @@ void package_declaration(): {QCString s;}
<PACKAGE_T> s=identifier() <IS_T>
{
lastCompound=current.get();
- std::unique_ptr<Entry> clone=std::make_unique<Entry>(*current);
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;