Commit 916d6d5c authored by Dimitri van Heesch's avatar Dimitri van Heesch

mods for doxygen-0.49-991106

parent a54eecdf
DOXYGEN Version 0.49-991003
DOXYGEN Version 0.49-991106
CONTENTS
--------
......@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
gunzip doxygen-0.49-991003.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-991003.src.tar # unpack it
gunzip doxygen-0.49-991106.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-991106.src.tar # unpack it
2. Run the configure script:
......@@ -86,7 +86,7 @@ You will need to install the windows/dos versions of following tools:
location where bison.simple and bison.hairy are located.
- Qt-1.xx (Qt-2.xx should also work, but I didn't test it for Windows)
(Hint: only the tools section is required, so you can use the free
X-windows version as well!)
X-windows version (use Qt-1.44) as well!)
You can get it at http://www.troll.no
- Microsoft Visual C++ (I only tested with version 5.0).
Use the vcvars32.bat to set the environment variables
......@@ -138,6 +138,26 @@ QT RELATED PROBLEMS:
- Qt-2.01 contains a bug that makes some special characters appear as
question marks (?) in the HTML output.
Bernhard Ristow provided a fix for this:
% in QT-2.0.1 is a bug in the member function
% QTextStream &QTextStream::operator<<( char c ).
%
% If the character is negative the cast to int in
% ts_putc( c ) produces an invalid char as unsigned
% short (e.g. char c = -4 -> unsigned short: 65532).
% This produces a strange output.
% If we modify the function into:
%
% QTextStream &QTextStream::operator<<( char c )
% {
% CHECK_STREAM_PRECOND
% unsigned char uc = (unsigned char) c;
% ts_putc( uc );
% return *this;
% }
% it works correctly.
HTML RELATED PROBLEMS:
- the indent continuously increases.
This seems to be a problem that can be observed with Netscape 4.01.
......@@ -214,4 +234,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (03 October 1999)
Dimitri van Heesch (06 November 1999)
DOXYGEN Version 0.49-991003
DOXYGEN Version 0.49-991106
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (03 October 1999)
Dimitri van Heesch (06 November 1999)
0.49-991003
0.49-991106
......@@ -11,35 +11,36 @@
#
# All output generated with Doxygen is not covered by this license.
PROJECT_NAME =
OUTPUT_DIRECTORY = ..
HTML_HEADER =
HTML_FOOTER =
QUIET = NO
WARNINGS = YES
DISABLE_INDEX = YES
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
GENERATE_MAN = NO
GENERATE_LATEX = YES
GENERATE_HTML = YES
PROJECT_NAME =
OUTPUT_DIRECTORY = ..
HTML_HEADER =
HTML_FOOTER =
QUIET = NO
WARNINGS = YES
DISABLE_INDEX = YES
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
GENERATE_MAN = NO
GENERATE_LATEX = YES
GENERATE_HTML = YES
GENERATE_HTMLHELP = YES
ENABLE_PREPROCESSING = NO
INPUT = index.doc install.doc starting.doc faq.doc trouble.doc \
INPUT = index.doc install.doc starting.doc faq.doc trouble.doc \
history.doc features.doc \
doxygen_usage.doc doxytag_usage.doc doxysearch_usage.doc \
installdox_usage.doc output.doc autolink.doc \
config.doc commands.doc htmlcmds.doc language.doc
FILE_PATTERNS = *.cpp *.h *.doc
EXAMPLE_PATH = ../examples
RECURSIVE = NO
TAGFILES =
ALLEXTERNALS = NO
PERL_PATH = /usr/local/bin/perl
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
PDF_HYPERLINKS = YES
FILE_PATTERNS = *.cpp *.h *.doc
EXAMPLE_PATH = ../examples
RECURSIVE = NO
TAGFILES =
ALLEXTERNALS = NO
PERL_PATH = /usr/local/bin/perl
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
PDF_HYPERLINKS = YES
......@@ -58,9 +58,9 @@
</ol>
where n>0.
\par Notice 1:
\par Note 1:
The patterns above should not contain spaces, tabs or newlines.
\par Notice 2:
\par Note 2:
For JavaDoc compatibility a \c # may be used instead of a \c :: in
the patterns above.
......
......@@ -176,6 +176,17 @@ Doxygen. Unrecognized commands are treated as normal text.
group of classes, files or namespaces. This can be used to
categorize classes, files or namespaces, and document those
categories.
The \<name\> argument should an single word identifier.
\par Example:
\verbinclude group.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/group/html/modules.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
\sa section \ref cmdingroup "\\ingroup"
<hr>
......@@ -197,7 +208,7 @@ Doxygen. Unrecognized commands are treated as normal text.
If a comment block is located directly in front of an enum declaration,
the \\enum comment may be omitted.
\par Notice:
\par Note:
The type of an anonymous enum cannot be documented, but the values
of an anonymous enum can.
......@@ -274,11 +285,12 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdvar "\\var" and \ref cmdtypedef "\\typedef".
<hr>
\subsection cmdingroup \ingroup <groupname>
\subsection cmdingroup \ingroup (<groupname> [<groupname> <groupname>])
\addindex \ingroup
If the \\ingroup command is placed in a comment block of a
class, file or namespace, then it will be added to the group.
class, file or namespace, then it will be added to the group or
groups identified by \<groupname\>.
\sa section \ref cmddefgroup "\\defgroup".
......@@ -345,10 +357,10 @@ Doxygen. Unrecognized commands are treated as normal text.
Any other documentation that is inside the documentation block will
by appended after the generated message.
\par Notice 1:
\par Note 1:
You are responsible that there is indeed an
earlier documented member that is overloaded by this one.
\par Notice 2:
\par Note 2:
The \\overload command does not work inside a one-line comment.
\par Example:
\verbinclude examples/overload.cpp
......@@ -374,7 +386,7 @@ Doxygen. Unrecognized commands are treated as normal text.
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
\par notice:
\par Note:
The \<name\> argument consists of a combination of letters and number
digits. If you wish to use upper case letters (e.g. \c MYPAGE1), or
mixed case letters (e.g. \c MyPage1) in the \<name\> argument, you
......@@ -693,7 +705,7 @@ Doxygen. Unrecognized commands are treated as normal text.
See section \ref autolink "\\autolink" for more information on automatically
generated links and valid link-objects.
\b Notice:
\b Note:
Keep in mind that links are only meaningful in HTML text;
in \f$\mbox{\LaTeX}\f$ text, the link text is just written to the output.
......@@ -843,7 +855,7 @@ Doxygen. Unrecognized commands are treated as normal text.
the example, is set to the start of the line following the line that is
written (or to the end of the example if the pattern could not be found).
\par Notice:
\par Note:
The command:
\verbatim\skipline pattern\endverbatim
is equivalent to:
......@@ -921,7 +933,7 @@ Doxygen. Unrecognized commands are treated as normal text.
</ul><br>
No other types of alignment are supported.
\par Notice:
\par Note:
For nested lists, HTML commands should be used.
<hr>
......@@ -1021,11 +1033,11 @@ Doxygen. Unrecognized commands are treated as normal text.
endhtmlonly command.
This command can be used to include HTML code that is too complex
for Doxygen (i.e. images, applets, java-scripts, and HTML tags that
for Doxygen (i.e. applets, java-scripts, and HTML tags that
require attributes). You can use the \\latexonly and \\endlatexonly
pair to provide a proper \f$\mbox{\LaTeX}\f$ alternative.
\b Notice:
\b Note:
environment variables (like \$(HOME) ) are resolved inside a
HTML-only block.
......@@ -1043,12 +1055,13 @@ Doxygen. Unrecognized commands are treated as normal text.
The first argument specifies the output format. Currently, the
following values are supported: \c html and \c latex.
The second argument specifies the path and file name of the image.
If a relative path is used, this will be relative to the directory to
which the output of the particular format is written.
For the html format you may also
specify an URL. If the name contains spaces you'll have to put
quotes (") around it.
The second argument specifies the file name of the image.
Doxygen will look for files in the paths (or files) that you specified
after the \ref cfg_image_path "IMAGE_PATH" tag and filter those files through the patterns
you specified after the \ref cfg_image_patterns "IMAGE_PATTERNS" tag.
If the image is found it
will be copied to the correct output directory.
If the image name contains spaces you'll have to put quotes (") around it.
The third argument can be used to specify the width or height of the
image. This is only useful for \f$\mbox{\LaTeX}\f$ output
......@@ -1057,19 +1070,28 @@ Doxygen. Unrecognized commands are treated as normal text.
size specifier in \f$\mbox{\LaTeX}\f$ (for example <code>10cm</code> or
<code>6in</code>).
Here is example of a comment block:
\verbatim
/*! Here is a snapshot of my new application:
* \image html ../images/application.jpg
* \image latex ../images/application.eps width=10cm
* \image html application.jpg
* \image latex application.eps width=10cm
*/
\endverbatim
And this is an example of how the configuration file may look:
\verbatim
IMAGE_PATH = my_image_dir
IMAGE_PATTERNS = *.eps *.gif *.jpg
\endverbatim
\warning The image format for HTML is limited to what your
browser supports. For \f$\mbox{\LaTeX}\f$ the image format
must be an encapsulated postscipt (eps).
<br><br>
Doxygen does not check if an image exists or if it is in
the correct format. So \e you have to make sure this is the case!
Doxygen does not check if the image is in the correct format.
So \e you have to make sure this is the case!
<hr>
\subsection cmdlatexonly \latexonly
......@@ -1084,7 +1106,7 @@ Doxygen. Unrecognized commands are treated as normal text.
use the \\htmlonly and \\endhtmlonly pair to provide a proper HTML
alternative.
\b Notice:
\b Note:
environment variables (like \$(HOME) ) are resolved inside a
\f$\mbox{\LaTeX}\f$-only block.
......@@ -1209,7 +1231,6 @@ browser generator. Do \e not use these commands in your own documentation.
<li>\\functionindex
<li>\\header
<li>\\headerfilelist
<li>\\ingroup
<li>\\inherit
<li>\\l
<li>\\postheader
......
......@@ -58,12 +58,14 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_cgi_name CGI_NAME
<li> \refitem cfg_cgi_url CGI_URL
<li> \refitem cfg_class_diagrams CLASS_DIAGRAMS
<li> \refitem cfg_cols_in_alpha_index COLS_IN_ALPHA_INDEX
<li> \refitem cfg_compact_latex COMPACT_LATEX
<li> \refitem cfg_disable_index DISABLE_INDEX
<li> \refitem cfg_doc_abspath DOC_ABSPATH
<li> \refitem cfg_doc_url DOC_URL
<li> \refitem cfg_enable_preprocessing ENABLE_PREPROCESSING
<li> \refitem cfg_example_path EXAMPLE_PATH
<li> \refitem cfg_example_patterns EXAMPLE_PATTERNS
<li> \refitem cfg_exclude EXCLUDE
<li> \refitem cfg_exclude_patterns EXCLUDE_PATTERNS
<li> \refitem cfg_expand_only_predef EXPAND_ONLY_PREDEF
......@@ -84,6 +86,9 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_html_footer HTML_FOOTER
<li> \refitem cfg_html_header HTML_HEADER
<li> \refitem cfg_html_output HTML_OUTPUT
<li> \refitem cfg_html_stylesheet HTML_STYLESHEET
<li> \refitem cfg_image_path IMAGE_PATH
<li> \refitem cfg_image_patterns IMAGE_PATTERNS
<li> \refitem cfg_include_path INCLUDE_PATH
<li> \refitem cfg_inherit_docs INHERIT_DOCS
<li> \refitem cfg_inline_info INLINE_INFO
......@@ -190,7 +195,8 @@ followed by the descriptions of the tags grouped by category.
If the \c EXTRACT_ALL tag is set to \c YES all classes and functions will be
included in the documentation, even if no documentation was available.
\b Notice: This will also disable the warnings about undocumented members
\par Note:
This will also disable the warnings about undocumented members
that are normally produced when \c WARNINGS is set to \c YES
\anchor cfg_extract_private
......@@ -238,7 +244,7 @@ followed by the descriptions of the tags grouped by category.
prepend the brief description of a member or function before the detailed
description
\par Notice:
\par Note:
If both \c HIDE_UNDOC_MEMBERS and \c BRIEF_MEMBER_DESC are set to \c NO, the
brief descriptions will be completely suppressed.
......@@ -290,7 +296,7 @@ followed by the descriptions of the tags grouped by category.
\anchor cfg_javadoc_autobrief
<dt>\c JAVADOC_AUTOBRIEF <dd>
\addinex JAVADOC_AUTOBRIEF
\addindex JAVADOC_AUTOBRIEF
If the \c JAVADOC_NO_AUTOBRIEF is set to \c YES (the default) then Doxygen
will interpret the first line (until the first dot) of a JavaDoc-style
comment as the brief description. If set to NO, the Javadoc-style will
......@@ -304,7 +310,7 @@ followed by the descriptions of the tags grouped by category.
reimplements.
\anchor cfg_inline_info
<dt> INLINE_INFO <dd>
<dt>\c INLINE_INFO <dd>
If the \c INLINE_INFO tag is set to \c YES (the default) then a tag [inline]
is inserted in the documentation for inline members.
......@@ -321,7 +327,8 @@ followed by the descriptions of the tags grouped by category.
\c myfile.cpp or directories like \c /usr/src/myproject.
Separate the files or directories with spaces.<br>
\b Notice: This tag (and only this tag) is \e required.
\b Note:
This tag (and only this tag) is \e required.
\anchor cfg_file_patterns
<dt>\c FILE_PATTERNS <dd>
......@@ -360,6 +367,29 @@ followed by the descriptions of the tags grouped by category.
directories that contain example code fragments that are included (see
the \\include command in section \ref cmdinclude "\\include").
\anchor cfg_example_patterns
<dt>\c EXAMPLE_PATTERNS <dd>
\addindex EXAMPLE_PATTERNS
If the value of the \c EXAMPLE_PATH tag contains directories, you can use the
\c EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
and *.h) to filter out the source-files in the directories. If left
blank all files are included.
\anchor cfg_image_path
<dt>\c IMAGE_PATH <dd>
\addindex IMAGE_PATH
The \c IMAGE_PATH tag can be used to specify one or more files or
directories that contain images that are to be included in the
documentation (see the \ref cmdimage "\image" command).
\anchor cfg_image_patterns
<dt>\c IMAGE_PATTERNS <dd>
\addindex IMAGE_PATTERNS
If the value of the \c IMAGE_PATH tag contains directories, you can use the
\c IMAGE_PATTERNS tag to specify one or more wildcard pattern (like *.gif
and *.eps) to filter out the image files in the directories. If left
blank all files are included.
\anchor cfg_input_filter
<dt>\c INPUT_FILTER <dd>
\addindex INPUT_FILTER
......@@ -410,9 +440,11 @@ followed by the descriptions of the tags grouped by category.
standard header.
The following commands have a special meaning inside the header:
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>.
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>,
<code>\$doxygenversion</code>.
Doxygen will replace them by respectively
the title of the page, the current date and time, or only the current date.
the title of the page, the current date and time, only the current date,
or the version number of doxygen.
\anchor cfg_html_footer
<dt>\c HTML_FOOTER <dd>
......@@ -431,6 +463,28 @@ followed by the descriptions of the tags grouped by category.
Doxygen will replace them by respectively
the title of the page, the current date and time, or only the current date.
\anchor cfg_html_stylesheet
<dt>\c HTML_STYLESHEET <dd>
\addindex HTML_STYLESHEET
The \c HTML_STYLESHEET tag can be used to specify a user defined cascading
style sheet that is used by each HTML page. It can be used to
fine-tune the look of the HTML output. If the tag is left blank doxygen
will generate a default style sheet. Here is the default style sheet
that doxygen normally generates:
\verbatim
H1 { text-align: center }
A.el { text-decoration: none; font-weight: bold }
DL.el { margin-left: -1cm }
DIV.fragment { width: 100%; border: none; background-color: #eeeeee }
DIV.in { margin-left: 16 }
DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }
A.gl:link { color: #ffffff }
A.gl:visited { color: #ffffff }
A.gl { text-decoration: none; font-weight: bold; background-color: #ff8080 }
TD.md { background-color: #f2f2ff }
\endverbatim
\anchor cfg_html_align_members
<dt>\c HTML_ALIGN_MEMBERS <dd>
......@@ -438,14 +492,14 @@ If the \c HTML_ALIGN_MEMBERS tag is set to \c YES, the members of classes,
files or namespaces will be aligned in HTML using tables. If set to
NO a bullet list will be used.
\par Notice
<b>Note:</b>
Setting this tag to NO will become obsolete in the future, since I only
intent to support and test the aligned representation.
\anchor cfg_generate_htmlhelp
<dt>\c GENERATE_HTMLHELP <dd>
If the \c GENERATE_HTMLHELP tag is set to \c YES,
If the \c GENERATE_HTMLHELP tag is set to \c YES then
doxygen generates three additional HTML index files:
\c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a
project file that can be read by
......@@ -472,6 +526,13 @@ If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
of all compounds will be generated. Enable this if the project contains
a lot of classes, structs, unions or interfaces.
\anchor cfg_cols_in_alpha_index
<dt>\c COLS_IN_ALPHA_INDEX <dd>
If the alphabetical index is enabled
(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be
used to specify the number of columns in which this list will be split (can be a number in the range [1..20])
</dl>
\subsection latex_output LaTeX related options
......@@ -515,7 +576,7 @@ a lot of classes, structs, unions or interfaces.
\anchor cfg_extra_packages
<dt>\c EXTRA_PACKAGES <dd>
\addindex EXTRA_PACKAGES
The EXTRA_PACKAGES tag can be used to specify one or more \f$\mbox{\LaTeX}\f$
The \c EXTRA_PACKAGES tag can be used to specify one or more \f$\mbox{\LaTeX}\f$
package names that should be included in the \f$\mbox{\LaTeX}\f$ output.
To get the times font for instance you can specify
\verbatim
......@@ -555,7 +616,7 @@ EXTRA_PACKAGES = times
\pagenumbering{arabic}
\endverbatim
\par Notice:
\par Note:
Only use a user defined header if you know what you are doing!
</dl>
......@@ -581,7 +642,7 @@ EXTRA_PACKAGES = times
\anchor cfg_man_extension
<dt>\c MAN_EXTENSION <dd>
\addindex MAX_EXTENSION
The MAN_EXTENSION tag determines the extension that is added to
The \c MAN_EXTENSION tag determines the extension that is added to
the generated man pages (default is the subroutine's section .3)
</dl>
......@@ -643,7 +704,7 @@ EXTRA_PACKAGES = times
See section \ref doxytag_usage for more information about the usage of
tag files.
\par Notice:
\par Note:
Each tag file most have a unique name and if a tag file is not located
in the directory in which doxygen is run, you must also specify the
path to the tagfile here.
......
......@@ -41,9 +41,15 @@ doxygen <config_file>
\endverbatim
</ol>
The \c -s option is optional and can be used suppress the description that
doxygen normally generates for each tag. Try to use this option if you send
me configuration files!
<b>Note:</b><br>
<ul>
<li> If you do not want the description for each item in the configuration
file then you can use the optional \c -s option.
Try to use this option if you send me a configuration file as part of
a bug report!
<li> To make doxygen read/write to standard input/output instead of from/to
a file, use \c - for the file name.
</ul>
If you also want to use the search engine, you should look
at section \ref doxysearch_usage.
......
......@@ -80,7 +80,7 @@ follow these steps:
<li>\c search.gif: this is the image that is used for the search button.
</ul>
\par Notice:
\par Note:
On the Windows platform Unix shell scripts cannot be used.
In fact the HTTP daemon that I tried (apache for Windows) only
recognized <code>.cgi</code> files that were renamed
......@@ -106,9 +106,11 @@ follow these steps:
<li>Run <a href="installdox_usage.html">installdox</a> to replace
any dummy links in the documentation with real links.
<b>Notice:</b> When using a search engine this step is <em>required</em>
\par Note:
When using a search engine this step is <em>required</em>
even if no tag files are used. If tag files are used you must specify
the correct options.
</ol>
<a name="searchqt">
......@@ -128,7 +130,7 @@ This can be done by carefully following these steps:
Apart from the file <code>search.idx</code> two other files
will be generated: <code>search.gif</code> and <code>search.cgi</code>
\par Notice:
\par Note:
Doxytag requires quite a large amount of memory to
generate the search index (about 30 Mb on my Linux box)!
The resulting index file requires about 3 Mb space on your disk.
......
......@@ -28,7 +28,7 @@ It has two functions:
documented in external documentation. Doxytag extracts this information
directly from the HTML files. This has the advantage that you do not need
to have the sources from which the documentation was extracted.
If you do have the sources you can also let \c doxygen generate the
If you \e do have the sources it is better to let \c doxygen generate the
tag file by putting the name of the tag file after \c GENERATE_TAGFILE in
the configuration file.
<li>
......@@ -55,7 +55,7 @@ In both cases the input of doxytag consists of a set of HTML files.
Then the documentation does not need to be regenerated by \c doxygen,
only \c installdox has to be run.
\par Notice:
\par Note:
Because the HTML files are expected to have a certain
structure, only HTML files generated with doxygen or with Qt's class
browser generator can be used. Doxytag only <em>reads</em> the HTML files,
......@@ -87,7 +87,7 @@ doxytag -t example.tag example/html
installdox script that doxygen generates
(See \ref installdox_usage for more information).
Notice that this is actually a feature because if you (or someone else)
Note that this is actually a feature because if you (or someone else)
moves the external documentation to a different
directory or URL you can simply run the script again and all links in
the HTML files will be updated.
......@@ -109,7 +109,7 @@ A typical example to use doxytag to generate a search index is:
doxytag -s search.idx
\endverbatim
\par Notice:
\par Note:
In the current version of doxygen, the search index must be
called \c search.idx.
......
......@@ -22,9 +22,13 @@
<li>Requires very little overhead from the writer of the documentation.
Plain text will do, but for more fancy or structured output HTML tags
and/or some of doxygen's special commands can be used.
<li>Outputs documentation in on-line format (HTML and man page) and off-line
format (LaTeX) simulatiously (any one can be disabled if desired).
Both formats are optimized for ease of reading.
<li>Outputs documentation in on-line format (HTML and UNIX man page) and
off-line format (\f$\mbox{\LaTeX}\f$) simultaniously
(any one can be disabled if desired). Both formats are optimized for
ease of reading. <br>
Furthermore, compressed HTML can be generated from HTML output using
Microsoft's HTML help workshop (Windows only) and PDF can be generated
from the \f$\mbox{\LaTeX}\f$ output.
<li>Allows documentation of files, namespaces, classes, structs, unions,
templates, variables, functions, typedefs, enums and defines.
<li>Includes a full C preprocessor to allow proper parsing of conditional
......@@ -33,7 +37,7 @@
the Qt specific signal and slots sections. Extraction of private class
members is optional.
<li>Automatically generates of class diagrams in HTML (as clickable
image maps) and Latex (as encapsulated postscript).
image maps) and \f$\mbox{\LaTeX}\f$ (as encapsulated postscript images).
<li>JavaDoc (1.1) and Qt-Doc compatible.
<li>References to base/super classes and inherited/overridden members are
generated automatically.
......@@ -46,7 +50,8 @@
of a member function or class. Most documentation systems (such as Javadoc) only
support the former, others (such as Qt) only the latter.
<li>You can type normal HTML tags in your documentation. Doxygen will convert
them to their equivalent Latex and man-page counterparts automatically.
them to their equivalent \f$\mbox{\LaTeX}\f$ and man-page
counterparts automatically.
<li>Allows references to documentation generated for other projects
(or another part of the same project) in a location independent way.
<li>Allows inclusion of source code examples that are automatically
......@@ -54,12 +59,12 @@
<li>Inclusion of undocumented classes is also supported, allowing to quickly
learn the structure and interfaces of a (large) piece of code without
looking into the implementation details.
<li>All options are read from an easy to edit and documented configuration
file.
<li>Allows automatic cross-referencing of (documented) entities with their
definition in the source code.
<li>All options are read from an easy to edit and documented
configuration file.
<li>Documentation and search engine can be transferred to another
location or machine without regenerating the documentation.
<li>Doxygen can generate index and project files that can
be converted into compressed HTML by MicroSoft's HTML help workshop.
<li>Can cope with large projects easily.
</UL>
......
......@@ -22,8 +22,6 @@
<li>Add support for grouping members, and document then as a group.
<li>Support for K&R-style function arguments.
<li>More ouput formats: suggested are info format and RTF format.
<li>Reintroduction of the multi-column class list (and file list) to quickly
select a class or file
<li>Split long lists in an index to a set of smaller lists.
<li>Add a nice graphical front-end for creating and modifying the
configuration file (it should be flexible enough to quickly add new options).
......@@ -34,15 +32,18 @@
not yet listed here, please let me know.
</ul>
<h3>Features scheduled for version 0.5</h3>
<h3>Features scheduled for version 1.0</h3>
<ul>
<li>Proper support for namespaces.
<li>Include LaTeX style formulas in LaTeX and HTML output (in HTML as a gif).
<li>Proper support for template classes, members, functions and specializations.
<li>Multi-lingual support.
<li>Generation of class diagrams (clickable image maps in HTML, eps images in
postscript).
<li>Add generator for man pages format.
<li>Include LaTeX style formulas in LaTeX and HTML output (in HTML as a gif).
<li>Multi-lingual support: currently supported languages are: English,
Dutch, French, German, Italian, Swedish, Czech, Japanese.
<li>Generation of class diagrams (clickable image maps in HTML, eps images
in postscript).
<li>Output generator for the man page format.
<li>Proper support for template classes, members, functions and specializations.
<li>Proper support for namespaces.
<li>Reintroduction of the multi-column class list (and file list) to quickly
select a class or file
</ul>
<h3>Version 0.4</h3>
......
......@@ -16,7 +16,7 @@
/*! \page htmlcmds HTML Commands
Here is a list of all HTML commands that may be used inside the
documentation. Notice that all attributes of a HTML tag are ignored
documentation. Note that all attributes of a HTML tag are ignored
(the HREF and NAME attributes for the A tag are the only exception).
<ul>
......
......@@ -180,8 +180,10 @@ Matthias Baas,
Walter Mueller,
William van Dieten,
Joshua Jensen,
Patrick Aberts,
Patrick Alberts,
Jacques Tremblay,
John Sturton,
Moshe Kruger,
and many others for suggestions, patches and bug reports.
</ul>
*/
......
......@@ -40,7 +40,7 @@ The following options are available:
that is used by doxygen. The location <tt>\<location\></tt> can be
an absolute path or a URL.
\par Notice:
\par Note:
Each <tagfile> must be unique and should only be the name of the
file, not including the path.
......
......@@ -35,7 +35,8 @@ Here is a list of the languages and their current maintainers:
<TR BGCOLOR="#4040c0">
<TD ><b><font size=+1 color="#ffffff"> Language </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Maintainer </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Contact address </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Contact address </font>
<font size=-2 color="#ffffff">(remove the NOSPAM.)</font></b></TD>
<TR BGCOLOR="#ffffff">
<TD>
German
......@@ -44,8 +45,8 @@ Here is a list of the languages and their current maintainers:
Jens Breitenstein
</TD>
<TD>
<a href="mailto:Jens.Breitenstein@tlc.de">
Jens.Breitenstein@tlc.de</a>
<a href="mailto:Jens.Breitenstein@NOSPAM.tlc.de">
Jens.Breitenstein@NOSPAM.tlc.de</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -56,8 +57,8 @@ Here is a list of the languages and their current maintainers:
Christophe Bordeux
</TD>
<TD>
<a href="mailto:bordeux@lig.di.epfl.ch">
bordeux@lig.di.epfl.ch</a>
<a href="mailto:bordeux@NOSPAM.lig.di.epfl.ch">
bordeux@NOSPAM.lig.di.epfl.ch</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -69,10 +70,10 @@ Here is a list of the languages and their current maintainers:
XeT Erixon
</TD>
<TD>
<a href="mailto:sahag96@nts.mh.se">
sahag96@nts.mh.se</a><br>
<a href="mailto:xet@hem.passagen.se">
xet@hem.passagen.se</a>
<a href="mailto:sahag96@NOSPAM.nts.mh.se">
sahag96@NOSPAM.nts.mh.se</a><br>
<a href="mailto:xet@NOSPAM.hem.passagen.se">
xet@NOSPAM.hem.passagen.se</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -83,8 +84,8 @@ Here is a list of the languages and their current maintainers:
Vlastimil Havran
</TD>
<TD>
<a href="mailto:havran@fel.cvut.cz">
havran@fel.cvut.cz</a>
<a href="mailto:havran@NOSPAM.fel.cvut.cz">
havran@NOSPAM.fel.cvut.cz</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -95,8 +96,8 @@ Here is a list of the languages and their current maintainers:
Ionutz Borcoman
</TD>
<TD>
<a href="mailto:borco@borco-ei.eng.hokudai.ac.jp">
borco@borco-ei.eng.hokudai.ac.jp</a>
<a href="mailto:borco@NOSPAM.borco-ei.eng.hokudai.ac.jp">
borco@NOSPAM.borco-ei.eng.hokudai.ac.jp</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -107,8 +108,8 @@ Here is a list of the languages and their current maintainers:
Piotr Piatkowski
</TD>
<TD>
<a href="mailto:kompas@ceti.com.pl">
kompas@ceti.com.pl</a>
<a href="mailto:kompas@NOSPAM.ceti.com.pl">
kompas@NOSPAM.ceti.com.pl</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -120,10 +121,10 @@ Here is a list of the languages and their current maintainers:
Alessandro Falappa
</TD>
<TD>
<a href="mailto:aaf23@cam.ac.uk">
aaf23@cam.ac.uk</a><br>
<a href="mailto:a.falappa@flashnet.it">
a.falappa@flashnet.it</a>
<a href="mailto:aaf23@NOSPAM.cam.ac.uk">
aaf23@NOSPAM.cam.ac.uk</a><br>
<a href="mailto:a.falappa@NOSPAM.flashnet.it">
a.falappa@NOSPAM.flashnet.it</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -134,8 +135,8 @@ Here is a list of the languages and their current maintainers:
Kenji Nagamatsu
</TD>
<TD>
<a href="mailto:naga@joyful.club.ne.jp">
naga@joyful.club.ne.jp</a>
<a href="mailto:naga@NOSPAM.joyful.club.ne.jp">
naga@NOSPAM.joyful.club.ne.jp</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -146,8 +147,8 @@ Here is a list of the languages and their current maintainers:
Francisco Oltra Thennet
</TD>
<TD>
<a href="mailto:foltra@puc.cl">
foltra@puc.cl</a>
<a href="mailto:foltra@NOSPAM.puc.cl">
foltra@NOSPAM.puc.cl</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -158,8 +159,8 @@ Here is a list of the languages and their current maintainers:
Olli Korhonen
</TD>
<TD>
<a href="mailto:Olli.Korhonen@ccc.fi">
Olli.Korhonen@ccc.fi</a>
<a href="mailto:Olli.Korhonen@NOSPAM.ccc.fi">
Olli.Korhonen@NOSPAM.ccc.fi</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -170,8 +171,8 @@ Here is a list of the languages and their current maintainers:
Vladimir Vodolazkiy
</TD>
<TD>
<a href="mailto:voldemarus@geocities.com">
voldemarus@geocities.com</a>
<a href="mailto:voldemarus@NOSPAM.geocities.com">
voldemarus@NOSPAM.geocities.com</a>
</TD>
</TR>
......@@ -183,8 +184,8 @@ Here is a list of the languages and their current maintainers:
Dimitri van Heesch
</TD>
<TD>
<a href="mailto:dimitri@stack.nl">
dimitri@stack.nl</a>
<a href="mailto:dimitri@NOSPAM.stack.nl">
dimitri@NOSPAM.stack.nl</a>
</TD>
</TR>
</TABLE>
......@@ -201,7 +202,7 @@ Here is a list of the languages and their current maintainers:
\hline
French & Christophe Bordeux & {\tt bordeux@lig.di.epfl.ch} \\
\hline
Swedish & Samuel Hgglund & {\tt sahag96@nts.mh.se} \\
Swedish & Samuel H\"agglund & {\tt sahag96@nts.mh.se} \\
& XeT Erixon & {\tt xet@hem.passagen.se} \\
\hline
Czech & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\
......
......@@ -20,7 +20,7 @@ generates the documentation. See section \ref doxygen_usage for more
detailed usage information.
The executable \c doxytag is only needed if you want to generate references
to external documentation (i.e. documentation that was generated by Doxygen)
to external documentation (i.e. documentation that was generated by doxygen)
for which you do not have the sources or to create a search index for
the search engine. See section \ref doxytag_usage for more detailed usage
information.
......@@ -35,7 +35,7 @@ Each project should get its own configuration file. A project can consist
of a single source file, but can also be an entire source tree that is
recursively scanned.
To simplify the creation of a configuration file, Doxygen can create a
To simplify the creation of a configuration file, doxygen can create a
template configuration file for you. To do this call \c doxygen with the \c -g
option:
......@@ -44,8 +44,10 @@ doxygen -g <config-file>
\endverbatim
where \<config-file\> is the name of the configuration file. If you omit
the file name, a file named \c Doxyfile will be created. If a file with the
name \<config-file\> already exists, Doxygen will rename it to
name \<config-file\> already exists, doxygen will rename it to
\<config-file\>.bak before generating the configuration template.
If you use <code>-</code> as the file name then doxygen will try to read
the configuration file from standard input (<code>stdin</code>).
The configuration file has a format that is similar to that of a (simple)
Makefile. It contains of a number of assignments (tags) of the form:
......@@ -53,7 +55,8 @@ Makefile. It contains of a number of assignments (tags) of the form:
<tt>TAGNAME = VALUE</tt> or <br>
<tt>TAGNAME = VALUE1 VALUE2 ... </tt><br>
You can probably leave the values of most tags to their default value.
You can probably leave the values of most tags in a generated template
configuration file to their default value.
The \c INPUT tag is the only tag for which you are required to provide
a value. See section \ref config for more details about the configuration file.
......@@ -62,20 +65,25 @@ you can add the names of the files after the \c INPUT tag.
If you have a larger project consisting of a source directory or tree
this may become tiresome. In this case you should put the root directory or
directories after the \c INPUT tag, and add one or more file
patterns to the \c FILE_PATTERN tag. Only files that match one of the
patterns to the \c FILE_PATTERN tag (for instance <code>*.cpp *.h</code>).
Only files that match one of the
patterns will be parsed (if the patterns are omitted all files will be parsed).
For recursive parsing of a source tree you must set
the \c RECURSIVE tag to \c YES. To further finetune the list of files
the \c RECURSIVE tag to \c YES. To further fine-tune the list of files
that is parsed the \c EXCLUDE and \c EXCLUDE_PATTERNS tags can be used.
If you start using Doxygen for an existing project (thus without any
documentation that Doxygen is aware of), you can still get an idea of
If you start using doxygen for an existing project (thus without any
documentation that doxygen is aware of), you can still get an idea of
what the documented result would be. To do so, you must set the \c EXTRACT_ALL
tag in the configuration file to \c YES. Then, Doxygen will pretend
tag in the configuration file to \c YES. Then, doxygen will pretend
everything in your sources is documented. Please note that warnings of
undocumented members will not be generated as long as \c EXTRACT_ALL is set
to \c YES.
To analyse an existing piece of software it is useful to cross-reference
a (documented) entity with its definition in the source files. Doxygen will
generate such cross-references if you set the SOURCE_BROWSER tag to YES.
\subsection step2 Step 2: Running doxygen
To generate the documentation you can now enter:
......@@ -100,24 +108,28 @@ exist, \c doxygen will try to create it for you.
The generated HTML documentation can be viewed by pointing a HTML browser
to the \c index.html file in the \c html directory. For the best results
a browser that supports cascading style sheets (CSS) should be used
(I'm currently using Netscape 4.0 to test the generated output).
(I'm currently using Netscape 4.61 to test the generated output).
\addindex LaTeX
The generated \f$\mbox{\LaTeX}\f$ documentation must first be compiled by
a \f$\mbox{\LaTeX}\f$ compiler. (I use teTeX distribution version 0.4
a \f$\mbox{\LaTeX}\f$ compiler. (I use teTeX distribution version 0.9
that contains \f$\mbox{\TeX}\f$ version 3.14159). To simplify the process
of compiling the generated
documentation, \c doxygen writes a \c Makefile into the \c latex directory.
By typing \c make in the \c latex directory the dvi file \c refman.dvi
will be generated. This file can then be viewed using \c xdvi or
will be generated (provided that you have a make tool called
<code>make</code> ofcourse). This file can then be viewed using \c xdvi or
converted into a postscript file \c refman.ps by typing <code>make ps</code>
(this requires \c dvips ). The Postscript file can be send to a postscript
(this requires \c dvips ). Conversion to PDF is also possible; just type
<code>make pdf</code>. The Postscript file can be send to a postscript
printer. If you do not have a postscript printer, you can try to use
ghostscript to convert postscript into something your printer understands.
To get the best results for PDF output you should set the
\c PDF_HYPERLINKS tag to \c YES.
The generated man pages can be viewed using the \c man program. You do need
to make sure the man directory is in the man path (see the MANPATH
environment variable). Notice that there are some limitations to the
to make sure the man directory is in the man path (see the \c MANPATH
environment variable). Note that there are some limitations to the
capabilities of the man page format, so some information
(like class diagrams, cross references and formulas) will be lost.
......@@ -125,7 +137,7 @@ capabilities of the man page format, so some information
Although documenting the source is presented as step 3, in a new project
this should ofcourse be step 1. Here I assume
you already have some code and you want Doxygen to generate a nice document
you already have some code and you want doxygen to generate a nice document
describing the API and maybe the internals as well.
If the \c EXTRACT_ALL option is set to \c NO in the configuration file
......@@ -141,7 +153,7 @@ these? For members, classes and namespaces there are basicly two options:
<li>Place a special documentation block somewhere else (another file or
another location) \e and put a <em>structural command</em> in the
documentation block. A structural command links a documentation block
to a certain object that can be documented (e.g. a member, class,
to a certain entity that can be documented (e.g. a member, class,
namespace or file). See section \ref structuralcommands to learn more
about structural commands.
</ol>
......@@ -170,7 +182,7 @@ During parsing the following steps take place:
\subsection specialblock Special documentation blocks
The following types of special documentation blocks are supported by Doxygen:
The following types of special documentation blocks are supported by doxygen:
<ul>
<li>The Qt style, where special documentation blocks look like:
\verbatim
......@@ -196,14 +208,14 @@ Here is an example of a documented piece of C++ code using the Qt style:
\verbinclude qtstyle.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/qtstyle/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
The one-line comments should contain a brief description,
whereas the multi-line comment blocks contain a more detailed description.
The brief descriptions are included in the member overview of a class,
namespace or file and are printed using a small italic font
(this description can be omitted by setting \c BRIEF_STDMETHOD_DESC to \c NO in
(this description can be omitted by setting \c BRIEF_MEMBER_DESC to \c NO in
the config file). By default the brief descriptions are also the first
sentence of the detailed description
(this can be changed by setting the \c REPEAT_BRIEF tag to \c NO).
......@@ -215,15 +227,15 @@ style:
\verbinclude jdstyle.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/jdstyle/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
Notice that the first sentence of the documentation (until the <tt>.</tt>)
Note that the first sentence of the documentation (until the <tt>.</tt>)
is treated as a brief description, whereas the documentation block as a whole
forms the detailed description. The brief description is required for the
JavaDoc style.
Unlike most other documentation systems, Doxygen also allows you to put
Unlike most other documentation systems, doxygen also allows you to put
the documentation of members (including global functions) in front of
the \e definition. This way the documentation can be placed in the source
file instead of the header file. This keeps the header file compact, and allows the
......@@ -248,7 +260,7 @@ Structural commands (like all other commands) start with a backslash
(<tt>\\</tt>) followed by a command name and one or more parameters.
For instance, if you want to document the class \c Test in the example
above, you could have also put the following documentation block somewhere
in the input that is read by Doxygen:
in the input that is read by doxygen:
\verbatim
/*! \class Test
\brief A test class.
......@@ -271,7 +283,7 @@ Other structural commands are:
<li>\c \namespace to document a namespace.
</ul>
See section \ref commands for detailed information about these and other
commands. Notice that the documentation block belonging to a file
commands. Note that the documentation block belonging to a file
should always contain a structural command.
To document a member of a C++ class, you must also document the class
......@@ -285,10 +297,10 @@ using structural commands:
\verbinclude structcmd.h
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/structcmd/html/structcmd.h.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\par Notice:
\par Note:
Because each comment block in the example above contains a structural command, all
the comment blocks could be moved to another location or input file
(the source file for instance), without affecting the generated
......@@ -300,7 +312,7 @@ using structural commands:
If you want to document the members of a file, struct, union, class, or enum
and you want to put the documentation for these members inside the compound,
it is sometimes desired to place the documentation block after the member
instead of before. For this purpose Doxygen has the following
instead of before. For this purpose doxygen has the following
additional comment blocks:
\verbatim
/*!< ... */
......@@ -318,7 +330,7 @@ and
\verbatim
///< ...
\endverbatim
Notice that these blocks have the same structure and meaning as the
Note that these blocks have the same structure and meaning as the
special comment blocks above only the \< indicates that the member is
located in front of the block instead of after the block.
......@@ -326,7 +338,7 @@ Here is an example of a the use of these comment blocks:
\verbinclude afterdoc.h
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/afterdoc/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\warning These blocks can only be used to document \e members.
......@@ -343,11 +355,11 @@ in the HTML documentation, you will also need to have the following tools
installed
<ul>
<li>\c latex: the \f$\mbox{\LaTeX}\f$ compiler, needed to parse the formulas.
To test I have used the teTeX 0.4 distribution.
To test I have used the teTeX 0.9 distribution.
<li>\c dvips: a tool to convert dvi files to postscript files
I have used version 5.58f from Radical Eye software for testing.
I have used version 5.86 from Radical Eye software for testing.
<li>\c gs: the ghostscript interpreter for converting postscript files
to bitmaps. I have used Aladdin Ghostscript 5.01 for testing.
to bitmaps. I have used Aladdin Ghostscript 5.10 for testing.
</ul>
There are two ways to include formulas in the documentation.
......@@ -392,7 +404,7 @@ There are two ways to include formulas in the documentation.
</ol>
Formulas should be valid commands in \f$\mbox{\LaTeX}\f$'s math-mode.
\warning Currently, Doxygen is not very fault tolerant in recovering
\warning Currently, doxygen is not very fault tolerant in recovering
from typos in formulas. It may have to be necessary to remove the
file <code>formula.repository</code> that is written in the html directory to
a rid of an incorrect formula
......@@ -442,7 +454,7 @@ after preprocessing becomes:
static const char * version = "1.xx";
\endverbatim
Notice that doxygen will now expand \e all macro definitions
Note that doxygen will now expand \e all macro definitions
(recursively if needed). This is often too much. Therefore, doxygen also
allows you to expand only those defines that you explicitly
specify. For this you have to set the \c EXPAND_ONLY_PREDEF tag to \c YES
......@@ -500,11 +512,11 @@ class IUnknown
};
\endverbatim
Notice that the \c PREDEFINED tag accepts function like macro definitions
Note that the \c PREDEFINED tag accepts function like macro definitions
(like \c DECLARE_INTERFACE), normal macro substitutions (like \c PURE
and \c THIS) and plain defines (like \c __cplusplus).
Notice also that preprocessor definitions that are normally defined
Note also that preprocessor definitions that are normally defined
automatically by the preprocessor (like \c __cplusplus), have to be defined
by hand with doxygen's parser (this is done because these defines
are often platform/compiler specific).
......
......@@ -24,8 +24,8 @@
properly. If you find such a piece, please send it to me, so I can
improve doxygen's parsing capabilities. Try to make the piece of code
you send as small as possible, to help me narrow down the search.
<li>Using declarations and directives are not yet. They are
simply ignored.
<li>Using declarations are not yet supported. They are simply ignored.
Using directives are supported however.
<li>Doxygen does not work properly if there are multiple classes, structs
or unions with the same name in your code. It should not crash however,
rather it should ignore all of the classes with the same name except one.
......@@ -42,7 +42,8 @@
\verbatim
const int (a);
\endverbatim
is also seen as a function declaration, because only the syntax is analysed,
is also seen as a function declaration with name
<code>int</code>, because only the syntax is analysed,
not the semantics. If the redundant braces can be detected, as in
\verbatim
int *(a[20]);
......
......@@ -18,7 +18,8 @@ all: class/html/index.html \
restypedef/html/index.html \
afterdoc/html/index.html \
template/html/index.html \
tag/html/index.html
tag/html/index.html \
group/html/index.html
clean:
rm -rf class define enum file func page relates author \
......@@ -86,3 +87,6 @@ afterdoc/html/index.html: afterdoc.h afterdoc.cfg
template/html/index.html: templ.cpp templ.cfg
$(DOXYGEN)/bin/doxygen templ.cfg
group/html/index.html: group.cpp group.cfg
$(DOXYGEN)/bin/doxygen group.cfg
......@@ -4,8 +4,7 @@
This is to test the documentation of defines.
*/
/*! \def ABS(x)
/*!
The define ABS computes the absolute value of its argument \a x.
*/
#define ABS(x) (((x)>0)?(x):-(x))
PROJECT_NAME = "Grouping"
OUTPUT_DIRECTORY = group
GENERATE_LATEX = NO
GENERATE_MAN = NO
INPUT = group.cpp
QUIET = YES
/*! \defgroup group1 The First Group
* This is the first group
*/
/*! \defgroup group2 The Second Group
* This is the second group
*/
/*! \defgroup group3 The Third Group
* This is the third group
*/
/*! \ingroup group1
* \brief class C1 in group 1
*/
class C1 {};
/*! \ingroup group1
* \brief class C2 in group 1
*/
class C2 {};
/*! \ingroup group2
* \brief class C3 in group 2
*/
class C3 {};
/*! \ingroup group2
* \brief class C4 in group 2
*/
class C4 {};
/*! \ingroup group3
* \brief class C5 in \link group3 the third group\endlink.
*/
class C5 {};
/*! \ingroup group1 group2 group3
* \brief class C6 in all groups
* \sa \link group1 The first group\endlink, group2, group3
*/
class C6 {};
/*! \file
* \ingroup group3
* \brief this file in group 3
*/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>Annotated Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>Grouping Compound List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<ul>
<li><a class="el" href="class_c1.html">C1</a> (Class C1 in group 1)
<li><a class="el" href="class_c2.html">C2</a> (Class C2 in group 1)
<li><a class="el" href="class_c3.html">C3</a> (Class C3 in group 2)
<li><a class="el" href="class_c4.html">C4</a> (Class C4 in group 2)
<li><a class="el" href="class_c5.html">C5</a> (Class C5 in <a href="group_group3.html"> the third group</a>)
<li><a class="el" href="class_c6.html">C6</a> (Class C6 in all groups)
</ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C1 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C1 Class Reference</h1>class C1 in group 1.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C1 in group 1.
<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C2 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C2 Class Reference</h1>class C2 in group 1.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C2 in group 1.
<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C3 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C3 Class Reference</h1>class C3 in group 2.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C3 in group 2.
<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C4 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C4 Class Reference</h1>class C4 in group 2.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C4 in group 2.
<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C5 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C5 Class Reference</h1>class C5 in <a href="group_group3.html"> the third group</a>.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C5 in <a href="group_group3.html"> the third group</a>.
<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>C6 Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>C6 Class Reference</h1>class C6 in all groups.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class C6 in all groups.
<p>
<dl compact><dt>
<b>See also: </b><dd>
<a href="group_group1.html"> The first group</a>, <a href="group_group2.html">The Second Group</a>, <a href="group_group3.html">The Third Group</a> </dl><hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a></ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
H1 { text-align: center }
A.el { text-decoration: none; font-weight: bold }
DL.el { margin-left: -1cm }
DIV.fragment { width: 100%; border: none; background-color: #eeeeee }
DIV.in { margin-left: 16 }
DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }
A.gl:link { color: #ffffff }
A.gl:visited { color: #ffffff }
A.gl { text-decoration: none; font-weight: bold; background-color: #ff8080 }
TD.md { background-color: #f2f2ff }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>File Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>Grouping File List</h1>
<p>
Here is a list of all documented files with brief descriptions:
<p>
<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a> (This file in group 3)
</ul>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>group.cpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>group.cpp File Reference</h1>this file in group 3.
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=4><br><h2>Compounds</h2></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c1.html">C1</a></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c2.html">C2</a></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c3.html">C3</a></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c4.html">C4</a></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c5.html">C5</a></td></tr>
<tr><td><img src="null.gif"></td><td><img src="null.gif"></td><td nowrap align=right valign=top>class &nbsp;</td><td valign=top><a class="el" href="class_c6.html">C6</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
this file in group 3.<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>The First Group</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>The First Group</h1><tr><td colspan=4><br><h2>Compounds</h2></td></tr>
<ul>
<li><a class="el" href="class_c1.html">C1</a>
<li><a class="el" href="class_c2.html">C2</a>
<li><a class="el" href="class_c6.html">C6</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is the first group <hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>The Second Group</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>The Second Group</h1><tr><td colspan=4><br><h2>Compounds</h2></td></tr>
<ul>
<li><a class="el" href="class_c3.html">C3</a>
<li><a class="el" href="class_c4.html">C4</a>
<li><a class="el" href="class_c6.html">C6</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is the second group <hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>The Third Group</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>The Third Group</h1><tr><td colspan=4><br><h2>Files</h2></td></tr>
<ul>
<li><a class="el" href="group.cpp.html">group.cpp</a>
</ul>
<tr><td colspan=4><br><h2>Compounds</h2></td></tr>
<ul>
<li><a class="el" href="class_c5.html">C5</a>
<li><a class="el" href="class_c6.html">C6</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is the third group <hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>Main Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>Grouping Documentation</h1>
<p>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>Module Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 0.49-990728 on Fri Nov 5 20:43:30 1999 -->
<center>
<a href="index.html">Main Page</a> &nbsp; <a href="modules.html">Modules</a> &nbsp; <a href="annotated.html">Compound List</a> &nbsp; <a href="files.html">File List</a> &nbsp; </center>
<hr><h1>Grouping Modules</h1>Here is a list of all modules:
<dl compact>
<dt><a href="group_group1.html">The First Group</a><dd>
<p>
<dt><a href="group_group2.html">The Second Group</a><dd>
<p>
<dt><a href="group_group3.html">The Third Group</a><dd>
<p>
</dl>
<hr><address><small>Generated at Fri Nov 5 20:43:30 1999 for Grouping by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 0.49-990728 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
&copy; 1997-1999</small></address>
</body>
</html>
......@@ -36,6 +36,8 @@ clean:
$(MAKE) -f Makefile.doxygen clean
$(MAKE) -f Makefile.doxytag clean
$(MAKE) -f Makefile.doxysearch clean
distclean: clean
-$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
declinfo.cpp defargs.cpp
......
#define yy_create_buffer cppExpYY_create_buffer
#define yy_delete_buffer cppExpYY_delete_buffer
#define yy_scan_buffer cppExpYY_scan_buffer
#define yy_scan_string cppExpYY_scan_string
#define yy_scan_bytes cppExpYY_scan_bytes
#define yy_flex_debug cppExpYY_flex_debug
#define yy_init_buffer cppExpYY_init_buffer
#define yy_flush_buffer cppExpYY_flush_buffer
#define yy_load_buffer_state cppExpYY_load_buffer_state
#define yy_switch_to_buffer cppExpYY_switch_to_buffer
#define yyin cppExpYYin
#define yyleng cppExpYYleng
#define yylex cppExpYYlex
#define yyout cppExpYYout
#define yyrestart cppExpYYrestart
#define yytext cppExpYYtext
#define yywrap cppExpYYwrap
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 33
#define YY_END_OF_BUFFER 34
static yyconst short int yy_accept[62] =
{ 0,
0, 0, 34, 31, 32, 22, 20, 7, 31, 23,
24, 18, 16, 17, 31, 19, 26, 27, 2, 10,
31, 11, 1, 6, 5, 21, 8, 4, 0, 0,
29, 29, 26, 0, 0, 26, 0, 27, 27, 14,
12, 9, 13, 15, 3, 25, 0, 0, 0, 0,
29, 29, 0, 30, 28, 0, 0, 29, 30, 28,
0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 4, 5, 1, 1, 6, 7, 8, 9,
10, 11, 12, 1, 13, 14, 15, 16, 17, 17,
17, 17, 17, 17, 17, 18, 18, 19, 1, 20,
21, 22, 23, 1, 24, 24, 24, 24, 25, 26,
1, 1, 1, 1, 1, 27, 1, 1, 1, 1,
1, 1, 1, 1, 28, 1, 1, 29, 1, 1,
1, 30, 1, 31, 1, 1, 32, 32, 24, 24,
25, 33, 1, 1, 1, 1, 1, 27, 1, 5,
1, 1, 1, 5, 1, 5, 28, 5, 1, 34,
1, 1, 1, 35, 1, 36, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[37] =
{ 0,
1, 2, 2, 1, 1, 1, 1, 2, 1, 1,
1, 1, 1, 1, 1, 3, 3, 3, 1, 1,
1, 1, 1, 3, 3, 3, 1, 1, 1, 1,
1, 3, 3, 1, 1, 1
} ;
static yyconst short int yy_base[65] =
{ 0,
0, 0, 130, 163, 163, 88, 163, 92, 65, 163,
163, 163, 163, 163, 21, 163, 26, 47, 163, 25,
57, 26, 163, 163, 38, 163, 163, 163, 41, 71,
90, 40, 33, 52, 68, 55, 0, 0, 63, 163,
163, 163, 163, 163, 163, 163, 51, 94, 0, 80,
163, 0, 102, 108, 86, 44, 111, 126, 163, 94,
163, 159, 47, 38
} ;
static yyconst short int yy_def[65] =
{ 0,
61, 1, 61, 61, 61, 61, 61, 61, 62, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 62, 61,
61, 31, 17, 61, 61, 61, 63, 18, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 64, 61,
61, 32, 61, 61, 63, 64, 61, 61, 61, 61,
0, 61, 61, 61
} ;
static yyconst short int yy_nxt[200] =
{ 0,
4, 5, 4, 6, 4, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 18, 19, 20,
21, 22, 23, 4, 4, 4, 4, 4, 4, 4,
24, 4, 4, 4, 25, 26, 31, 31, 31, 32,
56, 33, 33, 34, 40, 41, 43, 44, 46, 55,
35, 46, 36, 36, 37, 52, 52, 52, 46, 37,
32, 61, 38, 38, 38, 32, 61, 34, 34, 34,
61, 35, 45, 39, 39, 47, 35, 42, 47, 53,
53, 36, 36, 54, 54, 54, 48, 48, 48, 39,
39, 57, 57, 47, 30, 58, 58, 58, 28, 49,
47, 46, 47, 47, 49, 31, 31, 31, 27, 48,
48, 48, 60, 60, 50, 51, 51, 54, 54, 54,
60, 60, 51, 54, 54, 54, 58, 58, 58, 61,
61, 61, 61, 59, 59, 61, 61, 61, 61, 61,
59, 58, 58, 58, 61, 61, 61, 61, 61, 61,
61, 51, 51, 61, 61, 61, 61, 61, 51, 29,
61, 29, 3, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61
} ;
static yyconst short int yy_chk[200] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 15, 15, 15, 17,
64, 17, 17, 17, 20, 20, 22, 22, 29, 63,
17, 56, 17, 17, 17, 32, 32, 32, 47, 17,
18, 33, 18, 18, 18, 34, 33, 34, 34, 34,
29, 18, 25, 18, 18, 30, 34, 21, 30, 35,
35, 36, 36, 35, 35, 35, 30, 30, 30, 39,
39, 50, 50, 30, 9, 50, 50, 50, 8, 30,
30, 48, 30, 30, 30, 31, 31, 31, 6, 48,
48, 48, 55, 55, 31, 31, 31, 53, 53, 53,
60, 60, 31, 54, 54, 54, 57, 57, 57, 3,
0, 0, 0, 54, 54, 0, 0, 0, 0, 0,
54, 58, 58, 58, 0, 0, 0, 0, 0, 0,
0, 58, 58, 0, 0, 0, 0, 0, 58, 62,
0, 62, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "constexp.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 19 "constexp.l"
#include "constexp.h"
#include "cppvalue.h"
#include "ce_parse.h" // generated header file
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
QCString strToken;
static const char *inputString;
static int inputPosition;
CPPValue resultValue;
#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++] ;
c++; buf++;
}
return c;
}
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 49 "constexp.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 163 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 51 "constexp.l"
{ return TOK_QUESTIONMARK; }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 52 "constexp.l"
{ return TOK_COLON; }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 53 "constexp.l"
{ return TOK_OR; }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 54 "constexp.l"
{ return TOK_AND; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 55 "constexp.l"
{ return TOK_BITWISEOR; }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 56 "constexp.l"
{ return TOK_BITWISEXOR; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 57 "constexp.l"
{ return TOK_AMPERSAND; }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 58 "constexp.l"
{ return TOK_NOTEQUAL; }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 59 "constexp.l"
{ return TOK_EQUAL; }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 60 "constexp.l"
{ return TOK_LESSTHAN; }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 61 "constexp.l"
{ return TOK_GREATERTHAN; }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 62 "constexp.l"
{ return TOK_LESSTHANOREQUALTO; }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 63 "constexp.l"
{ return TOK_GREATERTHANOREQUALTO; }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 64 "constexp.l"
{ return TOK_SHIFTLEFT; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 65 "constexp.l"
{ return TOK_SHIFTRIGHT; }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 66 "constexp.l"
{ return TOK_PLUS; }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 67 "constexp.l"
{ return TOK_MINUS; }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 68 "constexp.l"
{ return TOK_STAR; }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 69 "constexp.l"
{ return TOK_DIVIDE; }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 70 "constexp.l"
{ return TOK_MOD; }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 71 "constexp.l"
{ return TOK_TILDE; }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 72 "constexp.l"
{ return TOK_NOT; }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 73 "constexp.l"
{ return TOK_LPAREN; }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 74 "constexp.l"
{ return TOK_RPAREN; }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 75 "constexp.l"
{
strToken=yytext;
return TOK_CHARACTER;
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 79 "constexp.l"
{ strToken=yytext;
return TOK_OCTALINT;
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 82 "constexp.l"
{ strToken=yytext;
return TOK_DECIMALINT;
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 85 "constexp.l"
{ strToken=yytext; return TOK_HEXADECIMALINT; }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 86 "constexp.l"
{
strToken=yytext; return TOK_FLOAT;
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 89 "constexp.l"
{
strToken=yytext; return TOK_FLOAT;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 92 "constexp.l"
YY_BREAK
case 32:
YY_RULE_SETUP
#line 93 "constexp.l"
YY_BREAK
case 33:
YY_RULE_SETUP
#line 95 "constexp.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 61);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 95 "constexp.l"
bool parseCppExpression(const QCString &s)
{
//printf("Expression: `%s'\n",s.data());
inputString = s;
inputPosition = 0;
cppExpYYrestart( cppExpYYin );
cppExpYYparse();
//printf("Result: %ld\n",(long)resultValue);
return (long)resultValue!=0;
}
extern "C" {
int cppExpYYwrap() { return 1; }
}
/* A Bison parser, made from constexp.y
by GNU Bison version 1.25
*/
#define YYBISON 1 /* Identify Bison output. */
#define yyparse cppExpYYparse
#define yylex cppExpYYlex
#define yyerror cppExpYYerror
#define yylval cppExpYYlval
#define yychar cppExpYYchar
#define yydebug cppExpYYdebug
#define yynerrs cppExpYYnerrs
#define TOK_QUESTIONMARK 258
#define TOK_COLON 259
#define TOK_OR 260
#define TOK_AND 261
#define TOK_BITWISEOR 262
#define TOK_BITWISEXOR 263
#define TOK_AMPERSAND 264
#define TOK_NOTEQUAL 265
#define TOK_EQUAL 266
#define TOK_LESSTHAN 267
#define TOK_GREATERTHAN 268
#define TOK_LESSTHANOREQUALTO 269
#define TOK_GREATERTHANOREQUALTO 270
#define TOK_SHIFTLEFT 271
#define TOK_SHIFTRIGHT 272
#define TOK_PLUS 273
#define TOK_MINUS 274
#define TOK_STAR 275
#define TOK_DIVIDE 276
#define TOK_MOD 277
#define TOK_TILDE 278
#define TOK_NOT 279
#define TOK_LPAREN 280
#define TOK_RPAREN 281
#define TOK_OCTALINT 282
#define TOK_DECIMALINT 283
#define TOK_HEXADECIMALINT 284
#define TOK_CHARACTER 285
#define TOK_FLOAT 286
#include "cppvalue.h"
#include "constexp.h"
#if defined(_MSC_VER)
#define MSDOS
#endif
#define YYSTYPE CPPValue
#include <stdio.h>
#include <stdlib.h>
int cppExpYYerror(const char *s)
{
printf("ERROR: %s\n",s);
return 0;
}
int cppExpYYlex();
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 73
#define YYFLAG -32768
#define YYNTBASE 32
#define YYTRANSLATE(x) ((unsigned)(x) <= 286 ? yytranslate[x] : 47)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 4, 10, 12, 16, 18, 22, 24, 28,
30, 34, 36, 40, 42, 46, 50, 52, 56, 60,
64, 68, 70, 74, 78, 80, 84, 88, 90, 94,
98, 102, 104, 107, 110, 113, 116, 118, 122, 124,
126, 128, 130
};
static const short yyrhs[] = { 33,
0, 34, 0, 34, 3, 34, 4, 34, 0, 35,
0, 34, 5, 35, 0, 36, 0, 35, 6, 36,
0, 37, 0, 36, 7, 37, 0, 38, 0, 37,
8, 38, 0, 39, 0, 38, 9, 39, 0, 40,
0, 39, 11, 40, 0, 39, 10, 40, 0, 41,
0, 40, 12, 41, 0, 40, 13, 41, 0, 40,
14, 41, 0, 40, 15, 41, 0, 42, 0, 41,
16, 42, 0, 41, 17, 42, 0, 43, 0, 42,
18, 43, 0, 42, 19, 43, 0, 44, 0, 43,
20, 44, 0, 43, 21, 44, 0, 43, 22, 44,
0, 45, 0, 18, 44, 0, 19, 44, 0, 23,
44, 0, 24, 44, 0, 46, 0, 25, 33, 26,
0, 27, 0, 28, 0, 29, 0, 30, 0, 31,
0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
74, 78, 80, 89, 91, 97, 99, 105, 107, 114,
116, 122, 124, 130, 132, 136, 142, 144, 148, 152,
157, 164, 166, 170, 176, 178, 189, 202, 204, 215,
228, 236, 238, 240, 247, 251, 257, 259, 263, 265,
267, 269, 271
};
#endif
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
static const char * const yytname[] = { "$","error","$undefined.","TOK_QUESTIONMARK",
"TOK_COLON","TOK_OR","TOK_AND","TOK_BITWISEOR","TOK_BITWISEXOR","TOK_AMPERSAND",
"TOK_NOTEQUAL","TOK_EQUAL","TOK_LESSTHAN","TOK_GREATERTHAN","TOK_LESSTHANOREQUALTO",
"TOK_GREATERTHANOREQUALTO","TOK_SHIFTLEFT","TOK_SHIFTRIGHT","TOK_PLUS","TOK_MINUS",
"TOK_STAR","TOK_DIVIDE","TOK_MOD","TOK_TILDE","TOK_NOT","TOK_LPAREN","TOK_RPAREN",
"TOK_OCTALINT","TOK_DECIMALINT","TOK_HEXADECIMALINT","TOK_CHARACTER","TOK_FLOAT",
"start","constant_expression","logical_or_expression","logical_and_expression",
"inclusive_or_expression","exclusive_or_expression","and_expression","equality_expression",
"relational_expression","shift_expression","additive_expression","multiplicative_expression",
"unary_expression","primary_expression","constant", NULL
};
#endif
static const short yyr1[] = { 0,
32, 33, 33, 34, 34, 35, 35, 36, 36, 37,
37, 38, 38, 39, 39, 39, 40, 40, 40, 40,
40, 41, 41, 41, 42, 42, 42, 43, 43, 43,
43, 44, 44, 44, 44, 44, 45, 45, 46, 46,
46, 46, 46
};
static const short yyr2[] = { 0,
1, 1, 5, 1, 3, 1, 3, 1, 3, 1,
3, 1, 3, 1, 3, 3, 1, 3, 3, 3,
3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
3, 1, 2, 2, 2, 2, 1, 3, 1, 1,
1, 1, 1
};
static const short yydefact[] = { 0,
0, 0, 0, 0, 0, 39, 40, 41, 42, 43,
1, 2, 4, 6, 8, 10, 12, 14, 17, 22,
25, 28, 32, 37, 33, 34, 35, 36, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 38, 0,
5, 7, 9, 11, 13, 16, 15, 18, 19, 20,
21, 23, 24, 26, 27, 29, 30, 31, 0, 3,
0, 0, 0
};
static const short yydefgoto[] = { 71,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24
};
static const short yypact[] = { -13,
-13, -13, -13, -13, -13,-32768,-32768,-32768,-32768,-32768,
-32768, 4, 2, 20, 27, 31, 21, 7, 17, 18,
8,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 24, -13,
-13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
-13, -13, -13, -13, -13, -13, -13, -13,-32768, 34,
2, 20, 27, 31, 21, 7, 7, 17, 17, 17,
17, 18, 18, 8, 8,-32768,-32768,-32768, -13, 39,
13, 51,-32768
};
static const short yypgoto[] = {-32768,
47, -26, 25, 23, 26, 28, 22, 5, -15, 6,
9, -1,-32768,-32768
};
#define YYLAST 62
static const short yytable[] = { 25,
26, 27, 28, 50, 1, 2, 30, 32, 31, 3,
4, 5, 72, 6, 7, 8, 9, 10, 38, 39,
40, 41, 58, 59, 60, 61, 33, 46, 47, 48,
36, 37, 42, 43, 34, 44, 45, 69, 31, 35,
56, 57, 70, 31, 66, 67, 68, 62, 63, 49,
73, 29, 64, 65, 52, 51, 55, 0, 53, 0,
0, 54
};
static const short yycheck[] = { 1,
2, 3, 4, 30, 18, 19, 3, 6, 5, 23,
24, 25, 0, 27, 28, 29, 30, 31, 12, 13,
14, 15, 38, 39, 40, 41, 7, 20, 21, 22,
10, 11, 16, 17, 8, 18, 19, 4, 5, 9,
36, 37, 69, 5, 46, 47, 48, 42, 43, 26,
0, 5, 44, 45, 32, 31, 35, -1, 33, -1,
-1, 34
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
#pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YYPURE
#define YYLEX yylex()
#endif
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
#ifndef YYPARSE_RETURN_TYPE
#define YYPARSE_RETURN_TYPE int
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
YYPARSE_RETURN_TYPE yyparse (void);
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (to, from, count)
char *to;
char *from;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (char *to, char *from, int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
YYPARSE_RETURN_TYPE
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
goto yybackup;
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 1:
{ resultValue = yyvsp[0]; return 0; ;
break;}
case 2:
{ yyval = yyvsp[0]; ;
break;}
case 3:
{
bool c = (yyvsp[-4].isInt() ? ((long)yyvsp[-4] != 0) : ((double)yyvsp[-4] != 0.0));
yyval = c ? yyvsp[-2] : yyvsp[0];
;
break;}
case 4:
{ yyval = yyvsp[0]; ;
break;}
case 5:
{
yyval = CPPValue( (long)((long)yyvsp[-2] || (long)yyvsp[0]) );
;
break;}
case 6:
{ yyval = yyvsp[0]; ;
break;}
case 7:
{
yyval = CPPValue( (long)((long)yyvsp[-2] && (long)yyvsp[0]) );
;
break;}
case 8:
{ yyval = yyvsp[0]; ;
break;}
case 9:
{
yyval = CPPValue( (long)yyvsp[-2] | (long)yyvsp[0] );
;
break;}
case 10:
{ yyval = yyvsp[0]; ;
break;}
case 11:
{
yyval = CPPValue( (long)yyvsp[-2] ^ (long)yyvsp[0] );
;
break;}
case 12:
{ yyval = yyvsp[0]; ;
break;}
case 13:
{
yyval = CPPValue( (long)yyvsp[-2] & (long)yyvsp[0] );
;
break;}
case 14:
{ yyval = yyvsp[0]; ;
break;}
case 15:
{
yyval = CPPValue( (long)((double)yyvsp[-2] == (double)yyvsp[0]) );
;
break;}
case 16:
{
yyval = CPPValue( (long)((double)yyvsp[-2] != (double)yyvsp[0]) );
;
break;}
case 17:
{ yyval = yyvsp[0]; ;
break;}
case 18:
{
yyval = CPPValue( (long)((double)yyvsp[-2] < (double)yyvsp[0]) );
;
break;}
case 19:
{
yyval = CPPValue( (long)((double)yyvsp[-2] > (double)yyvsp[0]) );
;
break;}
case 20:
{
yyval = CPPValue( (long)((double)yyvsp[-2] <= (double)yyvsp[0]) );
;
break;}
case 21:
{
yyval = CPPValue( (long)((double)yyvsp[-2] >= (double)yyvsp[0]) );
;
break;}
case 22:
{ yyval = yyvsp[0]; ;
break;}
case 23:
{
yyval = CPPValue( (long)yyvsp[-2] << (long)yyvsp[0] );
;
break;}
case 24:
{
yyval = CPPValue( (long)yyvsp[-2] >> (long)yyvsp[0] );
;
break;}
case 25:
{ yyval = yyvsp[0]; ;
break;}
case 26:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] + (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] + (long)yyvsp[0] );
}
;
break;}
case 27:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] - (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] - (long)yyvsp[0] );
}
;
break;}
case 28:
{ yyval = yyvsp[0]; ;
break;}
case 29:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] * (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] * (long)yyvsp[0] );
}
;
break;}
case 30:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] / (double)yyvsp[0] );
}
else
{
long value = yyvsp[0];
if (value==0) value=1;
yyval = CPPValue( (long)yyvsp[-2] / value );
}
;
break;}
case 31:
{
long value = yyvsp[0];
if (value==0) value=1;
yyval = CPPValue( (long)yyvsp[-2] % value );
;
break;}
case 32:
{ yyval = yyvsp[0]; ;
break;}
case 33:
{ yyval = yyvsp[-1]; ;
break;}
case 34:
{
if (yyvsp[0].isInt())
yyval = CPPValue(-(long)yyvsp[0]);
else
yyval = CPPValue(-(double)yyvsp[0]);
;
break;}
case 35:
{
yyval = CPPValue(~(long)yyvsp[0]);
;
break;}
case 36:
{
yyval = CPPValue((long)!(long)yyvsp[0]);
;
break;}
case 37:
{ yyval = yyvsp[0]; ;
break;}
case 38:
{ yyval = yyvsp[-1]; ;
break;}
case 39:
{ yyval = parseOctal(); ;
break;}
case 40:
{ yyval = parseDecimal(); ;
break;}
case 41:
{ yyval = parseHexadecimal(); ;
break;}
case 42:
{ yyval = parseCharacter(); ;
break;}
case 43:
{ yyval = parseFloat(); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg);
free(msg);
}
else
yyerror ("parse error; also virtual memory exceeded");
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#define TOK_QUESTIONMARK 258
#define TOK_COLON 259
#define TOK_OR 260
#define TOK_AND 261
#define TOK_BITWISEOR 262
#define TOK_BITWISEXOR 263
#define TOK_AMPERSAND 264
#define TOK_NOTEQUAL 265
#define TOK_EQUAL 266
#define TOK_LESSTHAN 267
#define TOK_GREATERTHAN 268
#define TOK_LESSTHANOREQUALTO 269
#define TOK_GREATERTHANOREQUALTO 270
#define TOK_SHIFTLEFT 271
#define TOK_SHIFTRIGHT 272
#define TOK_PLUS 273
#define TOK_MINUS 274
#define TOK_STAR 275
#define TOK_DIVIDE 276
#define TOK_MOD 277
#define TOK_TILDE 278
#define TOK_NOT 279
#define TOK_LPAREN 280
#define TOK_RPAREN 281
#define TOK_OCTALINT 282
#define TOK_DECIMALINT 283
#define TOK_HEXADECIMALINT 284
#define TOK_CHARACTER 285
#define TOK_FLOAT 286
extern YYSTYPE cppExpYYlval;
......@@ -29,6 +29,8 @@
#include "diagram.h"
#include "language.h"
#include "htmlhelp.h"
#include "example.h"
#include "outputlist.h"
static QCString stripExtension(const char *fName)
{
......@@ -73,6 +75,7 @@ ClassDef::ClassDef(const char *nm,CompoundType ct,const char *ref,const char *fN
tempArgs=0;
prot=Public;
nspace=0;
fileDef=0;
}
// destroy the class definition
......@@ -262,19 +265,12 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (incName.isNull()) nm=incFile->name();
ol.startTypewriter();
ol.docify("#include <");
ol.disable(OutputGenerator::Man);
if (Config::verbatimHeaderFlag)
{
ol.writeObjectLink(0,fileName+"-include",0,nm);
}
else
{
ol.docify(nm);
}
ol.enable(OutputGenerator::Man);
ol.disableAllBut(OutputGenerator::Man);
ol.disable(OutputGenerator::Html);
ol.docify(nm);
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
ol.writeObjectLink(0,fileName+"-include",0,nm);
ol.enableAll();
ol.docify(">");
ol.endTypewriter();
ol.newParagraph();
......@@ -420,7 +416,10 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write detailed description
bool exampleFlag=hasExamples();
if (!briefDescription().isEmpty() || !documentation().isEmpty() || exampleFlag)
if (!briefDescription().isEmpty() ||
!documentation().isEmpty() ||
(bodyLine!=-1 && bodyDef) ||
exampleFlag)
{
ol.writeRuler();
bool latexOn = ol.isEnabled(OutputGenerator::Latex);
......@@ -495,6 +494,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
//ol.endDescItem();
ol.endDescList();
}
writeSourceRef(ol);
}
pubMembers.countDocMembers();
......@@ -841,7 +841,7 @@ void ClassDef::writeIncludeFile(OutputList &ol)
parseText(ol,n);
endTitle(ol,0,0);
parseText(ol,theTranslator->trVerbatimText(incFile->name()));
ol.writeRuler();
//ol.writeRuler();
ol.startCodeFragment();
parseCode(ol,n,fileToString(incFile->absFilePath()),FALSE,0);
ol.endCodeFragment();
......@@ -1034,3 +1034,23 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md)
friends.writePlainDeclarations(ol,this,0,0);
related.writePlainDeclarations(ol,this,0,0);
}
/*! a link to this class is possible within this project */
bool ClassDef::isLinkableInProject()
{
return !name().isEmpty() && name().find('@')==-1 &&
(prot!=Private || Config::extractPrivateFlag) &&
hasDocumentation() && !isReference();
}
/*! the class is visible in a class diagram, or class hierarchy */
bool ClassDef::isVisibleInHierarchy()
{ return // show all classes or a superclass is visible
(Config::allExtFlag || hasNonReferenceSuperClass()) &&
// and not an annonymous compound
name().find('@')==-1 &&
// and not privately inherited
(prot!=Private || Config::extractPrivateFlag) &&
// documented or show anyway or documentation is external
(hasDocumentation() || !Config::hideClassFlag || isReference());
}
......@@ -17,18 +17,13 @@
#ifndef CLASSDEF_H
#define CLASSDEF_H
//#include <qtstream.h>
#include "qtbc.h"
#include <qfileinf.h>
#include <qlist.h>
#include <qdict.h>
#include <qstrlist.h>
#include "membername.h"
#include "memberlist.h"
#include "memberdef.h"
#include "example.h"
#include "entry.h"
#include "memberlist.h"
#include "definition.h"
typedef QDict<MemberDef> MemberDict;
......@@ -40,6 +35,9 @@ class MemberInfoList;
class MemberInfoDict;
class NamespaceDef;
class MemberDef;
class ExampleList;
class MemberNameInfoList;
class MemberNameInfoDict;
class ClassDef : public Definition
{
......@@ -50,13 +48,10 @@ class ClassDef : public Definition
Union=Entry::UNION_SEC,
Interface=Entry::INTERFACE_SEC
};
ClassDef(const char *name,CompoundType ct,const char *ref=0,const char *fName=0);
~ClassDef();
//QCString classFile() const { return fileName; }
QCString getOutputFileBase() const { return fileName; }
CompoundType compoundType() const { return compType; }
//const char *memberListFileName() const { return memListFileName; }
void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
BaseClassList *baseClasses() { return inherits; }
void insertSuperClass(ClassDef *,Protection p,Specifier s,const char *t=0);
......@@ -66,8 +61,6 @@ class ClassDef : public Definition
void setIncludeName(const char *n_) { incName=n_; }
MemberNameInfoList *memberNameInfoList() { return allMemberNameInfoList; }
MemberNameInfoDict *memberNameInfoDict() { return allMemberNameInfoDict; }
//bool isReference() { return !reference.isNull(); }
//const char *getReference() const { return reference; }
void insertMember(const MemberDef *);
void insertUsedFile(const char *);
void computeAnchors();
......@@ -83,14 +76,7 @@ class ClassDef : public Definition
//void writeExample(OutputList &ol);
void setProtection(Protection p) { prot=p; }
Protection protection() const { return prot; }
/*! a link to this class is possible within this project */
bool isLinkableInProject()
{ //int i = name().findRev("::");
//if (i==-1) i=0; else i+=2;
return !name().isEmpty() && name().find('@')==-1 &&
(prot!=Private || Config::extractPrivateFlag) &&
hasDocumentation() && !isReference();
}
bool isLinkableInProject();
/*! a link to this class is possible (either within this project,
* or as a cross-reference to another project
*/
......@@ -100,16 +86,7 @@ class ClassDef : public Definition
}
bool hasNonReferenceSuperClass();
/*! the class is visible in a class diagram, or class hierarchy */
bool isVisibleInHierarchy()
{ return // show all classes or a superclass is visible
(Config::allExtFlag || hasNonReferenceSuperClass()) &&
// and not an annonymous compound
name().find('@')==-1 &&
// and not privately inherited
(prot!=Private || Config::extractPrivateFlag) &&
// documented or show anyway or documentation is external
(hasDocumentation() || !Config::hideClassFlag || isReference());
}
bool isVisibleInHierarchy();
// template argument functions
ArgumentList *templateArguments() const { return tempArgs; }
......@@ -117,16 +94,15 @@ class ClassDef : public Definition
//QCString getTemplateNameString();
void setNamespace(NamespaceDef *nd) { nspace = nd; }
NamespaceDef *getNamespace() { return nspace; }
void setFileDef(FileDef *fd) { fileDef=fd; }
FileDef *getFileDef() const { return fileDef; }
bool visited;
private:
//QCString name; // name of the class
QCString fileName; // HTML containing the class docs
//QCString doc; // general class documentation
FileDef *incFile; // header file to refer to
QCString incName; // alternative include file name
//QCString brief; // brief class discription
QCString memListFileName;
BaseClassList *inherits;
BaseClassList *inheritedBy;
......@@ -147,11 +123,11 @@ class ClassDef : public Definition
MemberNameInfoDict *allMemberNameInfoDict;
ArgumentList *tempArgs;
QStrList files;
//QCString reference;
ExampleList *exampleList;
ExampleDict *exampleDict;
CompoundType compType;
Protection prot;
FileDef *fileDef;
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,8 +21,9 @@
#include <stdio.h>
class OutputList;
class FileDef;
extern void parseCode(OutputList &,const char *,const QCString &,
bool ,const char *);
bool ,const char *,FileDef *fd=0);
extern void initParseCodeContext();
#endif
......@@ -23,6 +23,7 @@
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include "qtbc.h"
#include "scanner.h"
......@@ -69,7 +70,7 @@ class CodeVarDef
typedef QList<CodeClassDef> CodeClassList;
typedef QDict<CodeClassDef> CodeClassDict;
typedef QList<CodeVarDef> CodeVarList;
typedef QList<CodeVarDef> CodeVarList;
static CodeClassList codeClassList;
static CodeClassDict codeClassDict(17);
......@@ -81,29 +82,32 @@ static CodeVarList codeParmList;
* statics
*/
static const char * inputString;
static int inputPosition;
static const char * inputString; //!< the code fragment as text
static int inputPosition; //!< read offset during parsing
static int inputLines; //!< number of line in the code fragment
static int yyLineNr; //!< current line number
static int lastCContext;
static int lastDContext;
static int lastSpecialCContext;
static int lastStringContext;
static int bracketCount = 0;
static int curlyCount = 0;
static int sharpCount = 0;
static int yyLineNr = 0;
static QCString type;
static QCString name;
static QCString args;
static QCString parmType;
static QCString parmName;
static QCString type;
static QCString name;
static QCString args;
static QCString parmType;
static QCString parmName;
static bool inClass;
static QCString classScope;
static QCString classScope;
static OutputList *code;
static CodeClassDef ccd;
static CodeVarDef cvd;
static bool exampleBlock;
static QCString exampleName;
static QCString exampleFile;
static QCString exampleName;
static QCString exampleFile;
static int anchorCount;
static FileDef *sourceFileDef;
static QCString lastVariable;
static void addType()
{
......@@ -193,7 +197,8 @@ static void generateClassLink(OutputList &ol,const char *clName)
}
static bool getLink(const char *className,
const char *memberName,OutputList &result)
const char *memberName,OutputList &result,
const char *text=0)
{
MemberDef *md;
ClassDef *cd;
......@@ -227,34 +232,27 @@ static bool getLink(const char *className,
{
//printf("d->getOutputBase()=`%s' name=`%s'\n",d->getOutputFileBase().data(),md->name().data());
result.writeCodeLink(d->getReference(),d->getOutputFileBase(),
md->anchor(),memberName);
md->anchor(),text ? text : memberName);
return TRUE;
}
// if (cd)
// {
// result.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),
// md->anchor(),memberName);
// return TRUE;
// }
// else if (nd)
// {
// result.writeCodeLink(nd->getReference(),nd->getOutputFileBase(),
// md->anchor(),memberName);
// return TRUE;
// }
// else if (fd)
// {
// result.writeCodeLink(fd->getReference(),fd->getOutputFileBase(),
// md->anchor(),memberName);
// return TRUE;
// }
}
return FALSE;
}
static ClassDef *stripClassName(const char *s)
{
QCString tmp=s;
QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*");
int p=0,i,l;
while ((i=re.match(tmp,p,&l))!=-1)
{
ClassDef *cd=getClass(tmp.mid(i,l));
if (cd) return cd;
p=i+l;
}
return 0;
}
static void generateMemberLink(OutputList &ol,const char *varName,
const char *memName)
{
......@@ -269,15 +267,25 @@ static void generateMemberLink(OutputList &ol,const char *varName,
}
if (cvd) // variable found
{
//printf("variable found type=%s!\n",cvd->type.data());
CodeClassDef *ccd=codeClassDict[cvd->type];
if (ccd)
{
//printf("Class found!\n");
OutputList result(&ol);
if (getLink(ccd->name,memName,result))
{
//printf("Found result!\n");
ol+=result;
return;
}
char *s=ccd->bases.first();
while (s)
{
OutputList result(&ol);
if (getLink(s,memName,result))
{
//printf("Found result!\n");
ol+=result;
return;
}
......@@ -298,22 +306,70 @@ static void generateMemberLink(OutputList &ol,const char *varName,
return;
}
}
else
{
ClassDef *vcd = getClass(classScope);
if (vcd)
{
//printf("Found class for variable `%s'\n",varName);
MemberName *vmn=memberNameDict[varName];
if (vmn)
{
MemberNameIterator vmni(*vmn);
MemberDef *vmd;
for (;(vmd=vmni.current());++vmni)
{
if (vmd->isVariable() && vmd->memberClass()==vcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
ClassDef *mcd=stripClassName(vmd->typeString());
if (mcd)
{
MemberName *mmn=memberNameDict[memName];
if (mmn)
{
MemberNameIterator mmni(*mmn);
MemberDef *mmd;
for (;(mmd=mmni.current());++mmni)
{
if (mmd->memberClass()==mcd)
{
ol.writeCodeLink(mcd->getReference(),mcd->getOutputFileBase(),
mmd->anchor(),memName);
return;
}
}
}
}
}
}
}
}
}
ol.codify(memName);
return;
}
static void generateFunctionLink(OutputList &ol,const char *funcName)
{
//printf("generateFunctionLink(%s) classScope=%s\n",funcName,classScope.data());
OutputList result(&ol);
CodeClassDef *ccd=0;
if (classScope.length()>0 && (ccd=codeClassDict[classScope]))
QCString locScope=classScope.copy();
QCString locFunc=funcName;
int i=locFunc.findRev("::");
if (i>0)
{
locScope=locFunc.left(i);
locFunc=locFunc.right(locFunc.length()-i-2);
}
//printf("generateFunctionLink(%s) classScope=%s\n",locFunc.data(),locScope.data());
if (locScope.length()>0 && (ccd=codeClassDict[locScope]))
{
//printf("using classScope %s\n",classScope.data());
char *s=ccd->bases.first();
while (s)
{
if (getLink(s,funcName,result))
if (getLink(s,locFunc,result,funcName))
{
ol+=result;
return;
......@@ -321,7 +377,7 @@ static void generateFunctionLink(OutputList &ol,const char *funcName)
s=ccd->bases.next();
}
}
if (getLink(classScope,funcName,result))
if (getLink(locScope,locFunc,result,funcName))
{
ol+=result;
}
......@@ -332,6 +388,76 @@ static void generateFunctionLink(OutputList &ol,const char *funcName)
return;
}
/*! counts the number of lines in the input */
static int countLines()
{
const char *p=inputString;
char c;
int count=1;
while ((c=*p++)) if (c=='\n') count++;
return count;
}
static void startCodeLine()
{
if (sourceFileDef)
{
QCString lineNumber,lineAnchor;
lineNumber.sprintf("%05d ",yyLineNr);
lineAnchor.sprintf("l%05d",yyLineNr);
//MemberDef *md = sourceFileDef->getSourceDefinition(yyLineNr);
//Definition *d=0;
//if (md)
//{
// d=md->memberClass();
// if (!d) d=md->getFileDef();
//}
//if (md && d)
Definition *d = sourceFileDef->getSourceDefinition(yyLineNr);
QCString anchor = sourceFileDef->getSourceAnchor(yyLineNr);
if (d && d->isLinkableInProject())
{
code->startCodeAnchor(lineAnchor);
code->writeCodeLink(d->getReference(),d->getOutputFileBase(),
anchor,lineNumber);
code->endCodeAnchor();
}
else
{
code->codify(lineNumber);
}
}
code->startCodeLine();
}
static void codifyLines(char *text)
{
char *p=text,*sp=p;
char c;
bool done=FALSE;
while (!done)
{
sp=p;
while ((c=*p++) && c!='\n');
if (c=='\n')
{
yyLineNr++;
*(p-1)='\0';
code->codify(sp);
code->endCodeLine();
if (yyLineNr<inputLines)
{
startCodeLine();
}
}
else
{
code->codify(sp);
done=TRUE;
}
}
}
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
......@@ -350,16 +476,19 @@ static int yyread(char *buf,int max_size)
%}
B [ \t]
BN [ \t\n\r]
ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%option noyywrap
%x SkipString
%x SkipCPP
%x SkipComment
%x SkipSpecialComment
%x SkipCxxComment
%x SkipSpecialCxxComment
%x RemoveSpecialCComment
%x StripSpecialCComment
%x Body
%x FuncCall
%x MemberCall
......@@ -373,12 +502,13 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
%%
<*>\x0d
<Body>^([ \t]*"#include"[ \t]*)("<"|"\"") {
<Body>^([ \t]*"#"[ \t]"include"[ \t]*)("<"|"\"") {
code->codify(yytext);
BEGIN( ReadInclude );
}
<Body>("class"|"struct"|"union")[ \t\n]+ {
code->codify(yytext);
codifyLines(yytext);
//code->codify(yytext);
BEGIN( ClassName );
}
<ReadInclude>[a-z_A-Z0-9.]+(("/"[a-z_A-Z0-9.]+)*)/(">"|"\"") {
......@@ -408,12 +538,10 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
code->codify(yytext);
}
<SkipCPP>\\\n {
code->codify(yytext);
yyLineNr++ ;
codifyLines(yytext);
}
<SkipCPP>\n {
yyLineNr++ ;
code->codify(yytext);
codifyLines(yytext);
BEGIN( Body ) ;
}
<SkipCPP>"//" {
......@@ -447,7 +575,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
generateClassLink(*code,yytext);
}
<ClassName>[ \t\n]*":"[ \t\n]* {
code->codify(yytext);
codifyLines(yytext);
BEGIN( Bases );
}
<Bases,ClassName>[ \t]*"{"[ \t]* {
......@@ -500,29 +628,33 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<Body>("asm"|"auto"|"break"|"case"|"catch"|"continue"|"default"|"delete"|"do"|"else"|"for"|"goto"|"if"|"new"|"return"|"switch"|"this"|"throw"|"try"|"typedef"|"while")([ \t\n]*)/"(" {
code->codify(yytext);
codifyLines(yytext);
name.resize(0);type.resize(0);
}
<Body>("asm"|"auto"|"break"|"case"|"catch"|"continue"|"default"|"delete"|"do"|"else"|"for"|"goto"|"if"|"new"|"return"|"switch"|"this"|"throw"|"try"|"typedef"|"while")([ \t\n]*) {
code->codify(yytext);
codifyLines(yytext);
name.resize(0);type.resize(0);
}
/*
<Body>([a-z_A-Z~][a-z_A-Z0-9]*)/([ \t]*) {
generateClassLink(*code,yytext);
addType();
name+=yytext;
}
<Body>[a-z_A-Z~]([a-z_A-Z0-9]*[ \t\n]*"::")+[ \t\n]*[~a-z_A-Z][a-z_A-Z0-9]*[ \t\n]* {
code->codify(yytext);
*/
<Body>{SCOPENAME}/[ \t\n]* {
generateClassLink(*code,yytext);
//codifyLines(yytext);
addType();
name+=yytext;
}
<Body>([a-z_A-Z~][a-z_A-Z0-9:]*)/([ \t]*"(") {
<Body>{SCOPENAME}/{B}*"(" {
addType();
if (type.length()==0)
generateFunctionLink(*code,yytext);
else
code->codify(yytext);
//if (type.length()==0)
QCString tmp=yytext;
generateFunctionLink(*code,yytext);
//else
// code->codify(yytext);
bracketCount=1;
args.resize(0);
name+=yytext;
......@@ -536,11 +668,14 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<SkipString>[^\"\\]* {
code->codify(yytext);
}
<SkipString>"//"|"/*" {
code->codify(yytext);
}
<SkipString>\" {
code->codify(yytext);
BEGIN( lastStringContext );
}
<SkipString>\\\" {
<SkipString>\\. {
code->codify(yytext);
}
<Body>":" {
......@@ -554,7 +689,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
code->codify(yytext);
BEGIN( MemberCall );
}
<MemberCall>([a-z_A-Z~][a-z_A-Z0-9]*)/([ \t\n]*"(") {
<MemberCall>{SCOPENAME}/{B}*"(" {
if (name.length()>0)
generateMemberLink(*code,name,yytext);
else
......@@ -563,7 +698,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
bracketCount=0;
BEGIN(FuncCall);
}
<MemberCall>[^a-z_A-Z0-9(] {
<MemberCall>[^a-z_A-Z0-9(\n] {
code->codify(yytext);
type.resize(0);
name.resize(0);
......@@ -602,7 +737,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
BEGIN( Body );
}
<MemberCall2,FuncCall>")"[ \t\n]*";" {
code->codify(yytext);
codifyLines(yytext);
bracketCount=0;
if (!inClass && type.length()>0)
addVariable();
......@@ -614,7 +749,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
addParameter();
parmType.resize(0);parmName.resize(0);
if (name.length()>0) setClassScope(name);
code->codify(yytext);
codifyLines(yytext);
curlyCount++;
type.resize(0); name.resize(0);
BEGIN( Body );
......@@ -623,7 +758,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
addParameter();
parmType.resize(0);parmName.resize(0);
if (name.length()>0) setClassScope(name);
code->codify(yytext);
codifyLines(yytext);
type.resize(0); name.resize(0);
BEGIN( SkipInits );
}
......@@ -658,67 +793,118 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<SkipComment>"//" {
code->codify(yytext);
}
<SkipComment>[^*/\n]+ {
code->codify(yytext);
}
<SkipComment>[ \t]*"*/" {
code->codify(yytext);
BEGIN( lastCContext ) ;
}
<SkipCxxComment>.*\n {
code->codify(yytext);
yyLineNr++ ;
codifyLines(yytext);
BEGIN( lastCContext ) ;
}
<SkipSpecialComment>"//"
/*!
<SkipSpecialComment>[ \t]*"* /"[ \t]* /"\n" {
BEGIN( lastDContext ) ;
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*{B}*"/*"[*!]/[^/*] {
yyLineNr+=QCString(yytext).contains('\n');
}
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)* {
yyLineNr+=QCString(yytext).contains('\n');
code->endCodeLine();
if (yyLineNr<inputLines)
{
startCodeLine();
}
BEGIN(lastSpecialCContext);
}
*/
<SkipSpecialComment>[ \t]*"*/" {
<RemoveSpecialCComment>"*/" {
BEGIN(lastSpecialCContext);
}
<RemoveSpecialCComment>[^*\n]+
<RemoveSpecialCComment>"//"|"/*"
<RemoveSpecialCComment>\n { yyLineNr++; }
<RemoveSpecialCComment>.
/*
<SkipSpecialComment>"//"
<SkipSpecialComment>[ \t]*"* /" {
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>[ \t]*"*/"[ \t\n]*"\n"/"/*" {
<SkipSpecialComment>[ \t]*"* /"[ \t\n]*"\n"/"/ *" {
//code->codify("\n");
QCString lineText=yytext;
yyLineNr+=lineText.contains('\n');
//QCString lineText=yytext;
//yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>.
<SkipSpecialComment>\n { yyLineNr++; }
<SkipSpecialCxxComment>.*/\n {
yyLineNr++ ;
<SkipSpecialComment>\n {
codifyLines(yytext);
}
<SkipSpecialCxxComment>.* /\n {
codifyLines(yytext);
BEGIN( lastDContext ) ;
}
<SkipSpecialCxxComment>.
<SkipSpecialCxxComment>\n { yyLineNr++; }
<*>[ \t]*"/*!"|"/**" {
lastDContext = YY_START ;
BEGIN( SkipSpecialComment );
<SkipSpecialCxxComment>\n {
codifyLines(yytext);
}
*/
<*>\n({B}*"//"[!/][^\n]*\n)* { // remove special one-line comment
yyLineNr+=((QCString)yytext).contains('\n');
code->endCodeLine();
if (yyLineNr<inputLines)
{
startCodeLine();
}
}
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
yyLineNr++;
code->endCodeLine();
if (yyLineNr<inputLines)
{
startCodeLine();
}
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
<*>\n{B}*"/*"[!*]/[^/*] {
lastSpecialCContext = YY_START;
yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
<*>"/*"[!*]/[^/*] { // special C comment block half way a line
lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
<*>"/*" {
code->codify(yytext);
lastCContext = YY_START ;
BEGIN( SkipComment ) ;
}
<*>[ \t]*"//!" {
lastDContext = YY_START ;
BEGIN( SkipSpecialCxxComment );
}
<*>"//" {
code->codify(yytext);
lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
}
<*>\n {
codifyLines(yytext);
}
<*>. {
code->codify(yytext);
}
<*>\n {
code->codify(yytext);
}
/*
<*>([ \t\n]*"\n"){2,} { // combine multiple blank lines
QCString sepLine=yytext;
code->codify("\n\n");
yyLineNr+=sepLine.contains('\n');
//QCString sepLine=yytext;
//code->codify("\n\n");
//yyLineNr+=sepLine.contains('\n');
//char sepLine[3]="\n\n";
codifyLines(yytext);
}
*/
%%
......@@ -739,20 +925,23 @@ void initParseCodeContext()
}
void parseCode(OutputList &ol,const char *className,const QCString &s,
bool e, const char *exName)
bool exBlock, const char *exName,FileDef *fd)
{
code = new OutputList(&ol);
if (s.length()==0) return;
inputString = s;
inputPosition = 0;
yyLineNr = 0;
inputLines = countLines();
yyLineNr = 1;
curlyCount = 0;
bracketCount = 0;
sharpCount = 0;
classScope = className;
exampleBlock = e;
exampleBlock = exBlock;
exampleName = exName;
sourceFileDef = fd;
exampleFile = convertSlashes(exampleName,TRUE)+"-example";
startCodeLine();
type.resize(0);
name.resize(0);
args.resize(0);
......@@ -761,6 +950,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
codeYYrestart( codeYYin );
BEGIN( Body );
codeYYlex();
//if (yyLineNr<=inputLines) code->endCodeLine();
ol+=*code;
delete code;
return;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,70 +31,77 @@ struct Config
{
static void init();
static QCString projectName; // the name of the project
static QCString projectNumber; // the number of the project
static QCString outputDir; // the global output directory
static QCString htmlOutputDir; // the directory to put the HTML files
static QCString latexOutputDir; // the directory to put the Latex files
static QCString manOutputDir; // the directory to put the man pages
static QCString outputLanguage; // the output language
static QCString headerFile; // the name of the personal HTML header
static QCString latexHeaderFile; // the name of the personal LaTeX header
static QCString footerFile; // the name of the personal HTML footer
static QCString cgiName; // the name of the CGI binary
static QCString cgiURL; // the absolute URL to the CGI binary
static QCString docURL; // the absolute URL to the documentation
static QCString binAbsPath; // the absolute path to the doxysearch
static QCString docAbsPath; // the absolute path to the documentation
static QCString perlPath; // the absolute path to perl
static QCString genTagFile; // the tag file to generate
static QCString inputFilter; // a filter command that is applied to input files
static QCString paperType; // the page type to generate docs for
static QCString manExtension; // extension the man page files
static QStrList includePath; // list of include paths
static QStrList examplePath; // list of example paths
static QStrList inputSources; // list of input files
static QStrList excludeSources; // list of files to exclude from the input
static QStrList filePatternList; // list of file patterns
static QStrList excludePatternList; // list of patterns to exclude from input
static QStrList tagFileList; // list of tag files
static QStrList extDocPathList; // list of external doc. directories.
static QStrList predefined; // list of predefined macro names.
static QStrList extraPackageList; // list of extra LaTeX packages.
static QStrList stripFromPath; // list of candidates to strip from the file path
static bool quietFlag; // generate progress messages flag
static bool warningFlag; // generate warnings flag
static bool recursiveFlag; // scan directories recursively
static bool allExtFlag; // include all external classes flag
static bool searchEngineFlag; // generate search engine flag
static bool extractAllFlag; // gererate docs for all classes flag
static bool extractPrivateFlag; // generate docs for private members flag
static bool noIndexFlag; // generate condensed index flag
static bool generateHtml; // generate HTML output
static bool generateLatex; // generate Latex output
static bool generateMan; // generate Man pages
static bool preprocessingFlag; // enable preprocessing
static bool briefMemDescFlag; // enable `inline' brief member descr.
static bool hideMemberFlag; // hide undocumented members.
static bool hideClassFlag; // hide undocumented members.
static bool searchIncludeFlag; // search for included files
static bool macroExpansionFlag; // expand macros in the source.
static bool onlyPredefinedFlag; // expand only predefined macros
static bool fullPathNameFlag; // using full path name in output
static bool classDiagramFlag; // enable the generation of class diagrams.
static bool compactLatexFlag; // generate compact LaTeX documentation.
static bool repeatBriefFlag; // repeat brief descriptions.
static bool internalDocsFlag; // determines what happens to internal docs.
static bool caseSensitiveNames; // determines if output can be mixed case.
static bool verbatimHeaderFlag; // enable/disable generation of verb headers.
static QCString projectName; // the name of the project
static QCString projectNumber; // the number of the project
static QCString outputDir; // the global output directory
static QCString htmlOutputDir; // the directory to put the HTML files
static QCString latexOutputDir; // the directory to put the Latex files
static QCString manOutputDir; // the directory to put the man pages
static QCString outputLanguage; // the output language
static QCString headerFile; // the name of the personal HTML header
static QCString latexHeaderFile; // the name of the personal LaTeX header
static QCString footerFile; // the name of the personal HTML footer
static QCString cgiName; // the name of the CGI binary
static QCString cgiURL; // the absolute URL to the CGI binary
static QCString docURL; // the absolute URL to the documentation
static QCString binAbsPath; // the absolute path to the doxysearch
static QCString docAbsPath; // the absolute path to the documentation
static QCString perlPath; // the absolute path to perl
static QCString genTagFile; // the tag file to generate
static QCString inputFilter; // a filter command that is applied to input files
static QCString paperType; // the page type to generate docs for
static QCString manExtension; // extension the man page files
static QCString htmlStyleSheet; // user defined cascading style sheet
static QStrList includePath; // list of include paths
static QStrList examplePath; // list of example paths
static QStrList imagePath; // list of image paths
static QStrList inputSources; // list of input files
static QStrList excludeSources; // list of files to exclude from the input
static QStrList filePatternList; // list of file patterns
static QStrList excludePatternList; // list of patterns to exclude from input
static QStrList examplePatternList; // list of example patterns
static QStrList imagePatternList; // list of image paths
static QStrList tagFileList; // list of tag files
static QStrList extDocPathList; // list of external doc. directories.
static QStrList predefined; // list of predefined macro names.
static QStrList extraPackageList; // list of extra LaTeX packages.
static QStrList stripFromPath; // list of candidates to strip from the file path
static bool quietFlag; // generate progress messages flag
static bool warningFlag; // generate warnings flag
static bool recursiveFlag; // scan directories recursively
static bool allExtFlag; // include all external classes flag
static bool searchEngineFlag; // generate search engine flag
static bool extractAllFlag; // gererate docs for all classes flag
static bool extractPrivateFlag; // generate docs for private members flag
static bool noIndexFlag; // generate condensed index flag
static bool generateHtml; // generate HTML output
static bool generateLatex; // generate Latex output
static bool generateMan; // generate Man pages
static bool preprocessingFlag; // enable preprocessing
static bool briefMemDescFlag; // enable `inline' brief member descr.
static bool hideMemberFlag; // hide undocumented members.
static bool hideClassFlag; // hide undocumented members.
static bool searchIncludeFlag; // search for included files
static bool macroExpansionFlag; // expand macros in the source.
static bool onlyPredefinedFlag; // expand only predefined macros
static bool fullPathNameFlag; // using full path name in output
static bool classDiagramFlag; // enable the generation of class diagrams.
static bool compactLatexFlag; // generate compact LaTeX documentation.
static bool repeatBriefFlag; // repeat brief descriptions.
static bool internalDocsFlag; // determines what happens to internal docs.
static bool caseSensitiveNames; // determines if output can be mixed case.
static bool verbatimHeaderFlag; // enable/disable generation of verb headers.
static bool htmlAlignMemberFlag; // align members in HTML using tables.
static bool includeSourceFlag; // include source code in documentation.
static bool autoBriefFlag; // javadoc comments behaves as Qt comments.
static bool htmlHelpFlag; // should html help files be generated?
static bool alphaIndexFlag; // should an alphabetical index be generated?
static bool pdfHyperFlag; // generate latex prepared creating hyperlinked pdfs.
static bool inheritDocsFlag; // inheritance of documentation enabled?
static bool inlineInfoFlag; // show info about inline members?
static bool sourceBrowseFlag; // include source code in documentation.
static bool autoBriefFlag; // javadoc comments behaves as Qt comments.
static bool htmlHelpFlag; // should html help files be generated?
static bool alphaIndexFlag; // should an alphabetical index be generated?
static bool pdfHyperFlag; // generate latex prepared creating hyperlinked pdfs.
static bool inheritDocsFlag; // inheritance of documentation enabled?
static bool inlineInfoFlag; // show info about inline members?
static bool alwaysDetailsFlag; // show details description even if there is only a brief description?
static int tabSize; // number of spaces in a tab
static int colsInAlphaIndex; // number of columns in the alphabetical index
};
#endif
......@@ -24,9 +24,9 @@
#include <assert.h>
#include <ctype.h>
#include <qfileinf.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <qtstream.h>
#include <qtextstream.h>
#include "config.h"
#include "version.h"
......@@ -83,12 +83,16 @@ QCString Config::genTagFile;
QCString Config::inputFilter;
QCString Config::paperType;
QCString Config::manExtension;
QCString Config::htmlStyleSheet;
QStrList Config::includePath;
QStrList Config::examplePath;
QStrList Config::imagePath;
QStrList Config::inputSources;
QStrList Config::excludeSources;
QStrList Config::filePatternList;
QStrList Config::excludePatternList;
QStrList Config::examplePatternList;
QStrList Config::imagePatternList;
QStrList Config::tagFileList;
QStrList Config::extDocPathList;
QStrList Config::predefined;
......@@ -109,10 +113,11 @@ bool Config::fullPathNameFlag = FALSE;
bool Config::compactLatexFlag = FALSE;
bool Config::internalDocsFlag = FALSE;
bool Config::caseSensitiveNames = FALSE;
bool Config::includeSourceFlag = FALSE;
bool Config::sourceBrowseFlag = FALSE;
bool Config::htmlHelpFlag = FALSE;
bool Config::alphaIndexFlag = FALSE;
bool Config::pdfHyperFlag = FALSE;
bool Config::alwaysDetailsFlag = FALSE;
bool Config::autoBriefFlag = TRUE;
bool Config::warningFlag = TRUE;
bool Config::generateHtml = TRUE;
......@@ -127,6 +132,8 @@ bool Config::verbatimHeaderFlag = TRUE;
bool Config::htmlAlignMemberFlag = TRUE;
bool Config::inheritDocsFlag = TRUE;
bool Config::inlineInfoFlag = TRUE;
int Config::tabSize = 8;
int Config::colsInAlphaIndex = 5;
/* -----------------------------------------------------------------
*
......@@ -136,13 +143,15 @@ bool Config::inlineInfoFlag = TRUE;
static const char * inputString;
static int inputPosition;
static int yyLineNr;
static QCString tmpString;
static QCString * s=0;
static QCString tmpString;
static QCString * s=0;
static bool * b=0;
static QStrList * l=0;
static int lastState;
static int lastEnvState;
static QCString elemStr;
static QCString elemStr;
static QCString tabSizeString;
static QCString colsInAlphaIndexString;
/* -----------------------------------------------------------------
*/
......@@ -196,12 +205,18 @@ static int yyread(char *buf,int max_size)
<Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&Config::paperType; }
<Start>"OUTPUT_LANGUAGE"[ \t]*"=" { BEGIN(GetString); s=&Config::outputLanguage; }
<Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; }
<Start>"TAB_SIZE"[ \t]*"=" { BEGIN(GetString); s=&tabSizeString; }
<Start>"HTML_STYLESHEET"[ \t]*"=" { BEGIN(GetString); s=&Config::htmlStyleSheet; }
<Start>"COLS_IN_ALPHA_INDEX"[ \t]*"=" { BEGIN(GetString); s=&colsInAlphaIndexString; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; elemStr=""; }
<Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; elemStr=""; }
<Start>"IMAGE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePath; elemStr=""; }
<Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&Config::inputSources; elemStr=""; }
<Start>"EXCLUDE"[ \t]*"=" { BEGIN(GetStrList); l=&Config::excludeSources; elemStr=""; }
<Start>"FILE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::filePatternList; elemStr=""; }
<Start>"EXCLUDE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::excludePatternList; elemStr=""; }
<Start>"EXAMPLE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePatternList; elemStr=""; }
<Start>"IMAGE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePatternList; elemStr=""; }
<Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; elemStr=""; }
<Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extDocPathList; elemStr=""; }
<Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; elemStr=""; }
......@@ -222,6 +237,7 @@ static int yyread(char *buf,int max_size)
<Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; }
<Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; }
<Start>"BRIEF_MEMBER_DESC"[ \t]*"=" { BEGIN(GetBool); b=&Config::briefMemDescFlag; }
<Start>"ALWAYS_DETAILED_SEC"[ \t]*"=" { BEGIN(GetBool); b=&Config::alwaysDetailsFlag; }
<Start>"HIDE_UNDOC_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::hideMemberFlag; }
<Start>"HIDE_UNDOC_CLASSES"[ \t]*"=" { BEGIN(GetBool); b=&Config::hideClassFlag; }
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; }
......@@ -233,7 +249,7 @@ static int yyread(char *buf,int max_size)
<Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&Config::caseSensitiveNames; }
<Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::verbatimHeaderFlag; }
<Start>"HTML_ALIGN_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlAlignMemberFlag; }
<Start>"SOURCE_BROWSER"[ \t]*"=" { BEGIN(GetBool); b=&Config::includeSourceFlag; }
<Start>"SOURCE_BROWSER"[ \t]*"=" { BEGIN(GetBool); b=&Config::sourceBrowseFlag; }
<Start>"JAVADOC_AUTOBRIEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::autoBriefFlag; }
<Start>"GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; }
<Start>"ALPHABETICAL_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::alphaIndexFlag; }
......@@ -395,17 +411,23 @@ void Config::init()
Config::inputFilter.resize(0);
Config::paperType = "a4wide";
Config::manExtension = ".3";
Config::htmlStyleSheet.resize(0);
Config::includePath.clear();
Config::examplePath.clear();
Config::imagePath.clear();
Config::inputSources.clear();
Config::excludeSources.clear();
Config::filePatternList.clear();
Config::examplePatternList.clear();
Config::imagePatternList.clear();
Config::excludePatternList.clear();
Config::tagFileList.clear();
Config::extDocPathList.clear();
Config::predefined.clear();
Config::extraPackageList.clear();
Config::stripFromPath.clear();
Config::tabSize=8;
Config::colsInAlphaIndex=5;
Config::quietFlag = FALSE;
Config::recursiveFlag = FALSE;
Config::allExtFlag = FALSE;
......@@ -421,10 +443,11 @@ void Config::init()
Config::compactLatexFlag = FALSE;
Config::internalDocsFlag = FALSE;
Config::caseSensitiveNames = FALSE;
Config::includeSourceFlag = FALSE;
Config::sourceBrowseFlag = FALSE;
Config::htmlHelpFlag = FALSE;
Config::alphaIndexFlag = FALSE;
Config::pdfHyperFlag = FALSE;
Config::alwaysDetailsFlag = FALSE;
Config::warningFlag = TRUE;
Config::generateHtml = TRUE;
Config::generateLatex = TRUE;
......@@ -569,16 +592,6 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "BRIEF_MEMBER_DESC = YES\n";
if (!sl)
{
t << "\n";
t << "# The INTERNAL_DOCS tag determines if documentation\n";
t << "# that is typed after a \\internal command is included. If the tag is set \n";
t << "# to NO (the default) then the documentation will be excluded.\n";
t << "# Set it to YES to include the internal documentation.\n";
t << "\n";
}
t << "INTERNAL_DOCS = NO\n";
if (!sl)
{
t << "\n";
t << "# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend\n";
......@@ -589,9 +602,18 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "REPEAT_BRIEF = YES\n";
if (!sl)
{
t <<"\n";
t << "# If the ALWAYS_DETAILS_SEC and REPEAT_BRIEF tags are both set to YES then\n";
t << "# Doxygen will generate a detailed section even if there is only a brief\n";
t << "# description.\n";
t <<"\n";
}
t << "ALWAYS_DETAILED_SEC = NO\n";
if (!sl)
{
t << "\n";
t << "# If the FULL_PATH_NAMES tag is set to YES Doxygen will prepend the full\n";
t << "# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full\n";
t << "# path before files name in the file list and in the header files. If set\n" ;
t << "# to NO the shortest path that makes the file name unique will be used.\n";
t << "\n";
......@@ -608,6 +630,16 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "STRIP_FROM_PATH =\n";
if (!sl)
{
t << "\n";
t << "# The INTERNAL_DOCS tag determines if documentation\n";
t << "# that is typed after a \\internal command is included. If the tag is set \n";
t << "# to NO (the default) then the documentation will be excluded.\n";
t << "# Set it to YES to include the internal documentation.\n";
t << "\n";
}
t << "INTERNAL_DOCS = NO\n";
if (!sl)
{
t << "\n";
t << "# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will\n";
......@@ -673,6 +705,14 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "INLINE_INFO = YES\n";
if (!sl)
{
t << "\n";
t << "# the TAB_SIZE tag can be used to set the number of spaces in a tab\n";
t << "# Doxygen uses this value to replace tabs by spaces in code fragments.\n";
t << "\n";
}
t << "TAB_SIZE = 8\n";
if (!sl)
{
t << "\n";
}
......@@ -736,6 +776,36 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "EXAMPLE_PATH =\n";
if (!sl)
{
t << "\n";
t << "# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n";
t << "# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n";
t << "# and *.h) to filter out the source-files in the directories. If left \n";
t << "# blank all files are included.\n";
t << "\n";
}
t << "EXAMPLE_PATTERNS =\n";
if (!sl)
{
t << "\n";
t << "# The IMAGE_PATH tag can be used to specify one or more files or \n";
t << "# directories that contain image that are included in the documentation (see \n";
t << "# the \\image command).\n";
t << "\n";
}
t << "IMAGE_PATH =\n";
if (!sl)
{
t << "\n";
t << "# If the value of the IMAGE_PATH tag contains directories, you can use the\n";
t << "# IMAGE_PATTERNS tag to specify one or more wildcard pattern (like *.gif \n";
t << "# and *.eps) to filter out the image files in the directories. If left \n";
t << "# blank all files are included.\n";
t << "\n";
}
t << "IMAGE_PATTERNS =\n";
if (!sl)
{
t << "\n";
t << "# The INPUT_FILTER tag can be used to specify a program that doxygen should\n";
......@@ -790,6 +860,16 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "HTML_FOOTER =\n";
if (!sl)
{
t << "\n";
t << "# The HTML_STYLESHEET tag can be used to specify a user defined cascading\n";
t << "# style sheet that is used by each HTML page. It can be used to \n";
t << "# fine-tune the look of the HTML output. If the tag is left blank doxygen\n";
t << "# will generate a default style sheet\n";
t << "\n";
}
t << "HTML_STYLESHEET =\n";
if (!sl)
{
t << "\n";
t << "# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,\n";
......@@ -818,6 +898,15 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "ALPHABETICAL_INDEX = NO\n";
if (!sl)
{
t << "\n";
t << "# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then\n";
t << "# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns\n";
t << "# in which this list will be split (can be a number in the range [1..20])\n";
t << "\n";
}
t << "COLS_IN_ALPHA_INDEX = 5\n";
if (!sl)
{
t << "\n";
}
......@@ -1097,6 +1186,39 @@ void checkConfig()
//{
// projectName[0]=toupper(projectName[0]);
//}
if (tabSizeString.isEmpty())
{
Config::tabSize=8;
}
else
{
bool ok;
int ts = tabSizeString.toInt(&ok);
if (!ok || ts<1 || ts>16)
{
warn("Warning: argument of TAB_SIZE is not a valid number, using tab size of 8 spaces!\n");
ts=8;
}
Config::tabSize = ts;
}
if (colsInAlphaIndexString.isEmpty())
{
Config::colsInAlphaIndex=5;
}
else
{
bool ok;
int cols = colsInAlphaIndexString.toInt(&ok);
if (!ok || cols<1 || cols>20)
{
warn("Warning: argument of COLS_IN_ALPHA_INDEX is not a valid number in the range [1..20]!\n"
"Using the default of 5 columns!\n");
cols = 5;
}
Config::colsInAlphaIndex=cols;
}
// set default man page extension if non is given by the user
if (Config::manExtension.isEmpty())
......@@ -1269,11 +1391,24 @@ void checkConfig()
s=Config::inputSources.next();
}
}
// add default pattern if needed
if (Config::filePatternList.count()==0)
{
Config::filePatternList.append("*");
}
// add default pattern if needed
if (Config::examplePatternList.count()==0)
{
Config::examplePatternList.append("*");
}
// add default pattern if needed
if (Config::imagePatternList.count()==0)
{
Config::imagePatternList.append("*");
}
// more checks needed if and only if the search engine is enabled.
if (Config::searchEngineFlag)
......
#define yy_create_buffer declinfoYY_create_buffer
#define yy_delete_buffer declinfoYY_delete_buffer
#define yy_scan_buffer declinfoYY_scan_buffer
#define yy_scan_string declinfoYY_scan_string
#define yy_scan_bytes declinfoYY_scan_bytes
#define yy_flex_debug declinfoYY_flex_debug
#define yy_init_buffer declinfoYY_init_buffer
#define yy_flush_buffer declinfoYY_flush_buffer
#define yy_load_buffer_state declinfoYY_load_buffer_state
#define yy_switch_to_buffer declinfoYY_switch_to_buffer
#define yyin declinfoYYin
#define yyleng declinfoYYleng
#define yylex declinfoYYlex
#define yyout declinfoYYout
#define yyrestart declinfoYYrestart
#define yytext declinfoYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 21
#define YY_END_OF_BUFFER 22
static yyconst short int yy_accept[89] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
22, 20, 21, 5, 4, 8, 7, 20, 10, 2,
9, 2, 20, 13, 11, 12, 18, 18, 20, 20,
21, 16, 20, 19, 5, 8, 7, 0, 10, 9,
4, 0, 6, 3, 2, 2, 0, 2, 0, 0,
0, 16, 0, 0, 16, 0, 0, 0, 3, 2,
0, 0, 15, 0, 0, 2, 0, 0, 2, 0,
0, 14, 2, 0, 17, 2, 1, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 4, 1, 5,
6, 7, 1, 1, 1, 1, 1, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 9, 1, 10,
1, 11, 1, 1, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
13, 1, 1, 1, 12, 1, 14, 12, 12, 12,
15, 12, 12, 16, 12, 12, 12, 12, 12, 12,
17, 18, 12, 19, 12, 20, 12, 12, 21, 12,
12, 12, 1, 1, 1, 22, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[23] =
{ 0,
1, 2, 1, 1, 1, 1, 1, 3, 1, 1,
1, 4, 1, 4, 4, 4, 4, 4, 4, 4,
4, 1
} ;
static yyconst short int yy_base[97] =
{ 0,
164, 163, 0, 0, 20, 22, 21, 23, 42, 51,
162, 161, 160, 159, 158, 157, 156, 155, 154, 153,
155, 168, 168, 60, 30, 33, 168, 145, 168, 0,
168, 135, 150, 168, 168, 168, 168, 130, 53, 62,
66, 36, 75, 168, 0, 44, 168, 111, 168, 168,
32, 72, 168, 112, 0, 93, 105, 0, 75, 73,
79, 168, 88, 86, 95, 98, 100, 101, 85, 63,
42, 107, 168, 39, 111, 35, 27, 55, 9, 90,
113, 168, 11, 117, 168, 8, 0, 168, 122, 126,
130, 134, 138, 140, 143, 147
} ;
static yyconst short int yy_def[97] =
{ 0,
89, 89, 88, 3, 90, 90, 91, 91, 92, 92,
89, 89, 89, 89, 89, 89, 89, 89, 93, 93,
88, 88, 88, 88, 88, 88, 88, 88, 88, 94,
88, 94, 95, 88, 88, 88, 88, 88, 96, 96,
96, 88, 96, 88, 24, 88, 88, 88, 88, 88,
88, 88, 88, 88, 94, 94, 95, 94, 88, 96,
96, 88, 96, 96, 88, 88, 88, 96, 88, 94,
88, 88, 88, 88, 96, 94, 88, 88, 94, 88,
88, 88, 94, 88, 88, 94, 94, 0, 88, 88,
88, 88, 88, 88, 88, 88
} ;
static yyconst short int yy_nxt[191] =
{ 0,
22, 24, 23, 25, 26, 27, 25, 22, 28, 29,
22, 30, 31, 30, 30, 30, 32, 30, 30, 30,
30, 33, 23, 23, 23, 23, 87, 86, 83, 35,
36, 35, 36, 51, 52, 51, 51, 66, 51, 53,
38, 67, 38, 40, 41, 52, 42, 80, 79, 78,
53, 43, 40, 41, 61, 42, 81, 62, 77, 82,
43, 45, 63, 64, 46, 47, 65, 61, 48, 49,
62, 63, 50, 52, 61, 63, 61, 62, 53, 62,
61, 76, 63, 62, 63, 68, 69, 64, 63, 61,
65, 84, 62, 71, 85, 63, 66, 63, 68, 66,
67, 72, 75, 67, 73, 62, 57, 70, 72, 74,
63, 73, 75, 69, 81, 62, 74, 82, 84, 54,
63, 85, 22, 22, 22, 22, 34, 34, 34, 34,
37, 37, 37, 37, 39, 39, 39, 39, 44, 44,
44, 44, 55, 55, 58, 59, 58, 60, 60, 60,
60, 57, 56, 54, 88, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 21, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88
} ;
static yyconst short int yy_chk[191] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 5, 7, 6, 8, 86, 83, 79, 5,
5, 6, 6, 25, 26, 51, 25, 42, 51, 26,
7, 42, 8, 9, 9, 46, 9, 77, 76, 74,
46, 9, 10, 10, 39, 10, 78, 39, 71, 78,
10, 24, 39, 40, 24, 24, 40, 41, 24, 24,
41, 40, 24, 52, 60, 41, 43, 60, 52, 43,
61, 70, 60, 61, 43, 43, 69, 64, 61, 63,
64, 80, 63, 59, 80, 64, 65, 63, 63, 66,
65, 67, 68, 66, 67, 68, 57, 56, 72, 67,
68, 72, 75, 54, 81, 75, 72, 81, 84, 48,
75, 84, 89, 89, 89, 89, 90, 90, 90, 90,
91, 91, 91, 91, 92, 92, 92, 92, 93, 93,
93, 93, 94, 94, 95, 38, 95, 96, 96, 96,
96, 33, 32, 28, 21, 20, 19, 18, 17, 16,
15, 14, 13, 12, 11, 2, 1, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "declinfo.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "declinfo.l"
/*
* includes
*/
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include "declinfo.h"
#include "util.h"
#define YY_NO_UNPUT
/* -----------------------------------------------------------------
*
* statics
*/
static const char * inputString;
static int inputPosition;
static QCString scope;
static QCString className;
static QCString classTempList;
static QCString funcTempList;
static QCString type;
static QCString name;
static QCString args;
static QCString tmpType;
static int sharpCount;
static bool classTempListFound;
static bool funcTempListFound;
static QCString exceptionString;
static void addType()
{
//printf("addType() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data());
if (name.isEmpty() && scope.isEmpty()) return;
if (!type.isNull()) type+=' ';
if (!scope.isEmpty()) type+=scope+"::";
type+=name;
scope.resize(0);
name.resize(0);
}
static void addTypeName()
{
//printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data());
if (name.isEmpty()) return;
if (!type.isNull()) type+=' ';
type+=name;
name.resize(0);
}
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
*/
#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++] ;
c++; buf++;
}
return c;
}
#define Start 1
#define Template 2
#define ReadArgs 3
#define Operator 4
#define FuncPtr 5
#define EndTemplate 6
#define StripTempArgs 7
#define SkipSharp 8
#define ReadExceptions 9
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 110 "declinfo.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 168 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 112 "declinfo.l"
{ // operator rule must be before {ID} rule
name += yytext;
BEGIN(Operator);
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 116 "declinfo.l"
{
addTypeName();
name += yytext;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 120 "declinfo.l"
{ // found a scope specifier
if (!scope.isEmpty())
{
scope+="::"+name; // add name to scope
}
else
{
scope = name.copy(); // scope becomes name
}
name.resize(0);
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 131 "declinfo.l"
{
addType();
type+=yytext;
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 135 "declinfo.l"
{
addType();
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 138 "declinfo.l"
{
addType();
type+="(*";
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 142 "declinfo.l"
{
type+=")";
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 145 "declinfo.l"
{ // TODO: function pointers
args+="(";
BEGIN(ReadArgs);
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 149 "declinfo.l"
{
args+="[";
BEGIN(ReadArgs);
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 153 "declinfo.l"
{
name+="<";
sharpCount=0;
BEGIN(Template);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 158 "declinfo.l"
{
name+="<";
sharpCount++;
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 162 "declinfo.l"
{
name+=">";
if (sharpCount)
--sharpCount;
else
{
BEGIN(Start);
}
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 171 "declinfo.l"
{
name+=*yytext;
}
YY_BREAK
case 14:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 174 "declinfo.l"
{
name+="() <>";
BEGIN(ReadArgs);
}
YY_BREAK
case 15:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 178 "declinfo.l"
{
name+="()";
BEGIN(ReadArgs);
}
YY_BREAK
case 16:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 182 "declinfo.l"
{
name+=yytext;
BEGIN(ReadArgs);
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 186 "declinfo.l"
{
exceptionString="throw(";
BEGIN(ReadExceptions);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 190 "declinfo.l"
{
args+=*yytext;
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 193 "declinfo.l"
{
exceptionString+=*yytext;
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 196 "declinfo.l"
YY_BREAK
case 21:
YY_RULE_SETUP
#line 198 "declinfo.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(Template):
case YY_STATE_EOF(ReadArgs):
case YY_STATE_EOF(Operator):
case YY_STATE_EOF(FuncPtr):
case YY_STATE_EOF(EndTemplate):
case YY_STATE_EOF(StripTempArgs):
case YY_STATE_EOF(SkipSharp):
case YY_STATE_EOF(ReadExceptions):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 88);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 198 "declinfo.l"
/*@ ----------------------------------------------------------------------------
*/
void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
QCString &n,QCString &a,QCString &ftl,QCString &exc)
{
inputString = decl;
//printf("Input=`%s'\n",inputString);
if (inputString==0) return;
inputPosition = 0;
classTempListFound = FALSE;
funcTempListFound = FALSE;
scope.resize(0);
className.resize(0);
classTempList.resize(0);
funcTempList.resize(0);
name.resize(0);
type.resize(0);
args.resize(0);
exceptionString.resize(0);
// first we try to find the type, scope, name and arguments
declinfoYYrestart( declinfoYYin );
BEGIN( Start );
declinfoYYlex();
cl=scope.copy();
//printf("scope=`%s'\n",scope.data());
int il=0,ir=0;
if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments
{
ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il+1));
cl=cl.left(il)+cl.right(cl.length()-ir-1);
}
//printf("cl=`%s' ctl=`%s'\n",cl.data(),ctl.data());
n=removeRedundantWhiteSpace(name);
if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
// TODO: handle cases like where n="operator<< <T>"
{
ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
n=n.left(il);
}
//ctl=classTempList.copy();
//ftl=funcTempList.copy();
t=removeRedundantWhiteSpace(type);
a=removeRedundantWhiteSpace(args);
exc=removeRedundantWhiteSpace(exceptionString);
if (t.length()>0 && t.at(t.length()-1)==')')
{
a.prepend(")");
t=t.left(t.length()-1);
}
//printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
// t.data(),cl.data(),n.data(),a.data());
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)
{
QCString className;
QCString classTNames;
QCString type;
QCString name;
QCString args;
QCString funcTNames;
printf("-----------------------------------------\n");
parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
"funcTemplateNames=`%s' args=`%s'\n",
type.data(),className.data(),classTNames.data(),
name.data(),funcTNames.data(),args.data()
);
}
// some test code
int main()
{
dumpDecl("A < T > :: Value * A < T > :: getValue < S > ( const A < T > & a )");
dumpDecl("const A<T>::Value* A<T>::getValue<S>(const A<T>&a)");
dumpDecl("func()");
dumpDecl("friend void bla<>()");
dumpDecl("name< T > :: operator () (int bla)");
dumpDecl("name< T > :: operator << (int bla)");
dumpDecl("name< T > :: operator << <> (int bla)");
dumpDecl("className::func()");
dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
}
#endif
#define yy_create_buffer defargsYY_create_buffer
#define yy_delete_buffer defargsYY_delete_buffer
#define yy_scan_buffer defargsYY_scan_buffer
#define yy_scan_string defargsYY_scan_string
#define yy_scan_bytes defargsYY_scan_bytes
#define yy_flex_debug defargsYY_flex_debug
#define yy_init_buffer defargsYY_init_buffer
#define yy_flush_buffer defargsYY_flush_buffer
#define yy_load_buffer_state defargsYY_load_buffer_state
#define yy_switch_to_buffer defargsYY_switch_to_buffer
#define yyin defargsYYin
#define yyleng defargsYYleng
#define yylex defargsYYlex
#define yyout defargsYYout
#define yyrestart defargsYYrestart
#define yytext defargsYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define YY_USES_REJECT
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 32
#define YY_END_OF_BUFFER 33
static yyconst short int yy_acclist[132] =
{ 0,
2, 2, 33, 31, 32, 32, 1, 31, 32, 25,
31, 32, 20, 25, 31, 32, 25, 31, 32, 27,
31, 32, 13, 27, 31, 32, 14, 27, 31, 32,
26, 27, 31, 32, 15, 27, 31, 32, 16, 27,
31, 32, 18, 27, 31, 32, 17, 27, 31, 32,
24, 31, 32, 2, 24, 31, 32, 12, 24, 31,
32, 22, 24, 31, 32, 12, 24, 31, 32, 21,
24, 31, 32, 23, 24, 31, 32, 24, 31, 32,
7, 25, 31, 32, 25, 31, 32, 12, 25, 31,
32, 22, 25, 31, 32, 11, 24, 31, 32, 9,
23, 24, 31, 32, 31, 32, 31, 32, 31, 32,
19, 26, 2,16392, 23, 3, 10, 9, 23, 30,
16392, 8200, 6, 6, 8200, 5, 4, 5, 4, 28,
29
} ;
static yyconst short int yy_accept[100] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
3, 3, 3, 4, 6, 7, 10, 13, 17, 20,
23, 27, 31, 35, 39, 43, 47, 51, 54, 58,
62, 66, 70, 74, 78, 81, 85, 88, 92, 96,
100, 105, 107, 109, 111, 112, 113, 114, 114, 114,
115, 116, 116, 117, 117, 117, 117, 118, 120, 120,
121, 121, 121, 121, 121, 121, 122, 123, 124, 124,
125, 125, 125, 125, 125, 126, 127, 129, 129, 129,
129, 130, 130, 131, 131, 131, 131, 132, 132
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 4, 1, 1, 1, 5, 6, 7,
8, 5, 1, 9, 1, 1, 1, 10, 11, 11,
11, 11, 11, 11, 11, 12, 12, 13, 1, 14,
15, 16, 1, 1, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
18, 19, 20, 1, 17, 1, 21, 17, 22, 17,
23, 17, 17, 17, 24, 17, 17, 25, 17, 26,
27, 17, 17, 17, 28, 29, 17, 30, 17, 17,
17, 17, 31, 1, 32, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[33] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 3, 1, 4,
4, 4, 3, 1, 1, 1, 4, 1, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1, 1
} ;
static yyconst short int yy_base[109] =
{ 0,
166, 165, 0, 1, 2, 6, 25, 0, 0, 0,
51, 77, 55, 61, 109, 0, 139, 0, 170, 0,
57, 58, 167, 292, 292, 292, 292, 292, 0, 292,
292, 292, 0, 292, 292, 292, 292, 292, 164, 11,
292, 292, 292, 0, 145, 292, 145, 292, 292, 10,
0, 9, 136, 135, 292, 0, 159, 62, 69, 201,
0, 140, 292, 153, 12, 74, 292, 0, 68, 292,
132, 132, 64, 143, 92, 149, 231, 292, 146, 145,
89, 122, 128, 96, 0, 292, 292, 96, 115, 79,
292, 98, 292, 79, 71, 67, 292, 292, 263, 267,
271, 85, 275, 20, 279, 283, 16, 287
} ;
static yyconst short int yy_def[109] =
{ 0,
99, 99, 99, 99, 100, 100, 98, 7, 7, 7,
7, 7, 7, 7, 98, 15, 100, 17, 98, 19,
99, 99, 98, 98, 98, 98, 98, 98, 101, 98,
98, 98, 102, 98, 98, 98, 98, 98, 98, 103,
98, 98, 98, 104, 105, 98, 106, 98, 98, 98,
107, 98, 98, 98, 98, 102, 98, 103, 103, 103,
104, 105, 98, 98, 108, 98, 98, 107, 98, 98,
98, 98, 103, 98, 103, 60, 98, 98, 98, 98,
98, 98, 98, 103, 77, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 0, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98
} ;
static yyconst short int yy_nxt[325] =
{ 0,
98, 98, 25, 25, 25, 28, 26, 26, 25, 28,
69, 66, 59, 26, 26, 60, 67, 80, 70, 68,
29, 81, 81, 61, 29, 30, 30, 25, 30, 30,
30, 31, 32, 30, 30, 30, 30, 30, 30, 30,
30, 33, 30, 30, 30, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 30, 30, 30, 30, 25,
25, 30, 30, 73, 34, 73, 35, 30, 30, 69,
75, 52, 52, 60, 74, 66, 74, 70, 53, 53,
67, 74, 36, 30, 30, 37, 54, 54, 56, 97,
34, 37, 35, 75, 87, 96, 60, 59, 88, 88,
60, 91, 95, 91, 74, 92, 92, 94, 36, 38,
39, 25, 38, 38, 38, 40, 41, 41, 38, 38,
38, 38, 42, 43, 41, 44, 45, 38, 38, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 42,
38, 25, 46, 93, 47, 48, 49, 49, 90, 89,
86, 86, 48, 58, 49, 84, 83, 82, 78, 63,
57, 72, 71, 65, 63, 57, 98, 25, 25, 48,
38, 38, 25, 38, 38, 38, 38, 50, 38, 38,
38, 38, 38, 38, 38, 38, 51, 38, 38, 38,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
38, 38, 76, 98, 98, 60, 98, 98, 98, 98,
98, 98, 98, 74, 98, 98, 98, 77, 98, 98,
98, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 58, 73, 58, 58, 58, 58, 58, 98, 58,
85, 85, 85, 74, 58, 58, 58, 85, 58, 58,
58, 85, 85, 85, 85, 85, 85, 85, 85, 85,
85, 58, 58, 24, 24, 24, 24, 27, 27, 27,
27, 55, 98, 55, 55, 58, 58, 98, 58, 62,
62, 62, 62, 64, 98, 64, 64, 79, 98, 79,
79, 23, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98
} ;
static yyconst short int yy_chk[325] =
{ 0,
0, 0, 3, 4, 5, 5, 3, 4, 6, 6,
52, 50, 40, 3, 4, 40, 50, 65, 52, 107,
5, 65, 65, 104, 6, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 11, 11, 21,
22, 13, 13, 58, 11, 73, 11, 14, 14, 69,
59, 21, 22, 59, 58, 66, 73, 69, 21, 22,
66, 59, 11, 12, 12, 13, 21, 22, 102, 96,
12, 14, 12, 75, 81, 95, 75, 84, 81, 81,
84, 88, 94, 92, 75, 88, 88, 90, 12, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 17, 17, 89, 17, 17, 17, 17, 83, 82,
80, 79, 17, 76, 17, 74, 72, 71, 64, 62,
57, 54, 53, 47, 45, 39, 23, 2, 1, 17,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 60, 0, 0, 60, 0, 0, 0, 0,
0, 0, 0, 60, 0, 0, 0, 60, 0, 0,
0, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 77, 77, 77, 77, 77, 77, 77, 0, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 99, 99, 99, 99, 100, 100, 100,
100, 101, 0, 101, 101, 103, 103, 0, 103, 105,
105, 105, 105, 106, 0, 106, 106, 108, 0, 108,
108, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 98, 98, 98
} ;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
yy_state_ptr = yy_full_state; /* restore orig. state */ \
yy_current_state = *yy_state_ptr; /* restore curr. state */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "defargs.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "defargs.l"
/*
* includes
*/
#include "qtbc.h"
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include "defargs.h"
#include "entry.h"
#include "util.h"
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
*
* statics
*/
static const char *inputString;
static int inputPosition;
static ArgumentList *argList;
static QCString *copyArgValue;
static QCString curArgTypeName;
static QCString curArgDefValue;
static QCString curArgName;
static QCString curArgAttrib;
static int argRoundCount;
static int argSharpCount;
static int argCurlyCount;
static int readArgContext;
/* -----------------------------------------------------------------
*/
#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++] ;
c++; buf++;
}
return c;
}
#define Start 1
#define CopyArgString 2
#define CopyArgRound 3
#define CopyArgRound2 4
#define CopyArgSharp 5
#define CopyArgCurly 6
#define ReadFuncArgType 7
#define ReadFuncArgDef 8
#define ReadFuncArgPtr 9
#define FuncQual 10
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 91 "defargs.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 99 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
++yy_cp;
}
while ( yy_base[yy_current_state] != 292 );
yy_find_action:
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
{
yy_act = yy_acclist[yy_lp];
if ( yy_act & YY_TRAILING_HEAD_MASK ||
yy_looking_for_trail_begin )
{
if ( yy_act == yy_looking_for_trail_begin )
{
yy_looking_for_trail_begin = 0;
yy_act &= ~YY_TRAILING_HEAD_MASK;
break;
}
}
else if ( yy_act & YY_TRAILING_MASK )
{
yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
}
else
{
yy_full_match = yy_cp;
yy_full_state = yy_state_ptr;
yy_full_lp = yy_lp;
break;
}
++yy_lp;
goto find_rule;
}
--yy_cp;
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 93 "defargs.l"
{ BEGIN(ReadFuncArgType); }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 95 "defargs.l"
{
curArgTypeName+=" ";
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 98 "defargs.l"
{
if (curArgTypeName.stripWhiteSpace().isEmpty())
curArgAttrib=yytext;
else
curArgTypeName+=yytext;
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 104 "defargs.l"
{ curArgDefValue+=yytext; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 105 "defargs.l"
{ curArgDefValue+=yytext; }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 106 "defargs.l"
{ curArgDefValue+=yytext; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 107 "defargs.l"
{
curArgDefValue+=*yytext;
BEGIN( CopyArgString );
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 111 "defargs.l"
{
// function pointer as argument
curArgTypeName+=yytext;
//curArgTypeName=curArgTypeName.simplifyWhiteSpace();
BEGIN( ReadFuncArgPtr );
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 117 "defargs.l"
{
curArgName=yytext;
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 120 "defargs.l"
{
curArgTypeName+=yytext;
//curArgTypeName=curArgTypeName.simplifyWhiteSpace();
readArgContext = ReadFuncArgType;
copyArgValue=&curArgTypeName;
argRoundCount=0;
BEGIN( CopyArgRound2 );
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 128 "defargs.l"
{ // redundant braces detected / remove them
int i=curArgTypeName.findRev('('),l=curArgTypeName.length();
if (i!=-1)
curArgTypeName=curArgTypeName.left(i)+
curArgTypeName.right(l-i-1);
curArgTypeName+=curArgName;
BEGIN( ReadFuncArgType );
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 136 "defargs.l"
{
if (YY_START==ReadFuncArgType)
{
curArgTypeName+=*yytext;
copyArgValue=&curArgTypeName;
}
else // YY_START==ReadFuncArgDef
{
curArgDefValue+=*yytext;
copyArgValue=&curArgDefValue;
}
readArgContext = YY_START;
if (*yytext=='(')
{
argRoundCount=0;
BEGIN( CopyArgRound );
}
else if (*yytext=='{')
{
argCurlyCount=0;
BEGIN( CopyArgCurly );
}
else // yytext=='<'
{
argSharpCount=0;
BEGIN( CopyArgSharp );
}
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 164 "defargs.l"
{
argRoundCount++;
*copyArgValue += *yytext;
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 168 "defargs.l"
{
*copyArgValue += *yytext;
if (argRoundCount>0)
{
argRoundCount--;
}
else
{
if (YY_START==CopyArgRound2)
{
*copyArgValue+=" "+curArgName;
}
BEGIN( readArgContext );
}
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 183 "defargs.l"
{
argSharpCount++;
*copyArgValue += *yytext;
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 187 "defargs.l"
{
*copyArgValue += *yytext;
if (argSharpCount>0) argSharpCount--;
else BEGIN( readArgContext );
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 192 "defargs.l"
{
argCurlyCount++;
*copyArgValue += *yytext;
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 196 "defargs.l"
{
*copyArgValue += *yytext;
if (argCurlyCount>0) argCurlyCount--;
else BEGIN( readArgContext );
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 201 "defargs.l"
{
curArgDefValue+=yytext;
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 204 "defargs.l"
{
curArgDefValue+=*yytext;
BEGIN( ReadFuncArgDef );
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 208 "defargs.l"
{
BEGIN( ReadFuncArgDef );
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 211 "defargs.l"
{
curArgTypeName=removeRedundantWhiteSpace(
curArgTypeName.simplifyWhiteSpace());
curArgDefValue=curArgDefValue.stripWhiteSpace();
int l=curArgTypeName.length();
if (l>0)
{
int i=l-1;
while (i>=0 &&
(
isspace(curArgTypeName.at(i)) ||
isId(curArgTypeName.at(i))
)
) i--;
Argument *a = new Argument;
a->attrib = curArgAttrib.copy();
if (i>=0 && curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = curArgTypeName.left(i+1).stripWhiteSpace();
a->name = curArgTypeName.right(curArgTypeName.length()-i-1);
}
else // assume only the type was specified, try to determine name later
{
a->type = curArgTypeName.stripWhiteSpace();
}
a->defval = curArgDefValue.copy();
//printf("----> Adding argument `%s' `%s' `%s'\n",a->type.data(),a->name.data(),a->defval.data());
argList->append(a);
}
curArgAttrib.resize(0);
curArgTypeName.resize(0);
curArgDefValue.resize(0);
if (*yytext==')')
{
BEGIN(FuncQual);
//printf(">>> end of argument list\n");
}
else
{
BEGIN( ReadFuncArgType );
}
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 253 "defargs.l"
{
QCString name=yytext; //resolveDefines(yytext);
//printf("resolveName `%s'->`%s'\n",yytext,name.data());
curArgTypeName+=name;
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 258 "defargs.l"
{
curArgTypeName+=*yytext;
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 261 "defargs.l"
{
curArgDefValue+=*yytext;
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 264 "defargs.l"
{
QCString name=yytext; //resolveDefines(yytext);
*copyArgValue+=name;
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 268 "defargs.l"
{
*copyArgValue += *yytext;
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 271 "defargs.l"
{
argList->constSpecifier=TRUE;
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 274 "defargs.l"
{
argList->volatileSpecifier=TRUE;
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 277 "defargs.l"
{
argList->pureSpecifier=TRUE;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 280 "defargs.l"
YY_BREAK
case 32:
YY_RULE_SETUP
#line 282 "defargs.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(CopyArgString):
case YY_STATE_EOF(CopyArgRound):
case YY_STATE_EOF(CopyArgRound2):
case YY_STATE_EOF(CopyArgSharp):
case YY_STATE_EOF(CopyArgCurly):
case YY_STATE_EOF(ReadFuncArgType):
case YY_STATE_EOF(ReadFuncArgDef):
case YY_STATE_EOF(ReadFuncArgPtr):
case YY_STATE_EOF(FuncQual):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 99 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 99 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 98);
if ( ! yy_is_jam )
*yy_state_ptr++ = yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 282 "defargs.l"
/* ----------------------------------------------------------------------------
*/
// converts an argument string into a list of Arguments.
// an Argument consists of a type, an optional name, and an optional
// default initializer.
void stringToArgumentList(const char *argsString,ArgumentList* &al)
{
//if (al==0) al=new ArgumentList; // allocate new list if needed.
if (al==0) return;
if (!argsString) return;
inputString = argsString;
inputPosition = 0;
curArgTypeName.resize(0);
curArgDefValue.resize(0);
curArgName.resize(0);
argList = al;
defargsYYrestart( defargsYYin );
BEGIN( Start );
defargsYYlex();
}
extern "C" { // some bogus code to keep the compiler happy
// int defargsYYwrap() { return 1 ; }
void defargsYYdummy() { yy_flex_realloc(0,0); }
}
......@@ -16,12 +16,17 @@
#include "qtbc.h"
#include <ctype.h>
#include "config.h"
#include "definition.h"
#include "doxygen.h"
#include "language.h"
#include "message.h"
#include "outputlist.h"
#include "scanner.h"
Definition::Definition(const char *name,const char *b,const char *d)
{
n=name; brief=b; doc=d; sectionList=0;
n=name; brief=b; doc=d; sectionList=0, bodyLine=-1, bodyDef=0;
}
Definition::~Definition()
......@@ -87,3 +92,103 @@ void Definition::setBriefDescription(const char *b)
}
}
}
/*! Write a reference to the source code defining this definition */
void Definition::writeSourceRef(OutputList &ol)
{
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
if (Config::sourceBrowseFlag && bodyLine!=-1 && bodyDef)
{
ol.newParagraph();
QCString refText = theTranslator->trDefinedAtLineInSourceFile();
int lineMarkerPos = refText.find("@0");
int fileMarkerPos = refText.find("@1");
if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this.
{
QString lineStr,anchorStr;
lineStr.sprintf("%d",bodyLine);
anchorStr.sprintf("l%05d",bodyLine);
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
parseText(ol,refText.left(lineMarkerPos));
ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only)
ol.writeObjectLink(0,bodyDef->sourceName(),
anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
// write normal text (Latex/Man only)
ol.docify(lineStr);
ol.enableAll();
// write text between markers
parseText(ol,refText.mid(lineMarkerPos+2,
fileMarkerPos-lineMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html);
// write file link (HTML only)
ol.writeObjectLink(0,bodyDef->sourceName(),
0,bodyDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
// write normal text (Latex/Man only)
ol.docify(bodyDef->name());
ol.enableAll();
// write text right from file marker
parseText(ol,refText.right(
refText.length()-fileMarkerPos-2));
}
else // file marker before line marker
{
// write text left from file marker
parseText(ol,refText.left(fileMarkerPos));
ol.disableAllBut(OutputGenerator::Html);
// write file link (HTML only)
ol.writeObjectLink(0,bodyDef->sourceName(),
0,bodyDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
// write normal text (Latex/Man only)
ol.docify(bodyDef->name());
ol.enableAll();
// write text between markers
parseText(ol,refText.mid(fileMarkerPos+2,
lineMarkerPos-fileMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only)
ol.writeObjectLink(0,bodyDef->sourceName(),
anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
// write normal text (Latex/Man only)
ol.docify(lineStr);
ol.enableAll();
// write text right from linePos marker
parseText(ol,refText.right(
refText.length()-lineMarkerPos-2));
}
}
else
{
err("Error: translation error: invalid markers in trDefinedInSourceFile()\n");
}
}
}
bool Definition::hasDocumentation()
{
return !doc.isNull() || // has detailed docs
!brief.isNull() || // has brief description
(Config::sourceBrowseFlag &&
bodyLine!=-1 &&
bodyDef
) || // has a source reference
Config::extractAllFlag; // extract everything
}
......@@ -19,8 +19,10 @@
#include "qtbc.h"
#include <qlist.h>
#include "config.h"
#include "section.h"
class FileDef;
class OutputList;
class SectionList;
/*! The common base class of all definitions. */
class Definition
......@@ -36,6 +38,8 @@ class Definition
* definition.
*/
virtual QCString getOutputFileBase() const = 0;
/*! Returns the name of the source listing of this file. */
QCString sourceName() const { return getOutputFileBase()+"-source"; }
/*! returns the detailed description of this definition */
QCString documentation() const { return doc; }
/*! returns the brief description of this definition */
......@@ -52,9 +56,7 @@ class Definition
*/
void setBriefDescription(const char *b);
/*! returns TRUE iff the definition is documented */
virtual bool hasDocumentation()
{ return !doc.isNull() || !brief.isNull() || Config::extractAllFlag; }
virtual bool hasDocumentation();
virtual bool isLinkableInProject() = 0;
virtual bool isLinkable() = 0;
......@@ -75,6 +77,15 @@ class Definition
*/
void addSectionsToDefinition(QList<QCString> *anchorList);
void setBodyLine(int bl) { bodyLine=bl; }
void setBodyDef(FileDef *fd) { bodyDef=fd; }
int getBodyLine() const { return bodyLine; }
FileDef *getBodyDef() { return bodyDef; }
void writeSourceRef(OutputList &ol);
protected:
int bodyLine; // line number of the definition
FileDef *bodyDef; // file definition containing the function body
private:
QCString n; // name of the definition
QCString brief; // brief description
......
......@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <qlist.h>
#include <qarray.h>
#include <qtstream.h>
#include <qtextstream.h>
#include <qfile.h>
#include "diagram.h"
......@@ -155,7 +155,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h)
t << "href=\"" << cd->getOutputFileBase() << ".html\" ";
t << "ALT=\"" << cd->name();
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
t << x+w << "," << y+h << "\">" << endl;
t << (x+w) << "," << (y+h) << "\">" << endl;
}
}
//-----------------------------------------------------------------------------
......@@ -620,13 +620,13 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
t << protToString(di->protection()) << endl;
if (doBase)
{
t << "1 " << di->xPos()/(float)gridWidth << " "
<< di->yPos()/(float)gridHeight+superRows-1 << " in\n";
t << "1 " << (di->xPos()/(float)gridWidth) << " "
<< (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
}
else
{
t << "0 " << di->xPos()/(float)gridWidth << " "
<< (float)superRows-0.25-di->yPos()/(float)gridHeight
t << "0 " << (di->xPos()/(float)gridWidth) << " "
<< ((float)superRows-0.25-di->yPos()/(float)gridHeight)
<< " in\n";
}
}
......@@ -740,7 +740,7 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
}
else
{
t << xf << " " << ysf + 0.25 << " " << yf << " vedge\n";
t << xf << " " << (ysf + 0.25) << " " << yf << " vedge\n";
}
}
}
......@@ -787,12 +787,12 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
if (doBase)
{
t << "1 " << di->xPos()/(float)gridWidth << " "
<< di->yPos()/(float)gridHeight+superRows-1 << " in\n";
<< (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
}
else
{
t << "0 " << di->xPos()/(float)gridWidth << " "
<< (float)superRows-0.25-di->yPos()/(float)gridHeight
<< ((float)superRows-0.25-di->yPos()/(float)gridHeight)
<< " in\n";
}
}
......@@ -827,12 +827,12 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
if (doBase)
{
t << "0 " << di->xPos()/(float)gridWidth << " "
<< di->yPos()/(float)gridHeight+superRows-1 << " out\n";
<< (di->yPos()/(float)gridHeight+superRows-1) << " out\n";
}
else
{
t << "1 " << di->xPos()/(float)gridWidth << " "
<< (float)superRows-1.75-di->yPos()/(float)gridHeight
<< ((float)superRows-1.75-di->yPos()/(float)gridHeight)
<< " out\n";
}
}
......@@ -863,14 +863,14 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
{
t << first->xPos()/(float)gridWidth << " "
<< last->xPos()/(float)gridWidth << " "
<< first->yPos()/(float)gridHeight+superRows-1
<< (first->yPos()/(float)gridHeight+superRows-1)
<< " conn\n";
}
else
{
t << first->xPos()/(float)gridWidth << " "
<< last->xPos()/(float)gridWidth << " "
<< (float)superRows-first->yPos()/(float)gridHeight
<< ((float)superRows-first->yPos()/(float)gridHeight)
<< " conn\n";
}
}
......
......@@ -16,7 +16,7 @@
*/
#include "qtbc.h"
#include <qfileinf.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qdir.h>
#include <qdict.h>
......@@ -50,7 +50,7 @@
#include "htmlhelp.h"
#include "defargs.h"
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
#endif
......@@ -81,6 +81,7 @@ FileNameDict inputNameDict(1009); // dictionary of sections
StringDict excludeNameDict(1009); // dictionary of sections
FileNameDict includeNameDict(1009); // dictionary of include names
FileNameDict exampleNameDict(1009); // dictionary of examples
FileNameDict imageNameDict(257); // dictionary of images
FileDict includeDict(1009); // dictionary of include files
DefineDict defineDict(10007); // dictionary of all defines
StringDict typedefDict(1009); // dictionary of all typedefs
......@@ -114,6 +115,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
bool over_load);
const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
QCString spaces;
//----------------------------------------------------------------------
// Returns the standard string that is generated when the \overload
......@@ -149,7 +151,7 @@ void buildGroupList(Entry *root)
gd->setBriefDescription(root->brief);
gd->setDocumentation(root->doc);
gd->addSectionsToDefinition(root->anchors);
groupList.inSort(gd);
groupList.append(gd);
groupDict.insert(root->name,gd);
}
}
......@@ -232,11 +234,12 @@ void buildFileList(Entry *root)
}
else
{
const char *fn = root->fileName.data();
warn("Warning: the name `%s' supplied as "
"the second argument in the \\file statement in file "
"%s at line %d ",
root->name.data(),
root->fileName.data(),
fn ? fn : "???",
root->startLine);
if (ambig) // name is ambigious
{
......@@ -409,28 +412,46 @@ void buildClassList(Entry *root)
//printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
cd->setTemplateArguments(root->tArgList);
}
if (root->doc.length()>0 || root->brief.length()>0) // block contains docs
if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
(root->bodyLine!=-1 && Config::sourceBrowseFlag)
)
// block contains something that ends up in the docs
{
if (cd->documentation()) // class already documented
if (!root->doc.isEmpty() && !cd->documentation().isEmpty())
{
warn("Warning: class %s already documented\n"
" skipping documentation in file %s at line %d\n",
warn("Warning: class %s already has a detailed description\n"
" skipping the one in file %s at line %d\n",
fullName.data(),root->fileName.data(),root->startLine);
}
else // class not documented, use docs in block
else if (!root->doc.isEmpty())
{
cd->setDocumentation(root->doc);
}
if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty())
{
warn("Warning: class %s already has a brief description\n"
" skipping the one in file %s at line %d\n",
fullName.data(),root->fileName.data(),root->startLine);
}
else if (!root->brief.isEmpty())
{
cd->setBriefDescription(root->brief);
cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs
}
if (root->bodyLine!=-1 && cd->getBodyLine()==-1)
{
cd->setBodyLine(root->bodyLine);
cd->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
}
cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs
}
if (cd->includeFile()==0)
if (cd->includeFile()==0 &&
(!root->doc.isEmpty() || !root->brief.isEmpty())
)
{
addIncludeFile(cd,
findFileDef(&inputNameDict,root->fileName,ambig),
root
);
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
cd->setFileDef(fd);
addIncludeFile(cd,fd,root);
}
addNamespace(root,cd);
}
......@@ -456,6 +477,10 @@ void buildClassList(Entry *root)
cd->setTemplateArguments(root->tArgList);
cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors);
// file definition containing the class cd
FileDef *ifd=findFileDef(&inputNameDict,root->fileName,ambig);
cd->setBodyLine(root->bodyLine);
cd->setBodyDef(ifd);
QListIterator<QCString> sli(*root->groups);
QCString *s;
......@@ -471,10 +496,10 @@ void buildClassList(Entry *root)
bool found=addNamespace(root,cd);
// file definition containing the class cd
FileDef *ifd=findFileDef(&inputNameDict,root->fileName,ambig);
addIncludeFile(cd,ifd,root);
cd->setFileDef(ifd);
if (!root->doc.isEmpty() || !root->brief.isEmpty())
addIncludeFile(cd,ifd,root);
// if the class is not in a namespace then we insert
// it in the file definition
......@@ -594,6 +619,78 @@ void buildNamespaceList(Entry *root)
}
}
void findUsingDirectives(Entry *root)
{
if (root->section==Entry::USINGDIR_SEC)
{
//printf("Found using directive %s at line %d of %s\n",
// root->name.data(),root->startLine,root->fileName.data());
bool ambig;
if (!root->name.isEmpty())
{
NamespaceDef *usingNd = 0;
NamespaceDef *nd = 0;
FileDef *fd = findFileDef(&inputNameDict,root->fileName,ambig);
QCString nsName;
// see if the using statement was found inside a namespace or inside
// the global file scope.
if (root->parent->section == Entry::NAMESPACE_SEC)
{
nsName=root->parent->name.copy();
if (!nsName.isEmpty())
{
nd = namespaceDict[nsName];
}
}
// find the scope in which the `using' namespace is defined by prepending
// the possible scopes in which the using statement was found, starting
// with the most inner scope and going to the most outer scope (i.e.
// file scope).
int scopeOffset = nsName.length();
do
{
QCString scope=scopeOffset>0 ?
nsName.left(scopeOffset)+"::" : QCString();
//printf("Trying with scope=`%s'\n",scope.data());
usingNd = namespaceDict[scope+root->name];
if (scopeOffset==0)
{
scopeOffset=-1;
}
else if ((scopeOffset=nsName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
} while (scopeOffset>=0 && usingNd==0);
//printf("%s -> %p\n",root->name.data(),usingNd);
// add the namespace the correct scope
if (usingNd)
{
if (nd)
{
//printf("Inside namespace %s\n",nd->name().data());
nd->addUsingDirective(usingNd);
}
else if (fd)
{
//printf("Inside file %s\n",fd->name().data());
fd->addUsingDirective(usingNd);
}
}
}
}
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
{
findUsingDirectives(e);
}
}
//----------------------------------------------------------------------
static MemberDef *addVariableToClass(Entry *root,ClassDef *cd,
......@@ -665,6 +762,9 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd,
md->setFromAnnonymousScope(fromAnnScope);
md->setFromAnnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth);
md->setBodyLine(root->bodyLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
// add the member to the global list
if (mn)
......@@ -715,6 +815,10 @@ static MemberDef *addVariableToFile(Entry *root,MemberDef::MemberType mtype,
md->setFromAnnonymousScope(fromAnnScope);
md->setFromAnnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth);
md->setBodyLine(root->bodyLine);
bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
// see if the function is inside a namespace
NamespaceDef *nd = 0;
......@@ -730,11 +834,7 @@ static MemberDef *addVariableToFile(Entry *root,MemberDef::MemberType mtype,
else
{
// find file definition
FileDef *fd=0;
bool ambig;
if (root->fileName.length()>0 &&
(fd=findFileDef(&inputNameDict,root->fileName,ambig))
)
if (fd)
{
fd->insertMember(md);
md->setFileDef(fd);
......@@ -810,10 +910,11 @@ void buildVarList(Entry *root)
{
Debug::print(Debug::Variables,0,
"VARIABLE_SEC: \n"
" type=`%s' name=`%s' args=`%s'\n",
" type=`%s' name=`%s' args=`%s' bodyLine=`%d'\n",
root->type.data(),
root->name.data(),
root->args.data()
root->args.data(),
root->bodyLine
);
//printf("root->parent->name=%s\n",root->parent->name.data());
......@@ -978,13 +1079,15 @@ void buildMemberList(Entry *root)
{
Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' #targs=%d #mtargs=%d mGrpId=%d\n",
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #targs=%d #mtargs=%d mGrpId=%d\n",
root->type.data(),
root->parent->name.data(),
root->name.data(),
root->args.data(),
root->relates.data(),
root->fileName.data(),
root->startLine,
root->bodyLine,
root->tArgList ? (int)root->tArgList->count() : -1,
root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId
......@@ -1053,9 +1156,12 @@ void buildMemberList(Entry *root)
md->setDefLine(root->startLine);
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->setBody(root->body);
//md->setBody(root->body);
md->setBodyLine(root->bodyLine);
md->setGroupId(root->mGrpId);
md->setInline(root->inLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
//md->setScopeTemplateArguments(root->tArgList);
md->addSectionsToDefinition(root->anchors);
QCString def;
......@@ -1167,7 +1273,6 @@ void buildMemberList(Entry *root)
{
if (md->getFileDef() &&
md->getFileDef()->absFilePath()==root->fileName &&
/*matchArguments(md->argsString(),root->args)*/
matchArguments(md->argumentList(),root->argList)
)
{
......@@ -1182,6 +1287,12 @@ void buildMemberList(Entry *root)
{
md->setBriefDescription(root->brief);
}
if (md->getBodyLine()==-1 && root->bodyLine!=-1)
{
md->setBodyLine(root->bodyLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
}
md->addSectionsToDefinition(root->anchors);
}
md=mn->next();
......@@ -1189,8 +1300,8 @@ void buildMemberList(Entry *root)
}
if (!found) /* global function is unique with respect to the file */
{
//printf("New function type=`%s' name=`%s' args=`%s'\n",
// root->type.data(),root->name.data(),root->args.data());
//printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n",
// root->type.data(),root->name.data(),root->args.data(),root->bodyLine);
// new global function
QCString name=removeRedundantWhiteSpace(root->name);
......@@ -1202,7 +1313,11 @@ void buildMemberList(Entry *root)
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->setPrototype(root->proto);
md->setBody(root->body);
//md->setBody(root->body);
md->setBodyLine(root->bodyLine);
bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
md->addSectionsToDefinition(root->anchors);
md->setGroupId(root->mGrpId);
md->setInline(root->inLine);
......@@ -1257,11 +1372,12 @@ void buildMemberList(Entry *root)
else
{
// find file definition
FileDef *fd=0;
bool ambig;
if (root->fileName.length()>0 &&
(fd=findFileDef(&inputNameDict,root->fileName,ambig))
)
//FileDef *fd=0;
//bool ambig;
//if (root->fileName.length()>0 &&
// (fd=findFileDef(&inputNameDict,root->fileName,ambig))
// )
if (fd)
{
// add member to the file
fd->insertMember(md);
......@@ -1341,7 +1457,6 @@ void findFriends()
) // if the member is related and the arguments match then the
// function is actually a friend.
{
//printf("Found friend function\n");
mergeArguments(mmd->argumentList(),fmd->argumentList());
if (fmd->documentation())
mmd->setDocumentation(fmd->documentation());
......@@ -1351,6 +1466,10 @@ void findFriends()
mmd->setBriefDescription(fmd->briefDescription());
else if (mmd->briefDescription() && !fmd->briefDescription())
fmd->setBriefDescription(mmd->briefDescription());
if (mmd->getBodyLine()==-1 && fmd->getBodyLine()!=-1)
mmd->setBodyLine(fmd->getBodyLine());
else if (mmd->getBodyLine()!=-1 && fmd->getBodyLine()==-1)
fmd->setBodyLine(mmd->getBodyLine());
}
}
}
......@@ -1399,6 +1518,16 @@ void transferFunctionDocumentation()
{
mdef->setDocumentation(mdec->documentation());
}
if (mdec->getBodyLine()!=-1 && mdef->getBodyLine()==-1)
{
mdef->setBodyLine(mdec->getBodyLine());
mdef->setBodyDef(mdec->getFileDef());
}
else if (mdef->getBodyLine()!=-1 && mdec->getBodyLine()==-1)
{
mdec->setBodyLine(mdef->getBodyLine());
mdec->setBodyDef(mdef->getFileDef());
}
}
}
}
......@@ -1451,7 +1580,7 @@ void computeClassRelations(Entry *root)
QCString cName=removeRedundantWhiteSpace(scopePrefix+bi->name);
//printf("Base class %s\n",cName.data());
ClassDef *baseClass=getClass(cName);
if (baseClass) // base class is documented
if (baseClass && cName!=cd->name()) // base class is documented
{
//printf("Adding!\n");
// add base class to this class
......@@ -1486,7 +1615,7 @@ void computeClassRelations(Entry *root)
// );
int i;
QCString templSpec;
if (!baseClass && (i=baseClassName.find('<'))!=-1)
if (baseClass==0 && (i=baseClassName.find('<'))!=-1)
// base class has template specifiers
{
// TODO: here we should try to find the correct template specialization
......@@ -1495,42 +1624,64 @@ void computeClassRelations(Entry *root)
baseClass=getClass(baseClassName);
templSpec=bi->name.right(bi->name.length()-i);
}
if (baseClass) // base class is documented
bool found=baseClass!=0;
NamespaceDef *nd=cd->getNamespace();
if (!found)
{
FileDef *fd=cd->getFileDef();
if (fd)
{
// look for the using statement in this file in which the
// class was found
NamespaceList *nl = fd->getUsedNamespaces();
if (nl) // try to prepend any of the using namespace scopes.
{
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{
found = (baseClass=getClass(nd->name()+"::"+baseClassName));
}
}
}
if (!found && nd) // class is inside a namespace
{
NamespaceList *nl = nd->getUsedNamespaces();
found = (baseClass=getClass(nd->name()+"::"+baseClassName));
if (nl) // try to prepend any of the using namespace scopes.
{
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{
found = (baseClass=getClass(nd->name()+"::"+baseClassName));
}
}
}
}
if (found)
{
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
}
else // base class not documented
else
{
NamespaceDef *nd=cd->getNamespace();
//printf("Found undocumented base class `%s' namespace scope=`%s'\n",
// bi->name.data(),nd ? nd->name().data() : "<none>");
if (nd && (baseClass=getClass(nd->name()+"::"+baseClassName)))
// class is defined inside namespace
{
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
}
else // undocumented base class
{
//printf(">>> Undocumented base class = %s\n",bi->name.data());
baseClass=new ClassDef(baseClassName,ClassDef::Class);
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
// add class to the list
classList.inSort(baseClass);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(bi->name,baseClass);
}
//printf(">>> Undocumented base class = %s\n",bi->name.data());
baseClass=new ClassDef(baseClassName,ClassDef::Class);
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
// add class to the list
classList.inSort(baseClass);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(bi->name,baseClass);
}
bi=baseList->next();
}
......@@ -1655,9 +1806,16 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
md->setBriefDescription(root->brief);
}
if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
//if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
//{
// md->setBody(root->body);
//}
if (md->getBodyLine()==-1 && root->bodyLine!=-1)
{
md->setBody(root->body);
md->setBodyLine(root->bodyLine);
bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
}
}
md->setDefFile(root->fileName);
......@@ -1683,35 +1841,106 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
}
}
//----------------------------------------------------------------------
static QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
{
QCString result=scope.copy();
if (!templ.isEmpty() && scope.find('<')==-1)
{
int si,pi=0;
while ((si=scope.find("::",pi))!=-1 && !getClass(scope.left(si)+templ)
&& !getClass(scope.left(si)))
{ //printf("Tried `%s'\n",(scope.left(si)+templ).data());
pi=si+2;
}
if (si==-1) // not nested => append template specifier
{
result+=templ;
}
else // nested => insert template specifier before after first class name
{
result=scope.left(si) + templ + scope.right(scope.length()-si);
}
}
//printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n",
// scope.data(),templ.data(),result.data());
return result;
}
//----------------------------------------------------------------------
// find a class definition given the scope name and (optionally) a
// template list specifier
static ClassDef *findClassDefinition(const char *scopeName,const char *classTempList)
{
ClassDef *tcd=0;
if (classTempList) // try to find the correct specialization
{
tcd=getClass(
insertTemplateSpecifierInScope(
scopeName,
classTempList
)
); // try specialization
}
if (tcd==0)
{
tcd=getClass(scopeName); // try general class
}
return tcd;
}
//----------------------------------------------------------------------
// Adds the documentation contained in `root' to a global function
// with name `name' and argument list `args' (for overloading) and
// function declaration `decl' to the corresponding member definition.
bool findUnrelatedFunction(Entry *root,
static bool findUnrelatedFunction(Entry *root,
const QCString &namespaceName,
const char *name,
const char *tempArg,
const char *,
const char *decl)
{
MemberName *mn=0;
QCString n=name;
if (n.length()==0) return FALSE;
if (n.find("::")!=-1) return FALSE; // skip undefined class members
//printf("findUnrelatedFunction(%s)\n",name);
if (n.length()>0 && (mn=functionNameDict[n])) // function name defined
//printf("findUnrelatedFunction(namespace=%s,name=%s,tempArg=%s,decl=%s)\n",
// namespaceName.data(),name,tempArg,decl);
MemberName *mn=functionNameDict[n+tempArg]; // look in function dictionary
if (mn==0)
{
mn=functionNameDict[n]; // try with template arguments
}
if (mn) // function name defined
{
int count=0;
//int count=0;
MemberDef *md=mn->first();
bool found=FALSE;
while (md)
{
bool ambig;
NamespaceDef *nd=md->getNamespace();
QCString nsName = nd ? nd->name().data() : "";
if (namespaceName.length()==0 ||
nsName==namespaceName)
//printf("Namespace %s\n",nd ? nd->name().data() : "<none>");
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
//printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0;
//printf("NamespaceList %p\n",nl);
bool viaUsingDirective = nl && nd && nl->find(nd)!=-1;
if ((namespaceName.length()==0 && nd==0) || // not in a namespace
(nd && nd->name()==namespaceName) || // or in the same namespace
viaUsingDirective // member in `using' namespace
)
{
//printf("Adding docs `%s' to member `%s' in namespace `%s'\n",
// root->doc.data(),md->name().data(),namespaceName.data());
//printf("Searching for match between %s and %s\n",
// argListToString(md->argumentList()).data(),
// argListToString(root->argList).data());
QCString nsName = nd ? nd->name().data() : "";
bool matching=
/*matchArguments(md->argsString(),args);*/
(md->argumentList()==0 && root->argList->count()==0) ||
......@@ -1720,33 +1949,17 @@ bool findUnrelatedFunction(Entry *root,
{
//printf("Match found\n");
addMemberDocs(root,md,decl,FALSE);
count++;
found=TRUE;
}
}
md=mn->next();
}
if (count==0) // more than one match (each member will get the same docs)!
if (!found) // no match
{
warn("Warning: no matching members found for \n%s\n"
warn("Warning: no matching member found for \n%s\n"
"in file %s at line %d\n",
decl,root->fileName.data(),root->startLine);
}
#if 0
else if (count>1) // no match!
{
warn("Warning: multiple matching members for\n%s\n",decl);
if (mn->count()>0) // there is a member with that name
{
warn("Possible candidates are:\n");
MemberDef *md=mn->first();
while (md) // list all possible members with the same name
{
warn(" %s%s\n",md->name(),md->argsString());
md=mn->next();
}
}
}
#endif
}
else // got docs for an undefined member!
{
......@@ -1841,31 +2054,6 @@ void substituteTemplateArgNames(ArgumentList *src,
}
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
{
QCString result=scope.copy();
if (!templ.isEmpty() && scope.find('<')==-1)
{
int si,pi=0;
while ((si=scope.find("::",pi))!=-1 && !getClass(scope.left(si)+templ)
&& !getClass(scope.left(si)))
{ //printf("Tried `%s'\n",(scope.left(si)+templ).data());
pi=si+2;
}
if (si==-1) // not nested => append template specifier
{
result+=templ;
}
else // nested => insert template specifier before after first class name
{
result=scope.left(si) + templ + scope.right(scope.length()-si);
}
}
//printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n",
// scope.data(),templ.data(),result.data());
return result;
}
//----------------------------------------------------------------------
// This function tries to find a member (in a documented class/file/namespace)
// that corresponds to the function declaration given in `funcDecl'.
......@@ -1888,11 +2076,11 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
root->tArgList,tempArgListToString(root->tArgList).data(),
root->scopeSpec.data(),root->memberSpec.data(),root->inLine
);
if (Config::includeSourceFlag && !root->body.isEmpty())
{
//printf("Function: %s\n-----------------\n%s\n------------------\n",
//root->name.data(),root->body.data());
}
//if (Config::includeSourceFlag && !root->body.isEmpty())
//{
// //printf("Function: %s\n-----------------\n%s\n------------------\n",
// //root->name.data(),root->body.data());
//}
QCString scopeName;
QCString className;
......@@ -2181,19 +2369,35 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
ClassDef *cd=md->memberClass();
//printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data());
ClassDef *tcd=0;
if (classTempList.length()>0) // try to find the correct specialization
{
tcd=getClass(
insertTemplateSpecifierInScope(
scopeName,
classTempList
)
); // try specialization
}
tcd = findClassDefinition(scopeName,classTempList);
if (tcd==0)
{
tcd=getClass(scopeName); // try general class
bool ambig;
NamespaceDef *nd = 0;
FileDef *fd = 0;
NamespaceList *nl = 0;
if (namespaceName.length()>0 && (nd=namespaceDict[namespaceName]))
{
nl=nd->getUsedNamespaces();
}
else if ((fd=findFileDef(&inputNameDict,root->fileName,ambig)))
{
nl=fd->getUsedNamespaces();
}
if (nl)
{
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (;(nd=nli.current()) && tcd==0;++nli)
{
//printf("Trying with scope=%s\n",nd->name().data());
tcd = findClassDefinition(nd->name()+"::"+scopeName,classTempList);
}
}
}
if (cd && tcd==cd) // member's classes match
{
Debug::print(Debug::FindMembers,0,
......@@ -2375,7 +2579,11 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
md->setDefLine(root->startLine);
md->setPrototype(root->proto);
md->addSectionsToDefinition(root->anchors);
md->setBody(root->body);
//md->setBody(root->body);
md->setBodyLine(root->bodyLine);
bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
md->setInline(root->inLine);
mn->inSort(md);
cd->insertMember(md);
......@@ -2384,7 +2592,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
}
else // unrelated function with the same name as a member
{
if (!findUnrelatedFunction(root,namespaceName,funcName+funcTempList,funcArgs,funcDecl))
if (!findUnrelatedFunction(root,namespaceName,funcName,funcTempList,funcArgs,funcDecl))
{
warn("Warning: Cannot determine class for function\n%s\n"
"in file %s at line %d\n",fullFuncDecl.data(),
......@@ -2416,9 +2624,11 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
}
if (!newMember && rmd) // member already exists as rmd -> add docs
{
//printf("addMemberDocs for related member %s\n",root->name.data());
addMemberDocs(root,rmd,funcDecl,overloaded);
}
}
if (newMember) // need to create a new member
{
MemberDef::MemberType mtype;
......@@ -2433,16 +2643,55 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
MemberDef *md=new MemberDef(funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,TRUE,
mtype,root->tArgList,root->argList);
//printf("Related member name=`%s' decl=`%s'\n",funcName.data(),funcDecl.data());
//printf("Related member name=`%s' decl=`%s' bodyLine=`%d'\n",
// funcName.data(),funcDecl.data(),root->bodyLine);
// try to find the matching line number of the body from the
// global function list
bool found=FALSE;
if (root->bodyLine==-1)
{
MemberName *rmn=functionNameDict[funcName];
if (rmn)
{
MemberDef *rmd=rmn->first();
while (rmd && !found) // see if we got another member with matching arguments
{
// check for matching argument lists
if (matchArguments(rmd->argumentList(),
root->argList,
className,
namespaceName)
)
{
found=TRUE;
}
if (!found) rmd=rmn->next();
}
if (rmd) // member found -> copy line number info
{
md->setBodyLine(rmd->getBodyLine());
md->setBodyDef(rmd->getBodyDef());
}
}
}
if (!found) // line number could not be found or is available in this
// entry
{
md->setBodyLine(root->bodyLine);
bool ambig;
FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
}
md->setMemberClass(cd);
md->setInline(root->inLine);
md->setDefinition(funcDecl);
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->setDefFile(root->fileName);
md->setDefLine(root->startLine);
md->setPrototype(root->proto);
md->setBody(root->body);
md->setInline(root->inLine);
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->addSectionsToDefinition(root->anchors);
mn->inSort(md);
cd->insertMember(md);
......@@ -2464,7 +2713,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
else // unrelated not overloaded member found
{
if (className.length()==0 &&
!findUnrelatedFunction(root,namespaceName,funcName+funcTempList,funcArgs,funcDecl))
!findUnrelatedFunction(root,namespaceName,funcName,funcTempList,funcArgs,funcDecl))
{
warn("Warning: class for member %s (file %s at line %d) cannot "
"be found\n", funcName.data(),root->fileName.data(),
......@@ -2526,7 +2775,7 @@ void findMemberDocumentation(Entry *root)
else if
(root->section==Entry::FUNCTION_SEC &&
(!root->doc.isEmpty() || !root->brief.isEmpty() ||
!root->body.isEmpty() || root->mGrpId!=-1 /*|| Config::extractAllFlag*/
root->bodyLine!=-1 || root->mGrpId!=-1 /*|| Config::extractAllFlag*/
|| root->inLine
)
)
......@@ -2656,6 +2905,10 @@ void findEnums(Entry *root)
if (!isGlobal) md->setMemberClass(cd); else md->setFileDef(fd);
md->setDefFile(root->fileName);
md->setDefLine(root->startLine);
md->setBodyLine(root->bodyLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
//printf("Enum definition at line %d of %s\n",root->bodyLine,root->fileName.data());
md->addSectionsToDefinition(root->anchors);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
......@@ -3162,6 +3415,90 @@ void generateFileDocs()
}
}
//----------------------------------------------------------------------------
void generateSources()
{
if (Config::sourceBrowseFlag)
{
writeSourceIndex(*outputList);
if (inputNameList.count()>0)
{
FileName *fn=inputNameList.first();
while (fn)
{
FileDef *fd=fn->first();
while (fd)
{
msg("Generating source listing for file %s...\n",fd->name().data());
fd->writeSource(*outputList);
fd=fn->next();
}
fn=inputNameList.next();
}
}
}
}
void addSourceReferences()
{
ClassListIterator cli(classList);
ClassDef *cd=0;
for (cli.toFirst();(cd=cli.current());++cli)
{
FileDef *fd=cd->getBodyDef();
if (fd && cd->isLinkableInProject() && cd->getBodyLine()!=-1)
{
fd->addSourceRef(cd->getBodyLine(),cd,0);
}
}
MemberNameListIterator mnli(memberNameList);
MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli)
{
MemberNameIterator mni(*mn);
MemberDef *md=0;
for (mni.toFirst();(md=mni.current());++mni)
{
ClassDef *cd=md->memberClass();
FileDef *fd=md->getBodyDef();
if (fd && cd && cd->isLinkableInProject() && md->getBodyLine()!=-1 &&
md->isLinkableInProject())
{
//printf("Found member `%s' in file `%s' at line `%d'\n",
// md->name().data(),fd->name().data(),md->getBodyLine());
Definition *d=cd;
if (d==0) d=md->getNamespace();
if (d==0) d=md->getFileDef();
fd->addSourceRef(md->getBodyLine(),d,md->anchor());
}
}
}
MemberNameListIterator fnli(functionNameList);
for (fnli.toFirst();(mn=fnli.current());++fnli)
{
MemberNameIterator mni(*mn);
MemberDef *md=0;
for (mni.toFirst();(md=mni.current());++mni)
{
NamespaceDef *nd=md->getNamespace();
FileDef *fd=md->getBodyDef();
if (md->getBodyLine()!=-1 && md->isLinkableInProject() &&
(nd && nd->isLinkableInProject()) ||
(fd && fd->isLinkableInProject())
)
{
//printf("Found member `%s' in file `%s' at line `%d'\n",
// md->name().data(),fd->name().data(),md->getBodyLine());
Definition *d=md->getFileDef();
if (d==0) d=md->getNamespace();
fd->addSourceRef(md->getBodyLine(),d,md->anchor());
}
}
}
}
//----------------------------------------------------------------------------
// generate the documentation of all classes
......@@ -3281,13 +3618,18 @@ void findDefineDocumentation(Entry *root)
md->setDocumentation(root->doc);
if (md->briefDescription().isEmpty())
md->setBriefDescription(root->brief);
md->setBodyLine(root->bodyLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors);
}
md=mn->next();
}
}
else if (count>1 && (root->doc.length()>0 || root->brief.length()>0))
else if (count>1 &&
(root->doc.length()>0 || root->brief.length()>0 || root->bodyLine!=-1))
// multiple defines don't know where to add docs
// but maybe they are in different files together with their documentation
{
md=mn->first();
while (md)
......@@ -3302,6 +3644,9 @@ void findDefineDocumentation(Entry *root)
md->setDocumentation(root->doc);
if (md->briefDescription().isEmpty())
md->setBriefDescription(root->brief);
md->setBodyLine(root->bodyLine);
bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors);
}
}
......@@ -3398,6 +3743,7 @@ void findMainPage(Entry *root)
//printf("Found main page! \n======\n%s\n=======\n",root->doc.data());
mainPage = new PageInfo("index", root->doc,
root->args.stripWhiteSpace());
setFileNameForSections(root->anchors,"index");
}
else
{
......@@ -3533,7 +3879,9 @@ void generateExampleDocs()
msg("Generating docs for example %s...\n",pi->name.data());
QCString n=convertSlashes(pi->name,TRUE)+"-example";
startFile(*outputList,n,"Example Documentation");
//outputList->writeTitle(pi->name,pi->name);
startTitle(*outputList,n);
outputList->docify(pi->name);
endTitle(*outputList,n,0);
parseExample(*outputList,pi->doc+"\n\\include "+pi->name,pi->name);
endFile(*outputList);
pi=exampleList.next();
......@@ -3740,25 +4088,39 @@ void generateSearchIndex()
void generateConfigFile(const char *configFile,bool shortList)
{
QFileInfo fi(configFile);
QFile f(configFile);
if (fi.exists()) // create a backup
QFile f;
bool fileOpened=FALSE;
bool writeToStdout=(configFile[0]=='-' && configFile[1]==0);
if (writeToStdout) // write to stdout
{
QDir dir=fi.dir();
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
if (f.open(IO_WriteOnly))
fileOpened = f.open(IO_WriteOnly,stdout);
}
else // write to file
{
QFileInfo fi(configFile);
if (fi.exists()) // create a backup
{
QDir dir=fi.dir();
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
f.setName(configFile);
fileOpened = f.open(IO_WriteOnly);
}
if (fileOpened)
{
writeTemplateConfig(&f,shortList);
f.close();
msg("\n\nConfiguration file `%s' created.\n\n",configFile);
msg("Now edit the configuration file and enter\n\n");
if (strcmp(configFile,"Doxyfile") || strcmp(configFile,"doxyfile"))
msg(" doxygen %s\n\n",configFile);
else
msg(" doxygen\n\n");
msg("to generate the documentation for your project\n\n");
if (!writeToStdout)
{
msg("\n\nConfiguration file `%s' created.\n\n",configFile);
msg("Now edit the configuration file and enter\n\n");
if (strcmp(configFile,"Doxyfile") || strcmp(configFile,"doxyfile"))
msg(" doxygen %s\n\n",configFile);
else
msg(" doxygen\n\n");
msg("to generate the documentation for your project\n\n");
}
}
else
{
......@@ -3868,6 +4230,37 @@ void copyAndFilterFile(const char *fileName,BufStr &dest)
// adjust pointer
}
//----------------------------------------------------------------------------
void copyStyleSheet()
{
if (!Config::htmlStyleSheet.isEmpty())
{
QFile cssf(Config::htmlStyleSheet);
if (cssf.open(IO_ReadOnly))
{
QCString destFileName = Config::htmlOutputDir+"/"+Config::htmlStyleSheet;
QFile df(destFileName);
if (df.open(IO_WriteOnly))
{
char *buffer = new char[cssf.size()];
cssf.readBlock(buffer,cssf.size());
df.writeBlock(buffer,cssf.size());
df.flush();
delete buffer;
}
else
{
warn("Warning: could not write to style sheet %s\n",destFileName.data());
}
}
else
{
warn("Warning: could not open user specified style sheet %s\n",Config::htmlStyleSheet.data());
Config::htmlStyleSheet.resize(0); // revert to the default
}
}
}
//----------------------------------------------------------------------------
// Reads a file to a string.
// The name of the file is written in front of the file's contents and
......@@ -3970,7 +4363,7 @@ int readDir(QFileInfo *fi,
}
else
{
fn = new FileName(name);
fn = new FileName(cfi->absFilePath(),name);
fn->append(fd);
if (fnList) fnList->inSort(fn);
fnDict->insert(name,fn);
......@@ -4071,7 +4464,7 @@ int readFileOrDirectory(const char *s,
}
else
{
fn = new FileName(name);
fn = new FileName(fi.absFilePath(),name);
fn->append(fd);
if (fnList) fnList->inSort(fn);
fnDict->insert(name,fn);
......@@ -4133,10 +4526,12 @@ void usage(const char *name)
msg("You can use doxygen in two ways:\n\n");
msg("1) Use doxygen to generate a template configuration file:\n");
msg(" %s [-s] -g [configName]\n\n",name);
msg(" if -s is specified the comments in the config file will be omitted.\n\n");
msg(" If -s is specified the comments in the config file will be omitted.\n");
msg(" If - is used for configName doxygen will write to standard output.\n\n");
msg("2) Use doxygen to generate documentation using an existing ");
msg("configuration file:\n");
msg(" %s [configName]\n\n",name);
msg(" If - is used for configName doxygen will read from standard input.\n\n");
msg("If configName is omitted `Doxyfile' will be used as a default.\n\n");
exit(1);
}
......@@ -4172,7 +4567,9 @@ int main(int argc,char **argv)
const char *debugLabel;
bool genConfig=FALSE;
bool shortList=FALSE;
while (optind<argc && argv[optind][0]=='-')
while (optind<argc && argv[optind][0]=='-' &&
(isalpha(argv[optind][1]) || argv[optind][1]=='?')
)
{
switch(argv[optind][1])
{
......@@ -4230,6 +4627,7 @@ int main(int argc,char **argv)
parseConfig(config);
checkConfig();
spaces.fill(' ',Config::tabSize);
/**************************************************************************
* Initialize output generators *
......@@ -4241,6 +4639,7 @@ int main(int argc,char **argv)
outputList->add(new HtmlGenerator);
HtmlGenerator::init();
if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize();
copyStyleSheet();
}
if (Config::generateLatex)
{
......@@ -4271,11 +4670,20 @@ int main(int argc,char **argv)
s=Config::examplePath.first();
while (s)
{
readFileOrDirectory(s,0,&exampleNameDict,0,&Config::filePatternList,
&Config::excludePatternList,0,0);
readFileOrDirectory(s,0,&exampleNameDict,0,&Config::examplePatternList,
0,0,0);
s=Config::examplePath.next();
}
msg("Searching for images...\n");
s=Config::imagePath.first();
while (s)
{
readFileOrDirectory(s,0,&imageNameDict,0,&Config::imagePatternList,
0,0,0);
s=Config::imagePath.next();
}
msg("Searching for files to exclude\n");
s=Config::excludeSources.first();
while (s)
......@@ -4361,6 +4769,7 @@ int main(int argc,char **argv)
msg("Building namespace list...\n");
buildNamespaceList(root);
findUsingDirectives(root);
msg("Building group list...\n");
buildGroupList(root);
......@@ -4431,6 +4840,9 @@ int main(int argc,char **argv)
msg("Determining member group documentation...\n");
computeMemberGroupDocumentation();
msg("Adding source references...\n");
addSourceReferences();
//unrelatedFunctionsUsed=hasUnrelatedFunctions();
......@@ -4472,6 +4884,9 @@ int main(int argc,char **argv)
msg("Generating file documentation...\n");
generateFileDocs();
msg("Generating source listings...\n");
generateSources();
msg("Generating class documentation...\n");
generateClassDocs();
......
......@@ -105,9 +105,11 @@ extern FileNameList inputNameList;
extern FileNameDict includeNameDict;
extern FileNameDict exampleNameDict;
extern FileNameDict inputNameDict;
extern FileNameDict imageNameDict;
extern FileList includeFiles;
extern StringDict typedefDict;
extern GroupList groupList;
extern GroupDict groupDict;
extern NamespaceList namespaceList;
extern NamespaceDict namespaceDict;
extern FormulaList formulaList;
......@@ -125,5 +127,6 @@ extern int documentedGroups;
extern int documentedNamespaces;
extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern QCString spaces;
#endif
#define yy_create_buffer tagYY_create_buffer
#define yy_delete_buffer tagYY_delete_buffer
#define yy_scan_buffer tagYY_scan_buffer
#define yy_scan_string tagYY_scan_string
#define yy_scan_bytes tagYY_scan_bytes
#define yy_flex_debug tagYY_flex_debug
#define yy_init_buffer tagYY_init_buffer
#define yy_flush_buffer tagYY_flush_buffer
#define yy_load_buffer_state tagYY_load_buffer_state
#define yy_switch_to_buffer tagYY_switch_to_buffer
#define yyin tagYYin
#define yyleng tagYYleng
#define yylex tagYYlex
#define yyout tagYYout
#define yyrestart tagYYrestart
#define yytext tagYYtext
#define yywrap tagYYwrap
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 51
#define YY_END_OF_BUFFER 52
static yyconst short int yy_accept[334] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 52, 49, 50, 49, 8, 10, 8, 10,
49, 29, 28, 27, 27, 27, 24, 30, 49, 32,
40, 40, 34, 34, 39, 49, 49, 20, 49, 21,
49, 18, 18, 18, 49, 46, 45, 46, 45, 14,
47, 48, 13, 12, 12, 49, 0, 0, 0, 10,
0, 0, 10, 0, 28, 27, 27, 27, 24, 30,
0, 0, 40, 40, 0, 0, 0, 0, 0, 21,
0, 0, 18, 18, 18, 18, 0, 0, 0, 0,
14, 48, 13, 12, 0, 9, 0, 0, 0, 0,
0, 10, 0, 27, 27, 31, 0, 40, 0, 0,
0, 37, 0, 0, 0, 18, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 10, 0, 0,
27, 27, 0, 40, 36, 35, 0, 0, 0, 0,
18, 41, 0, 44, 43, 0, 0, 6, 0, 0,
10, 0, 0, 27, 0, 0, 40, 0, 19, 0,
0, 18, 42, 0, 0, 0, 0, 10, 0, 0,
0, 0, 0, 40, 38, 0, 16, 18, 11, 0,
0, 0, 10, 0, 0, 0, 0, 0, 40, 0,
18, 0, 0, 0, 10, 0, 0, 0, 0, 33,
0, 18, 7, 0, 0, 4, 0, 23, 0, 0,
0, 0, 17, 0, 0, 17, 17, 17, 18, 18,
17, 0, 0, 0, 0, 0, 0, 17, 0, 0,
0, 0, 0, 17, 0, 18, 18, 17, 0, 0,
0, 0, 0, 15, 0, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0, 17, 17,
0, 18, 0, 0, 0, 0, 0, 0, 17, 0,
17, 0, 17, 17, 18, 0, 0, 0, 0, 26,
0, 0, 17, 0, 0, 17, 0, 0, 0, 25,
0, 0, 0, 0, 5, 0, 0, 2, 0, 0,
0, 22, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 5, 6, 7, 1, 5, 8, 1, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 17,
19, 17, 17, 17, 17, 17, 17, 20, 21, 22,
23, 24, 1, 25, 26, 26, 27, 26, 26, 28,
26, 26, 29, 26, 26, 26, 26, 26, 26, 26,
26, 30, 26, 26, 26, 26, 26, 26, 26, 26,
9, 1, 10, 5, 31, 1, 32, 33, 34, 35,
36, 37, 38, 39, 40, 26, 26, 41, 42, 43,
44, 45, 26, 46, 47, 48, 26, 26, 49, 50,
51, 26, 1, 52, 1, 53, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[54] =
{ 0,
1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1, 3, 1, 3, 3, 2, 4, 4, 4, 5,
1, 6, 2, 1, 2, 7, 7, 7, 7, 7,
4, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 1, 8
} ;
static yyconst short int yy_base[356] =
{ 0,
980, 979, 0, 32, 52, 53, 75, 128, 181, 0,
234, 287, 55, 56, 340, 0, 393, 0, 446, 0,
497, 0, 65, 67, 550, 0, 54, 61, 603, 656,
68, 70, 98, 99, 709, 0, 762, 0, 815, 0,
90, 91, 981, 1136, 1136, 0, 71, 0, 78, 937,
946, 1136, 0, 0, 935, 934, 0, 0, 71, 1136,
0, 925, 1136, 28, 1136, 933, 932, 1136, 935, 0,
101, 71, 101, 0, 950, 1136, 1136, 123, 1136, 0,
1136, 0, 0, 0, 0, 949, 943, 959, 915, 0,
90, 920, 920, 954, 0, 0, 925, 915, 0, 0,
931, 905, 0, 916, 903, 902, 908, 899, 943, 0,
911, 923, 103, 113, 0, 123, 912, 901, 893, 892,
0, 0, 0, 0, 894, 1136, 895, 901, 118, 932,
910, 889, 126, 875, 882, 1136, 871, 870, 894, 893,
877, 1136, 0, 868, 893, 124, 884, 862, 885, 884,
858, 871, 877, 867, 1136, 864, 1136, 850, 854, 848,
846, 888, 838, 845, 1136, 1136, 826, 849, 820, 675,
216, 1136, 685, 1136, 1136, 669, 662, 1136, 662, 661,
661, 667, 662, 693, 666, 652, 646, 657, 1136, 641,
667, 125, 1136, 666, 653, 648, 655, 638, 638, 645,
646, 638, 635, 626, 1136, 620, 1136, 118, 1136, 630,
614, 604, 603, 602, 625, 610, 607, 616, 593, 606,
208, 631, 593, 588, 630, 609, 624, 586, 586, 0,
583, 867, 1136, 597, 595, 1136, 611, 1136, 579, 502,
524, 919, 252, 233, 619, 631, 1136, 965, 232, 263,
874, 512, 539, 508, 497, 506, 535, 877, 503, 502,
495, 488, 487, 119, 496, 226, 228, 0, 497, 494,
489, 493, 485, 1136, 486, 477, 480, 503, 502, 474,
269, 478, 475, 511, 473, 481, 478, 491, 103, 255,
489, 270, 456, 497, 497, 304, 301, 286, 294, 295,
298, 291, 307, 320, 283, 293, 304, 287, 289, 1136,
288, 269, 312, 236, 235, 271, 234, 0, 227, 1136,
209, 228, 225, 155, 1136, 139, 129, 1136, 106, 117,
108, 1136, 1136, 1018, 1026, 1034, 1042, 1050, 1058, 65,
1063, 1068, 1072, 1077, 1081, 1085, 1089, 1094, 1100, 1105,
58, 1109, 1117, 1124, 1128
} ;
static yyconst short int yy_def[356] =
{ 0,
334, 334, 333, 3, 334, 334, 335, 335, 333, 9,
336, 336, 334, 334, 333, 15, 333, 17, 333, 19,
334, 21, 334, 334, 333, 25, 334, 334, 337, 337,
334, 334, 338, 338, 333, 35, 333, 37, 333, 39,
339, 339, 333, 333, 333, 340, 333, 341, 333, 341,
333, 333, 342, 343, 343, 343, 344, 345, 333, 333,
346, 346, 333, 333, 333, 333, 333, 333, 333, 347,
333, 348, 348, 349, 333, 333, 333, 333, 333, 350,
333, 351, 352, 353, 353, 333, 340, 333, 333, 341,
333, 333, 341, 333, 342, 343, 343, 343, 344, 345,
333, 333, 346, 346, 333, 333, 333, 333, 333, 347,
333, 333, 348, 348, 349, 348, 333, 333, 333, 333,
350, 351, 352, 353, 333, 333, 333, 333, 333, 333,
333, 341, 333, 343, 343, 333, 333, 346, 333, 333,
333, 333, 354, 333, 333, 348, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 341, 333, 333,
343, 343, 333, 346, 333, 333, 333, 354, 333, 333,
348, 333, 333, 333, 333, 333, 333, 333, 333, 333,
341, 333, 333, 343, 333, 333, 346, 333, 333, 333,
333, 348, 333, 333, 333, 333, 333, 341, 333, 333,
333, 333, 333, 346, 333, 333, 333, 348, 333, 333,
333, 333, 341, 333, 333, 333, 333, 333, 346, 333,
348, 333, 333, 333, 341, 333, 333, 333, 333, 346,
333, 348, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 348, 333, 348, 348, 348,
349, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 348, 333, 348, 348, 349, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
348, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 348, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 348, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 355, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 0, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333
} ;
static yyconst short int yy_nxt[1190] =
{ 0,
44, 44, 45, 44, 44, 44, 44, 46, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 47, 44, 44, 44, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 44, 44, 49, 45, 45, 45, 45, 45, 71,
50, 52, 52, 45, 122, 105, 71, 68, 106, 68,
45, 87, 45, 51, 51, 44, 44, 45, 44, 44,
44, 52, 44, 44, 44, 44, 69, 44, 69, 75,
44, 75, 85, 85, 44, 44, 44, 44, 44, 44,
77, 77, 88, 101, 111, 78, 78, 129, 130, 88,
300, 86, 86, 332, 114, 89, 91, 102, 92, 79,
79, 154, 89, 115, 112, 301, 44, 44, 44, 44,
45, 44, 44, 44, 52, 44, 44, 44, 44, 331,
44, 155, 330, 44, 114, 116, 114, 44, 44, 44,
44, 44, 44, 115, 118, 115, 114, 116, 146, 159,
119, 221, 114, 120, 160, 115, 114, 114, 114, 171,
115, 115, 208, 313, 329, 115, 115, 115, 328, 44,
44, 44, 44, 45, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 54, 54, 54,
44, 44, 44, 44, 44, 44, 54, 55, 56, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 44, 44, 44, 44, 45, 44, 44, 44,
44, 44, 44, 44, 44, 303, 44, 192, 301, 44,
327, 114, 116, 232, 44, 44, 44, 44, 44, 114,
115, 247, 302, 247, 261, 247, 281, 266, 115, 114,
262, 114, 326, 263, 247, 114, 264, 303, 115, 324,
115, 316, 323, 322, 115, 44, 44, 44, 44, 45,
44, 44, 44, 44, 44, 44, 44, 44, 267, 44,
321, 312, 44, 247, 292, 300, 114, 44, 44, 44,
44, 44, 114, 114, 302, 115, 313, 305, 264, 312,
301, 115, 115, 247, 320, 319, 114, 318, 317, 303,
316, 315, 314, 311, 313, 115, 310, 309, 44, 44,
44, 44, 45, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 58, 58, 58, 44,
44, 44, 44, 44, 44, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
58, 44, 44, 44, 44, 45, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 59, 44, 44, 44, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 44, 60, 44, 44, 45, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 61, 61, 61, 44, 44, 44, 44, 44,
44, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 62,
61, 61, 61, 61, 61, 61, 61, 44, 44, 45,
308, 63, 307, 306, 64, 63, 63, 63, 63, 304,
63, 299, 63, 298, 297, 296, 295, 294, 65, 63,
293, 291, 290, 289, 288, 247, 287, 286, 285, 284,
283, 66, 282, 280, 279, 278, 277, 276, 275, 67,
274, 273, 272, 271, 270, 269, 257, 256, 63, 63,
44, 44, 45, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 70, 70, 70, 44,
44, 44, 44, 44, 44, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 44, 44, 44, 44, 45, 44, 44, 44, 44,
44, 44, 44, 44, 255, 44, 254, 253, 44, 252,
241, 240, 239, 44, 44, 44, 44, 44, 247, 238,
247, 237, 247, 236, 235, 234, 233, 231, 230, 136,
247, 247, 264, 229, 264, 228, 73, 227, 226, 225,
224, 223, 222, 247, 44, 74, 44, 44, 45, 44,
44, 44, 44, 44, 44, 44, 44, 220, 44, 219,
247, 44, 218, 217, 114, 216, 44, 44, 44, 44,
44, 215, 247, 115, 214, 213, 212, 211, 210, 209,
207, 206, 205, 204, 203, 202, 201, 200, 199, 73,
198, 197, 196, 195, 194, 193, 191, 44, 74, 44,
44, 45, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 80, 80, 80, 44, 44,
44, 44, 44, 44, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
44, 44, 44, 44, 45, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 81, 44, 82, 82, 82,
82, 82, 44, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 44, 44, 44, 44, 45, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 83, 83, 83, 83, 44, 44, 44, 44, 44,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 44, 83, 242, 190,
242, 243, 189, 188, 244, 245, 187, 243, 246, 247,
248, 186, 243, 247, 265, 268, 247, 268, 247, 243,
247, 185, 184, 183, 182, 181, 247, 180, 179, 247,
178, 249, 177, 176, 175, 174, 173, 172, 170, 250,
114, 169, 167, 166, 165, 164, 163, 162, 243, 251,
242, 161, 242, 243, 158, 247, 244, 245, 247, 243,
243, 247, 258, 157, 243, 156, 153, 152, 151, 150,
149, 243, 148, 147, 145, 144, 143, 142, 141, 140,
139, 138, 137, 259, 136, 135, 134, 133, 132, 131,
128, 260, 127, 126, 125, 117, 109, 108, 107, 104,
243, 243, 265, 98, 247, 97, 264, 94, 264, 93,
333, 45, 45, 333, 333, 333, 333, 247, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 114, 333,
333, 333, 333, 333, 333, 333, 247, 115, 44, 44,
44, 44, 44, 44, 44, 44, 53, 53, 53, 53,
53, 53, 53, 53, 57, 57, 57, 57, 57, 57,
57, 57, 72, 72, 72, 72, 72, 72, 72, 72,
76, 76, 76, 76, 76, 76, 76, 76, 84, 84,
84, 84, 84, 84, 84, 84, 90, 333, 333, 90,
95, 95, 333, 333, 95, 96, 333, 333, 96, 99,
99, 99, 333, 99, 100, 333, 333, 100, 103, 333,
333, 103, 110, 333, 333, 110, 113, 113, 113, 333,
113, 113, 115, 115, 115, 333, 115, 115, 121, 333,
333, 121, 123, 123, 333, 123, 123, 124, 124, 124,
124, 124, 333, 124, 124, 168, 168, 168, 168, 333,
168, 325, 333, 333, 325, 43, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333
} ;
static yyconst short int yy_chk[1190] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 4, 5, 6, 27, 13, 14, 27,
4, 13, 14, 28, 351, 64, 28, 23, 64, 24,
31, 340, 32, 5, 6, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 23, 7, 24, 31,
7, 32, 41, 42, 7, 7, 7, 7, 7, 7,
33, 34, 47, 59, 71, 33, 34, 91, 91, 49,
289, 41, 42, 331, 72, 47, 49, 59, 49, 33,
34, 129, 49, 72, 71, 289, 7, 7, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 330,
8, 129, 329, 8, 73, 73, 113, 8, 8, 8,
8, 8, 8, 73, 78, 113, 114, 114, 116, 133,
78, 208, 264, 78, 133, 114, 116, 146, 192, 146,
208, 264, 192, 327, 326, 116, 146, 192, 324, 8,
8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 323, 11, 171, 322, 11,
321, 221, 221, 221, 11, 11, 11, 11, 11, 171,
221, 243, 290, 243, 244, 243, 266, 249, 171, 266,
244, 267, 319, 244, 243, 249, 267, 290, 266, 317,
267, 316, 315, 314, 249, 11, 11, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 250, 12,
312, 299, 12, 243, 281, 301, 250, 12, 12, 12,
12, 12, 281, 292, 303, 250, 299, 292, 305, 313,
301, 281, 292, 311, 309, 308, 305, 307, 306, 303,
304, 302, 300, 298, 313, 305, 297, 296, 12, 12,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 21,
295, 21, 294, 293, 21, 21, 21, 21, 21, 291,
21, 288, 21, 287, 286, 285, 284, 283, 21, 21,
282, 280, 279, 278, 277, 276, 275, 273, 272, 271,
270, 21, 269, 265, 263, 262, 261, 260, 259, 21,
257, 256, 255, 254, 253, 252, 241, 240, 21, 21,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 239, 29, 237, 235, 29, 234,
231, 229, 228, 29, 29, 29, 29, 29, 245, 227,
245, 226, 245, 225, 224, 223, 222, 220, 219, 218,
246, 245, 246, 217, 246, 216, 29, 215, 214, 213,
212, 211, 210, 246, 29, 29, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 206, 30, 204,
245, 30, 203, 202, 246, 201, 30, 30, 30, 30,
30, 200, 246, 246, 199, 198, 197, 196, 195, 194,
191, 190, 188, 187, 186, 185, 184, 183, 182, 30,
181, 180, 179, 177, 176, 173, 170, 30, 30, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 232, 169,
232, 232, 168, 167, 232, 232, 164, 232, 232, 232,
232, 163, 232, 251, 258, 251, 258, 251, 258, 232,
258, 162, 161, 160, 159, 158, 251, 156, 154, 258,
153, 232, 152, 151, 150, 149, 148, 147, 145, 232,
232, 144, 141, 140, 139, 138, 137, 135, 232, 232,
242, 134, 242, 242, 132, 251, 242, 242, 258, 242,
242, 242, 242, 131, 242, 130, 128, 127, 125, 120,
119, 242, 118, 117, 112, 111, 109, 108, 107, 106,
105, 104, 102, 242, 101, 98, 97, 94, 93, 92,
89, 242, 88, 87, 86, 75, 69, 67, 66, 62,
242, 242, 248, 56, 248, 55, 248, 51, 248, 50,
43, 2, 1, 0, 0, 0, 0, 248, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 248, 0,
0, 0, 0, 0, 0, 0, 248, 248, 334, 334,
334, 334, 334, 334, 334, 334, 335, 335, 335, 335,
335, 335, 335, 335, 336, 336, 336, 336, 336, 336,
336, 336, 337, 337, 337, 337, 337, 337, 337, 337,
338, 338, 338, 338, 338, 338, 338, 338, 339, 339,
339, 339, 339, 339, 339, 339, 341, 0, 0, 341,
342, 342, 0, 0, 342, 343, 0, 0, 343, 344,
344, 344, 0, 344, 345, 0, 0, 345, 346, 0,
0, 346, 347, 0, 0, 347, 348, 348, 348, 0,
348, 348, 349, 349, 349, 0, 349, 349, 350, 0,
0, 350, 352, 352, 0, 352, 352, 353, 353, 353,
353, 353, 0, 353, 353, 354, 354, 354, 354, 0,
354, 355, 0, 0, 355, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "doxytag.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "doxytag.l"
/*
* includes
*/
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include "qtbc.h"
#include <qstrlist.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qdict.h>
#include <qtextstream.h>
#include <qdir.h>
#include "version.h"
#include "suffixtree.h"
#include "searchindex.h"
#include "logos.h"
struct MemberDef
{
QCString name;
QCString anchor;
QCString args;
};
struct ClassDef
{
QCString name;
QStrList bases;
QCString fileName;
bool isFile;
QList<MemberDef> memberList;
};
QList<ClassDef> classList;
QDict<ClassDef> classDict(1009);
QList<ClassDef> fileList;
QDict<ClassDef> fileDict(1009);
static bool genTag;
static bool genIndex;
static QStrList bases;
static QCString inputString;
static int inputPosition;
static QCString yyFileName;
static int yyLineNr;
static QCString classFile;
static QCString memberRef;
static QCString memberName;
static QCString memberArgs;
static QCString className;
//static bool newClass;
static QCString docBaseLink;
static QCString docAnchor;
static QCString docRefName;
static bool nameBug;
static SearchIndex searchIndex;
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
*/
#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++] ;
c++; buf++;
}
return c;
}
static void addClass(const char *clName)
{
if (classDict[clName]==0)
{
ClassDef *cd=new ClassDef;
cd->name=clName;
cd->fileName=yyFileName;
cd->isFile=FALSE;
classList.append(cd);
classDict.insert(clName,cd);
}
}
static void addFile(const char *fName)
{
if (classDict[fName]==0)
{
ClassDef *fd=new ClassDef;
fd->name=fName;
fd->fileName=yyFileName;
fd->isFile=TRUE;
classList.append(fd);
classDict.insert(fName,fd);
}
}
static void addBases(const char *clName)
{
ClassDef *cd=0;
if (clName && (cd=classDict[clName])) cd->bases=bases;
}
static void addMember(const char *memName,const char *memRef,const char *memArgs)
{
ClassDef *cd=classList.last();
MemberDef *md;
md=new MemberDef;
md->name=memName;
md->anchor=memRef;
md->args=memArgs;
cd->memberList.append(md);
}
static void addReference()
{
//printf("addReference() key: %s ref:%s\n",
// docRefName.data(),(docBaseLink+"#"+docAnchor).data());
if (genIndex && docRefName.length()>0 && docBaseLink.length()>0)
{
if (docAnchor.length()==0)
searchIndex.addReference(docRefName,docBaseLink);
else
searchIndex.addReference(docRefName,docBaseLink+"#"+docAnchor);
searchIndex.addWord(docRefName,docRefName,TRUE);
}
}
QCString unhtmlify(const char *str)
{
QCString result;
const char *p=str;
char c;
while ((c=*p)!='\0')
{
if (c!='&') { result+=c; p++; }
else
{
if (strncmp(p,"&amp;",5)==0) { result+='&'; p+=5; }
else if (strncmp(p,"&lt;",4)==0) { result+='<'; p+=4; }
else if (strncmp(p,"&gt;",4)==0) { result+='>'; p+=4; }
else /* should not happen */ { result+='&'; p++; }
}
}
return result;
}
#define Start 1
#define SearchClassFile 2
#define ReadClassFile 3
#define CheckClassName 4
#define ReadClassName 5
#define SearchMemberRef 6
#define ReadMemberRef 7
#define SearchMemberName 8
#define ReadMemberName 9
#define ReadOperator 10
#define SearchBaseClasses 11
#define ReadBaseClass 12
#define SearchRefName 13
#define ReadRefName 14
#define SearchArgs 15
#define ReadArgs 16
#define SearchWords 17
#define SkipHTMLTag 18
#define CheckConstructor 19
#define SkipPreformated 20
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 197 "doxytag.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 1136 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 199 "doxytag.l"
{
BEGIN( SearchClassFile );
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 202 "doxytag.l"
{ // Qt variant
BEGIN( ReadClassName );
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 205 "doxytag.l"
{ // Doxygen variant
BEGIN( ReadClassName );
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 208 "doxytag.l"
{
//printf("Inherits found\n");
BEGIN( SearchBaseClasses );
}
YY_BREAK
case 5:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 15;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 212 "doxytag.l"
{ // needed due to inconsistency in the Qt docs
BEGIN( CheckConstructor );
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 215 "doxytag.l"
{
BEGIN( SkipPreformated );
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 218 "doxytag.l"
{
BEGIN( SearchWords );
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 221 "doxytag.l"
{
BEGIN( SkipHTMLTag );
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 224 "doxytag.l"
YY_BREAK
case 10:
YY_RULE_SETUP
#line 225 "doxytag.l"
{
//printf("tag: %s#%s ref: %s word: `%s'\n",
// docBaseLink.data(),docAnchor.data(),
// docRefName.data(),yytext);
if (genIndex && docRefName.length()>0 && yyleng>2)
searchIndex.addWord(docRefName,
yytext,FALSE
);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 234 "doxytag.l"
{
BEGIN( Start );
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 237 "doxytag.l"
YY_BREAK
case 13:
YY_RULE_SETUP
#line 238 "doxytag.l"
{
QCString s=yytext;
if (s.find("::")!=-1)
{
docRefName=yytext;
addReference();
nameBug=TRUE;
}
else
{
nameBug=FALSE;
}
BEGIN( Start );
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 252 "doxytag.l"
{
docAnchor = yytext;
if (docAnchor=="details" ||
docAnchor=="_details")
{
docRefName=className.copy();
addReference();
BEGIN( Start );
}
else
{
BEGIN( SearchRefName );
}
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 266 "doxytag.l"
{
BEGIN( ReadRefName );
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 269 "doxytag.l"
{
if (nameBug)
BEGIN( Start );
else
BEGIN( ReadRefName );
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 276 "doxytag.l"
{ // hmm, looks impressive :-)
docRefName=unhtmlify(yytext);
addReference();
BEGIN( Start );
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 281 "doxytag.l"
{
//printf("ReadRef=%s\n",yytext);
docRefName=yytext;
addReference();
BEGIN( Start );
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 287 "doxytag.l"
{
//printf("Search %s\n",yytext);
BEGIN( ReadBaseClass );
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 291 "doxytag.l"
{
addBases(className);
BEGIN( Start );
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 295 "doxytag.l"
{
bases.append(yytext);
BEGIN( SearchBaseClasses );
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 299 "doxytag.l"
{
BEGIN( ReadClassFile );
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 302 "doxytag.l"
{
BEGIN( ReadClassFile );
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 305 "doxytag.l"
{
className=yytext;
BEGIN( CheckClassName);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 309 "doxytag.l"
{
//printf("className=%s\n",className.data());
addClass(className);
BEGIN( Start );
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 314 "doxytag.l"
{
//printf("className=%s\n",className.data());
addFile(className);
BEGIN( Start );
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 319 "doxytag.l"
{ // not a class file
className.resize(0);
BEGIN( Start );
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 323 "doxytag.l"
{
classFile=yytext;
BEGIN( SearchMemberRef );
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 327 "doxytag.l"
{
if (YY_START==ReadClassFile)
{
classFile=yyFileName;
}
BEGIN( ReadMemberRef );
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 334 "doxytag.l"
{
memberRef=yytext;
BEGIN( SearchMemberName );
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 338 "doxytag.l"
{ // <strong> is for qt-1.44, <b> is for qt-2.00
BEGIN( ReadMemberName );
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 341 "doxytag.l"
{
unput(*yytext);
BEGIN( ReadMemberName );
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 345 "doxytag.l"
{
memberName="operator";
BEGIN( ReadOperator );
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 349 "doxytag.l"
{ memberName+=*yytext; }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 350 "doxytag.l"
{ memberName+="<"; }
YY_BREAK
case 36:
YY_RULE_SETUP
#line 351 "doxytag.l"
{ memberName+=">"; }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 352 "doxytag.l"
{ memberName+=" new"; }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 353 "doxytag.l"
{ memberName+=" delete"; }
YY_BREAK
case 39:
YY_RULE_SETUP
#line 354 "doxytag.l"
{ BEGIN( SearchArgs ); }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 355 "doxytag.l"
{
memberName=yytext;
BEGIN( SearchArgs );
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 359 "doxytag.l"
{
//printf("SearchArg className=%s memberName=%s\n",className.data(),memberName.data());
if (className.length()>0 && memberName.length()>0)
BEGIN( ReadArgs );
else
BEGIN( Start );
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 366 "doxytag.l"
{ memberArgs+="&"; }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 367 "doxytag.l"
{ memberArgs+="<"; }
YY_BREAK
case 44:
YY_RULE_SETUP
#line 368 "doxytag.l"
{ memberArgs+=">"; }
YY_BREAK
/*
<ReadArgs>[{}] { // handle enums
memberArgs.resize(0);
addMember(memberName,memberRef,memberArgs);
if (*yytext=='}')
BEGIN( Start );
else
BEGIN( SearchClassFile );
}
*/
case 45:
YY_RULE_SETUP
#line 379 "doxytag.l"
{
//printf("adding member %s\n",memberName.data());
memberArgs=memberArgs.stripWhiteSpace();
//if (newClass)
//{
// newClass=FALSE;
// addClass(className);
//}
addMember(memberName,memberRef,memberArgs);
memberArgs.resize(0);
if (*yytext=='<')
BEGIN( SkipHTMLTag);
else
BEGIN( Start );
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 394 "doxytag.l"
{ memberArgs+=(*yytext)&0x7f; }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 395 "doxytag.l"
{ BEGIN( Start ); }
YY_BREAK
case 48:
YY_RULE_SETUP
#line 396 "doxytag.l"
YY_BREAK
case 49:
YY_RULE_SETUP
#line 397 "doxytag.l"
YY_BREAK
case 50:
YY_RULE_SETUP
#line 398 "doxytag.l"
{ yyLineNr++;
if (YY_START!=SkipHTMLTag) BEGIN( Start );
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 402 "doxytag.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(SearchClassFile):
case YY_STATE_EOF(ReadClassFile):
case YY_STATE_EOF(CheckClassName):
case YY_STATE_EOF(ReadClassName):
case YY_STATE_EOF(SearchMemberRef):
case YY_STATE_EOF(ReadMemberRef):
case YY_STATE_EOF(SearchMemberName):
case YY_STATE_EOF(ReadMemberName):
case YY_STATE_EOF(ReadOperator):
case YY_STATE_EOF(SearchBaseClasses):
case YY_STATE_EOF(ReadBaseClass):
case YY_STATE_EOF(SearchRefName):
case YY_STATE_EOF(ReadRefName):
case YY_STATE_EOF(SearchArgs):
case YY_STATE_EOF(ReadArgs):
case YY_STATE_EOF(SearchWords):
case YY_STATE_EOF(SkipHTMLTag):
case YY_STATE_EOF(CheckConstructor):
case YY_STATE_EOF(SkipPreformated):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 333);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 402 "doxytag.l"
/*@ ----------------------------------------------------------------------------
*/
void parse(QCString &s)
{
bases.clear();
nameBug = FALSE;
//newClass = TRUE;
inputString = s;
inputPosition = 0;
yyLineNr = 0;
tagYYrestart( tagYYin );
BEGIN( Start );
tagYYlex();
//printf("Number of lines scanned: %d\n",yyLineNr);
}
void parseFile(QFileInfo &fi)
{
fprintf(stderr,"Parsing file %s...\n",fi.fileName().data());
QFile f(fi.absFilePath());
if (f.open(IO_ReadOnly))
{
yyFileName = fi.fileName();
className.resize(0);
memberName.resize(0);
//printf("Parsing file %s...\n",fi.fileName().data());
QCString input(fi.size()+1);
docBaseLink=fi.fileName();
docRefName=fi.fileName().copy();
searchIndex.addReference(docRefName,docBaseLink);
searchIndex.addWord(docRefName,docRefName,TRUE);
f.readBlock(input.data(),fi.size());
input.at(fi.size())='\0';
parse(input);
}
else
{
fprintf(stderr,"Warning: Cannot open file %s\n",fi.fileName().data());
}
}
void parseFileOrDir(const char *fileName)
{
QFileInfo fi(fileName);
if (fi.exists())
{
if (fi.isFile())
{
parseFile(fi);
}
else if (fi.isDir())
{
QDir dir(fileName);
dir.setFilter( QDir::Files );
dir.setNameFilter( "*.html" );
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *cfi;
for ( it.toFirst() ; (cfi=it.current()) ; ++it)
{
if (cfi->isFile())
{
parseFile(*cfi);
}
}
}
}
else
{
fprintf(stderr,"Warning: File %s does not exist\n",fileName);
}
}
void usage(const char *name)
{
fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-1999\n\n",
versionString);
fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n");
fprintf(stderr,"Usage: %s [-t tag_file] [-s index_file] [ html_file [html_file...] ]\n",name);
fprintf(stderr,"Options:\n");
fprintf(stderr," -t <tag_file> Generate tag file <tag_file>.\n");
fprintf(stderr," -s <index_file> Generate search index <index_file>.\n\n");
fprintf(stderr,"If no HTML files are given all files in the current dir that\n"
"have a .html extension are parsed.\n\n");
exit(1);
}
const char *getArg(int argc,char **argv,int &optind,const char c)
{
char *s=0;
if (strlen(&argv[optind][2])>0)
s=&argv[optind][2];
else if (optind+1<argc)
s=argv[++optind];
else
{
fprintf(stderr,"option -%c requires an argument\n",c);
exit(1);
}
return s;
}
int main(int argc,char **argv)
{
QCString tagName;
QCString indexName;
int optind=1;
const char *arg;
while (optind<argc && argv[optind][0]=='-')
{
switch(argv[optind][1])
{
case 't':
arg=getArg(argc,argv,optind,'t');
tagName=arg;
break;
case 's':
arg=getArg(argc,argv,optind,'s');
indexName=arg;
break;
case 'h':
case '?':
usage(argv[0]);
break;
default:
fprintf(stderr,"Unknown option -%c\n",argv[optind][1]);
usage(argv[0]);
}
optind++;
}
genTag = tagName.length()>0;
genIndex = indexName.length()>0;
if (!genTag && !genIndex)
{
fprintf(stderr,"Nothing to do !\n\n");
usage(argv[0]);
}
int i;
if (optind>=argc)
{
parseFileOrDir(".");
}
else
{
for (i=optind;i<argc;i++)
{
parseFileOrDir(argv[i]);
}
}
if (genIndex)
{
//printf("Writing search index\n");
if (!searchIndex.saveIndex(indexName))
{
fprintf(stderr,"Error: Could not write search index\n");
}
QFileInfo fi(indexName);
if (fi.exists())
{
QCString dir=convertToQCString(fi.dir().absPath());
fi.setFile(dir+"/search.gif");
if (!fi.exists()) writeSearchButton(dir);
fi.setFile(dir+"/doxygen.gif");
if (!fi.exists()) writeLogo(dir);
fi.setFile(dir+"/search.cgi");
if (!fi.exists())
{
QFile f(dir+"/search.cgi");
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "#!/bin/sh" << endl
<< "DOXYSEARCH=" << endl
<< "DOXYPATH=" << endl
<< "if [ -f $DOXYSEARCH ]" << endl
<< "then" << endl
<< " $DOXYSEARCH $DOXYPATH" << endl
<< "else" << endl
<< " echo \"Content-Type: text/html\"" << endl
<< " echo \"\"" << endl
<< " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl
<< "fi" << endl;
f.close();
}
else
{
fprintf(stderr,"Error: could not open file %s for writing\n",(dir+"/search.cgi").data());
}
}
}
}
if (genTag)
{
QFile f(tagName);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
ClassDef *cd=classList.first();
while (cd)
{
if (cd->isFile) t << "&"; else t << ">";
t << cd->name << ":";
char *base=cd->bases.first();
while (base)
{
t << base << "?";
base=cd->bases.next();
}
if (!cd->isFile) t << " \"" << cd->fileName << "\"";
t << endl;
MemberDef *md=cd->memberList.first();
while (md)
{
t << md->name << " " << md->anchor << " \"" << md->args << "\"" << endl;
md=cd->memberList.next();
}
cd=classList.next();
}
}
else
{
fprintf(stderr,"Error: Could not write tag file %s\n",tagName.data());
}
}
return 0;
}
extern "C" {
int tagYYwrap() { return 1 ; }
};
......@@ -25,10 +25,10 @@
#include "qtbc.h"
#include <qstrlist.h>
#include <qfileinf.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qdict.h>
#include <qtstream.h>
#include <qtextstream.h>
#include <qdir.h>
#include "version.h"
......
......@@ -65,6 +65,7 @@ Entry::Entry(const Entry &e)
fileName = e.fileName.copy();
startLine = e.startLine;
mGrpId = e.mGrpId;
bodyLine = e.bodyLine;
inLine = e.inLine;
sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE);
......@@ -191,7 +192,7 @@ void Entry::reset()
args.resize(0);
exception.resize(0);
program.resize(0);
body.resize(0);
//body.resize(0);
includeFile.resize(0);
includeName.resize(0);
doc.resize(0);
......@@ -201,6 +202,7 @@ void Entry::reset()
fileName.resize(0);
scopeSpec.resize(0);
memberSpec.resize(0);
bodyLine = -1;
mGrpId = -1;
section = EMPTY_SEC;
sig = FALSE;
......@@ -228,7 +230,7 @@ int Entry::getSize()
size+=args.length()+1;
size+=exception.length()+1;
size+=program.length()+1;
size+=body.length()+1;
//size+=body.length()+1;
size+=includeFile.length()+1;
size+=includeName.length()+1;
size+=doc.length()+1;
......
......@@ -108,6 +108,7 @@ class Entry
INTERFACE_SEC = 0x04000000,
INTERFACEDOC_SEC = 0x08000000,
MAINPAGEDOC_SEC = 0x10000000,
USINGDIR_SEC = 0x20000000,
COMPOUND_MASK = CLASS_SEC | STRUCT_SEC | UNION_SEC | INTERFACE_SEC,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC | INTERFACEDOC_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
......@@ -140,7 +141,8 @@ class Entry
QCString scopeSpec; // template specialization of the scope
QCString memberSpec; // template specialization of the member
QCString program; // the program text
QCString body; // the function body
//QCString body; // the function body
int bodyLine; // line number of the definition in the source
QCString includeFile; // include file (2 arg of \class, must be unique)
QCString includeName; // include name (3 arg of \class)
QCString doc; // documentation block (partly parsed)
......
......@@ -18,6 +18,7 @@
#define EXAMPLE_H
#include "qtbc.h"
#include <qdict.h>
class ClassDef;
class MemberName;
......@@ -40,6 +41,10 @@ class ExampleList : public QList<Example>
}
};
typedef QDict<Example> ExampleDict;
class ExampleDict : public QDict<Example>
{
public:
ExampleDict(int size=17) : QDict<Example>(size) {}
};
#endif
......@@ -26,6 +26,7 @@
#include "namespacedef.h"
#include "util.h"
#include "language.h"
#include "outputlist.h"
/*! create a new file definition, where \a p is the file path,
\a the file name, and \a ref is an HTML anchor name if the
......@@ -45,6 +46,9 @@ FileDef::FileDef(const char *p,const char *nm,const char *ref)
defineList = new DefineList;
namespaceList = new NamespaceList;
namespaceDict = new NamespaceDict(7);
srcDefDict = 0;
srcAnchorDict = 0;
usingList = 0;
}
/*! destroy the file definition */
......@@ -56,6 +60,9 @@ FileDef::~FileDef()
delete defineList;
delete namespaceList;
delete namespaceDict;
delete srcDefDict;
delete srcAnchorDict;
delete usingList;
}
/*! Compute the HTML anchor names for all members in the class */
......@@ -195,7 +202,7 @@ void FileDef::writeDocumentation(OutputList &ol)
//doc=doc.stripWhiteSpace();
//int bl=brief.length();
//int dl=doc.length();
if (!briefDescription().isEmpty() || !documentation().isEmpty())
if (!briefDescription().isEmpty() || !documentation().isEmpty() || bodyLine!=-1)
{
ol.writeRuler();
bool latexOn = ol.isEnabled(OutputGenerator::Latex);
......@@ -208,6 +215,9 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty())
{
ol+=briefOutput;
}
if (!briefDescription().isEmpty() && !documentation().isEmpty())
{
ol.newParagraph();
}
if (!documentation().isEmpty())
......@@ -215,7 +225,21 @@ void FileDef::writeDocumentation(OutputList &ol)
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// doc+='.';
parseDoc(ol,0,0,documentation()+"\n");
}
//printf("Writing source ref for file %s\n",name().data());
if (Config::sourceBrowseFlag)
{
ol.newParagraph();
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
{
parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
ol.writeObjectLink(0,sourceName(),
0,name());
parseText(ol,refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
}
}
......@@ -294,6 +318,23 @@ void FileDef::writeDocumentation(OutputList &ol)
endFile(ol);
}
/*! Write a source listing of this file to the output */
void FileDef::writeSource(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,sourceName(),name()+" Source File");
startTitle(ol,0);
parseText(ol,name());
endTitle(ol,0,0);
//parseText(ol,theTranslator->trVerbatimText(incFile->name()));
//ol.writeRuler();
ol.startCodeFragment();
parseCode(ol,name(),fileToString(absFilePath()),FALSE,0,this);
ol.endCodeFragment();
endFile(ol);
ol.enableAll();
}
/*! Adds member definition \a md to the list of all members of this file */
void FileDef::insertMember(MemberDef *md)
{
......@@ -316,6 +357,53 @@ void FileDef::insertNamespace(NamespaceDef *nd)
}
}
void FileDef::addSourceRef(int line,Definition *d,const char *anchor)
{
if (d)
{
if (srcDefDict==0) srcDefDict = new QIntDict<Definition>(257);
if (srcAnchorDict==0)
{
srcAnchorDict = new QIntDict<QCString>(257);
srcAnchorDict->setAutoDelete(TRUE);
}
srcDefDict->insert(line,d);
srcAnchorDict->insert(line,new QCString(anchor));
//printf("Adding member %s with anchor %s at line %d to file %s\n",
// d->name().data(),anchor,line,name().data());
}
}
Definition *FileDef::getSourceDefinition(int lineNr)
{
Definition *result=0;
if (srcDefDict)
{
result = srcDefDict->find(lineNr);
}
return result;
}
QCString FileDef::getSourceAnchor(int lineNr)
{
QCString result;
if (srcAnchorDict)
{
QCString *pstr = srcAnchorDict->find(lineNr);
if (pstr) result=*pstr;
}
return result;
}
void FileDef::addUsingDirective(NamespaceDef *nd)
{
if (usingList==0)
{
usingList = new NamespaceList;
}
usingList->append(nd);
}
//-----------------------------------------------------------------------------
/*! Creates a file list. */
......@@ -333,7 +421,9 @@ int FileList::compareItems(GCI item1, GCI item2)
{
FileDef *c1=(FileDef *)item1;
FileDef *c2=(FileDef *)item2;
return strcmp(c1->name(),c2->name());
return Config::fullPathNameFlag ?
strcmp(c1->absFilePath(),c2->absFilePath()) :
strcmp(c1->name(),c2->name());
}
/*! Create a file list iterator. */
......@@ -341,3 +431,4 @@ FileListIterator::FileListIterator(const FileList &cllist) :
QListIterator<FileDef>(cllist)
{
}
......@@ -19,14 +19,15 @@
#include "index.h"
#include <qlist.h>
#include <qintdict.h>
#include "config.h"
#include "definition.h"
class MemberList;
class FileList;
class ClassList;
class MemberDef;
class ClassDef;
class MemberDef;
class OutputList;
class DefineList;
class NamespaceDef;
......@@ -62,8 +63,6 @@ class FileDef : public Definition
return Definition::name();
}
/*! Returns nameString with all slashes replaced by underscores. */
//const char *diskName() const { return diskname; }
QCString getOutputFileBase() const { return diskname; }
/*! Returns the absolute path including the file name. */
......@@ -72,39 +71,16 @@ class FileDef : public Definition
/*! Returns the name of the verbatim copy of this file (if any). */
const char *includeName() const { return incName; }
/*! Returns the documentation that was available for this file. */
//const char *documentation() const { return doc; }
/*! Returns the brief description that was given for this file. */
//const char *briefDescription() const { return brief; }
void addSourceRef(int line,Definition *d,const char *anchor);
Definition *getSourceDefinition(int lineNr);
QCString getSourceAnchor(int lineNr);
/*! Sets the name of the include file to \a n. */
void setIncludeName(const char *n_) { incName=n_; }
/*! Sets the name of the include file to \a n. */
//void setBriefDescription(const char *b) { brief=b; }
/*! Sets the documentaton of this file to \a d. */
//void setDocumentation(const char *d) { doc=d; }
/*! Returns the absolute path of this file. */
QCString getPath() const { return path; }
/*! Returns true iff any documentation for this file is found. */
//bool hasDocumentation()
// { return extractAllFlag || !doc.isNull() || !brief.isNull(); }
/*! Returns true iff this file was externally defined
(i.e. read from a tag file) */
//bool isReference() { return !reference.isNull(); }
/*! Returns the reference name of the external file, if any or 0
if the file is not defined. */
//const char *getReference() { return reference; }
//void setFileType(FileType ft) { ftype = ft; }
//FileType fileType() const { return ftype; }
bool isLinkableInProject()
{
return hasDocumentation() && !isReference();
......@@ -115,31 +91,32 @@ class FileDef : public Definition
return isLinkableInProject() || isReference();
}
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
friend void generatedFileNames();
void insertMember(MemberDef *fd);
void insertClass(ClassDef *cd);
void insertNamespace(NamespaceDef *nd);
void computeAnchors();
void addUsingDirective(NamespaceDef *nd);
NamespaceList *getUsedNamespaces() const { return usingList; }
private:
MemberList *memList;
ClassList *classList;
FileList *includeList;
NamespaceDict *namespaceDict;
NamespaceList *namespaceList;
NamespaceList *usingList;
DefineList *defineList;
//QCString n;
//QCString doc;
//QCString brief;
//QCString reference;
QCString path;
QCString filepath;
QCString diskname;
QCString filename;
QCString incName;
//FileType ftype;
QIntDict<Definition> *srcDefDict;
QIntDict<QCString> *srcAnchorDict;
};
/*! \class FileList filedef.h
......
......@@ -17,8 +17,9 @@
#include "filename.h"
#include "util.h"
FileName::FileName(const char *n) : QList<FileDef>()
FileName::FileName(const char *fn,const char *n) : FileList()
{
fName=fn;
name=n;
}
......@@ -124,7 +125,11 @@ int FileNameList::compareItems(GCI item1, GCI item2)
{
FileName *f1=(FileName *)item1;
FileName *f2=(FileName *)item2;
return stricmp(f1->fileName(),f2->fileName());
//printf("FileNameList::compareItems `%s'<->`%s'\n",
// f1->fileName(),f2->fileName());
return Config::fullPathNameFlag ?
stricmp(f1->fullName(),f2->fullName()) :
stricmp(f1->fileName(),f2->fileName());
}
FileNameListIterator::FileNameListIterator(const FileNameList &fnlist) :
......
......@@ -21,17 +21,19 @@
#include <qdict.h>
#include "filedef.h"
class FileName : public QList<FileDef>
class FileName : public FileList
{
public:
FileName(const char *name);
FileName(const char *fn,const char *name);
~FileName();
const char *fileName() const { return name; }
const char *fullName() const { return fName; }
void generateDiskNames();
int compareItems(GCI item1,GCI item2);
private:
QCString name;
QCString fName;
};
class FileNameIterator : public QListIterator<FileDef>
......
......@@ -19,8 +19,8 @@
#include "qtbc.h"
#include <qfile.h>
#include <qtstream.h>
#include <qfileinf.h>
#include <qtextstream.h>
#include <qfileinfo.h>
#include <qdir.h>
#include "formula.h"
......@@ -131,9 +131,9 @@ void FormulaList::generateBitmaps(const char *path)
t << "1 1 1 setrgbcolor" << endl; // anti-alias to white background
t << "newpath" << endl;
t << "-1 -1 moveto" << endl;
t << x2-x1+2 << " -1 lineto" << endl;
t << x2-x1+2 << " " << y2-y1+2 << " lineto" << endl;
t << "-1 " << y2-y1+2 << " lineto" <<endl;
t << (x2-x1+2) << " -1 lineto" << endl;
t << (x2-x1+2) << " " << (y2-y1+2) << " lineto" << endl;
t << "-1 " << (y2-y1+2) << " lineto" <<endl;
t << "closepath" << endl;
t << "fill" << endl;
t << -x1 << " " << -y1 << " translate" << endl;
......
......@@ -25,6 +25,7 @@
#include "doxygen.h"
#include "logos.h"
#include "diagram.h"
#include "version.h"
#define GROUP_COLOR "#ff8080"
......@@ -35,6 +36,7 @@ HtmlGenerator::HtmlGenerator() : OutputGenerator()
if (Config::headerFile.length()>0) header=fileToString(Config::headerFile);
if (Config::footerFile.length()>0) footer=fileToString(Config::footerFile);
dir=Config::htmlOutputDir;
col=0;
}
HtmlGenerator::~HtmlGenerator()
......@@ -44,6 +46,7 @@ HtmlGenerator::~HtmlGenerator()
void HtmlGenerator::append(const OutputGenerator *g)
{
t << g->getContents();
col+=((HtmlGenerator *)g)->col;
}
void HtmlGenerator::init()
......@@ -75,19 +78,29 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
t << "doxygen=\"_doc:\" href=\"/";
else
t << "href=\"";
t << "doxygen.css\" rel=\"stylesheet\" type=\"text/css\">\n"
if (Config::htmlStyleSheet.isEmpty())
t << "doxygen.css";
else
t << Config::htmlStyleSheet;
t << "\" rel=\"stylesheet\" type=\"text/css\">\n"
"</head><body bgcolor=\"#ffffff\">\n";
}
else
{
t << substitute(
substitute(
substitute(header,"$title",lastTitle),
"$datetime",dateToString(TRUE)
substitute(
substitute(
substitute(header,"$title",lastTitle),
"$datetime",dateToString(TRUE)
),
"$date",dateToString(FALSE)
),
"$date",dateToString(FALSE)
"$doxygenversion",versionString
);
}
t << "<!-- Generated by Doxygen " << versionString << " on "
<< dateToString(TRUE) << " -->" << endl;
}
void HtmlGenerator::startQuickIndexItem(const char *s,const char *l)
......@@ -121,8 +134,8 @@ void HtmlGenerator::writeFooter(int part,bool external)
case 1:
if (footer.length()==0)
{
t << " <a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">";
t << "<img ";
t << endl << "<a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">";
t << endl << "<img ";
if (external)
{
t << "doxygen=\"_doc:\" src=\"/";
......@@ -131,13 +144,14 @@ void HtmlGenerator::writeFooter(int part,bool external)
{
t << "src=\"";
}
t << "doxygen.gif\" alt=\"doxygen\" align=center border=0 "
"width=118 height=53></a>&nbsp; ";
t << "doxygen.gif\" alt=\"doxygen\" "
<< "align=center border=0 " << endl <<
"width=118 height=53></a> " << versionString <<" ";
}
break;
default:
if (footer.length()==0)
t << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>, &copy; "
t << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>,\n &copy; "
"1997-1999</small></address>\n</body>\n</html>\n";
break;
......@@ -164,7 +178,6 @@ void HtmlGenerator::writeStyleInfo(int part)
if (part==0)
{
startPlainFile("doxygen.css");
//<< "H1 { border-width: thin; border: solid; text-align: center }" << endl
t << "H1 { text-align: center }" << endl;
t << "A.el { text-decoration: none; font-weight: bold }" << endl;
t << "DL.el { margin-left: -1cm }" << endl;
......@@ -359,7 +372,46 @@ void HtmlGenerator::docify(const char *str)
void HtmlGenerator::codify(const char *str)
{
docify(str);
//docify(str);
//static char spaces[]=" ";
if (str)
{
const char *p=str;
char c;
int spacesToNextTabStop;
while (*p)
{
c=*p++;
switch(c)
{
case '\t': spacesToNextTabStop =
Config::tabSize - (col%Config::tabSize);
t << spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': t << '\n'; col=0;
break;
case '<': t << "&lt;"; col++;
break;
case '>': t << "&gt;"; col++;
break;
case '&': t << "&amp;"; col++;
break;
case '\\':
if (*p=='<')
{ t << "&lt;"; p++; }
else if (*p=='>')
{ t << "&gt;"; p++; }
else
t << "\\";
col++;
break;
default: t << c;
col++;
break;
}
}
}
}
void HtmlGenerator::writeChar(char c)
......
......@@ -77,7 +77,7 @@ class HtmlGenerator : public OutputGenerator
const char *anchor,const char *name);
void writeCodeLink(const char *ref,const char *f,
const char *anchor,const char *name)
{ writeObjectLink(ref,f,anchor,name); }
{ writeObjectLink(ref,f,anchor,name); col+=strlen(name); }
void startTextLink(const char *file,const char *anchor);
void endTextLink();
void writeHtmlLink(const char *url,const char *text);
......@@ -107,7 +107,9 @@ class HtmlGenerator : public OutputGenerator
void writeAnchor(const char *name)
{ t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</pre></div>"; }
void endCodeFragment() { t << "</div></pre>"; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
void writeBoldString(const char *text)
{ t << "<b>"; docify(text); t << "</b>"; }
void startEmphasis() { t << "<em>"; }
......@@ -127,6 +129,8 @@ class HtmlGenerator : public OutputGenerator
void startDoxyAnchor(const char *fName,const char *clName,
const char *anchor,const char *name);
void endDoxyAnchor();
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\">"; }
void endCodeAnchor() { t << "</a>"; }
void writeLatexSpacing() {}
//void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file,
......@@ -181,6 +185,18 @@ class HtmlGenerator : public OutputGenerator
void writeNonBreakableSpace() { t << "&nbsp;&nbsp;&nbsp;"; }
void writeImage(const char *,const char *,const char *);
void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
void endDescTable()
{ t << "</table>" << endl; }
void startDescTableTitle()
{ t << "<tr><td valign=top>"; }
void endDescTableTitle()
{ t << endl << "&nbsp;</td>"; }
void startDescTableData()
{ t << "<td>" << endl; }
void endDescTableData()
{ t << "</td></tr>" << endl; }
//static void docifyStatic(QTextStream &t,const char *str);
private:
......@@ -193,6 +209,7 @@ class HtmlGenerator : public OutputGenerator
HtmlGenerator(const HtmlGenerator &g);
static HtmlHelp *htmlHelp;
int col;
};
#endif
......@@ -21,7 +21,7 @@
#define HTMLHELP_H
#include "qtbc.h"
#include <qtstream.h>
#include <qtextstream.h>
class QFile;
class HtmlHelpIndex;
......
......@@ -14,11 +14,12 @@
*
*/
#include <qtstream.h>
#include <qdatetm.h>
#include <qdir.h>
#include <stdlib.h>
#include <qtextstream.h>
#include <qdatetime.h>
#include <qdir.h>
#include "message.h"
#include "index.h"
#include "doxygen.h"
......@@ -390,6 +391,68 @@ void writeFileIndex(OutputList &ol)
ol.enable(OutputGenerator::Man);
}
//----------------------------------------------------------------------------
void writeSourceIndex(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"sources","Source Index");
startTitle(ol,0);
QCString title = Config::projectName+" "+theTranslator->trSources();
parseText(ol,title);
endTitle(ol,0,0);
HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"sources");
htmlHelp->incContentsDepth();
}
//ol.newParagraph();
//parseText(ol,theTranslator->trFileListDescription(Config::extractAllFlag));
//ol.newParagraph();
//ol.startIndexList();
bool started=FALSE;
FileName *fn=inputNameList.first();
while (fn)
{
FileDef *fd=fn->first();
while (fd)
{
if (!started)
{
started=TRUE;
ol.startItemList();
}
ol.writeListItem();
QCString path;
if (Config::fullPathNameFlag)
{
path=stripFromPath(fd->getPath().copy());
}
if (!path.isEmpty()) ol.docify(path);
ol.writeObjectLink(0,fd->sourceName(),0,fd->name());
ol.writeString("\n");
if (Config::generateHtml && Config::htmlHelpFlag)
{
HtmlHelp::getInstance()->addContentsItem(
fd->name(),fd->sourceName());
}
fd=fn->next();
}
fn=inputNameList.next();
}
if (started) ol.endItemList();
if (hasHtmlHelp)
{
htmlHelp->decContentsDepth();
}
endFile(ol);
ol.enable(OutputGenerator::Man);
}
//----------------------------------------------------------------------------
int countNamespaces()
{
......@@ -559,7 +622,7 @@ void writeAlphabeticalClassList(OutputList &ol)
}
// the number of columns in the table
const int columns = 5;
const int columns = Config::colsInAlphaIndex;
int i,j;
int totalItems = headerItems + annotatedClasses; // number of items in the table
......@@ -1052,23 +1115,27 @@ int countIncludeFiles()
FileDef *fd=includeFiles.first();
while (fd)
{
if (fd->isLinkableInProject())
{
//if (fd->isLinkableInProject())
//{
count++;
}
//}
fd=includeFiles.next();
}
return count;
}
//----------------------------------------------------------------------------
void writeHeaderFileList(OutputList &ol)
{
bool started=FALSE;
FileDef *fd=includeFiles.first();
while (fd)
{
/*
if (fd->isLinkableInProject())
{
*/
if (!started)
{
started=TRUE;
......@@ -1088,7 +1155,9 @@ void writeHeaderFileList(OutputList &ol)
HtmlHelp::getInstance()->addContentsItem(
fd->name(),fd->includeName());
}
/*
}
*/
fd=includeFiles.next();
}
if (started) ol.endItemList();
......@@ -1305,7 +1374,12 @@ void writeIndex(OutputList &ol)
// write HTML index
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex);
ol.startFile("index","Main Index",FALSE);
if (!mainPage || mainPage->title.isEmpty())
ol.startFile("index","Main Index",FALSE);
else
ol.startFile("index",mainPage->title,FALSE);
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
ol.startTitleHead(0);
if (mainPage && !mainPage->title.isEmpty())
......@@ -1338,29 +1412,32 @@ void writeIndex(OutputList &ol)
ol.enable(OutputGenerator::Latex);
ol.startFile("refman",0,FALSE);
ol.startIndexSection(isTitlePageStart);
parseText(ol,projPrefix+theTranslator->trReferenceManual());
if (!Config::projectNumber.isEmpty())
{
ol.startProjectNumber();
parseDoc(ol,0,0,Config::projectNumber);
ol.endProjectNumber();
}
ol.endIndexSection(isTitlePageStart);
ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor);
if (mainPage)
if (Config::latexHeaderFile.isEmpty())
{
ol.startIndexSection(isMainPage);
if (!mainPage->title.isEmpty())
parseText(ol,projPrefix+theTranslator->trReferenceManual());
if (!Config::projectNumber.isEmpty())
{
parseDoc(ol,0,0,mainPage->title);
ol.startProjectNumber();
parseDoc(ol,0,0,Config::projectNumber);
ol.endProjectNumber();
}
else
ol.endIndexSection(isTitlePageStart);
ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor);
if (mainPage)
{
parseText(ol,projPrefix+theTranslator->trMainPage());
ol.startIndexSection(isMainPage);
if (!mainPage->title.isEmpty())
{
parseDoc(ol,0,0,mainPage->title);
}
else
{
parseText(ol,projPrefix+theTranslator->trMainPage());
}
ol.endIndexSection(isMainPage);
}
ol.endIndexSection(isMainPage);
}
if (documentedGroups>0)
{
......@@ -1431,6 +1508,21 @@ void writeIndex(OutputList &ol)
ol.endIndexSection(isEndIndex);
endFile(ol);
if (mainPage)
{
ol.disable(OutputGenerator::Man);
startFile(ol,mainPage->name,mainPage->title);
SectionInfo *si=0;
if (mainPage->title.length()>0 && mainPage->name.length()>0 &&
(si=sectionDict[mainPage->name])!=0)
{
ol.writeSection(si->label,si->title,FALSE);
}
parseDoc(ol,0,0,mainPage->doc);
endFile(ol);
ol.enable(OutputGenerator::Man);
}
// restore generator state
if (manEnabled) ol.enable(OutputGenerator::Man);
else ol.disable(OutputGenerator::Man);
......
......@@ -19,7 +19,6 @@
#include "qtbc.h"
#include <qfile.h>
//#include <qtstream.h>
enum IndexSections
{
......@@ -47,6 +46,7 @@ void writeHierarchicalIndex(OutputList &ol);
void writeAlphabeticalIndex(OutputList &ol);
void writeClassHierarchy(OutputList &ol);
void writeFileIndex(OutputList &ol);
void writeSourceIndex(OutputList &ol);
void writeAnnotatedIndex(OutputList &ol);
void writeAnnotatedClassList(OutputList &ol);
void writeMemberIndex(OutputList &ol);
......
......@@ -19,8 +19,8 @@
#include "qtbc.h"
#include <qfile.h>
#include <qfileinf.h>
#include <qtstream.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include "instdox.h"
#include "doxygen.h"
......
......@@ -25,6 +25,7 @@
#include "util.h"
#include "diagram.h"
#include "language.h"
#include "version.h"
static QCString filterTitle(const char *s)
{
......@@ -63,8 +64,7 @@ static QCString filterTitle(const char *s)
//}
LatexGenerator::LatexGenerator()
: OutputGenerator()
LatexGenerator::LatexGenerator() : OutputGenerator()
{
dir=Config::latexOutputDir;
col=0;
......@@ -191,7 +191,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
}
if (!theTranslator->latexBabelPackage().isEmpty())
{
t << "\\usepackage{" << theTranslator->latexBabelPackage() << "}\n";
t << "\\usepackage[" << theTranslator->latexBabelPackage() << "]{babel}\n";
}
const char *s=Config::extraPackageList.first();
while (s)
......@@ -203,7 +203,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
"\\setcounter{tocdepth}{1}\n"
"\\setlength{\\footrulewidth}{0.4pt}\n"
"\\begin{document}\n"
"\\title{";
"\\begin{titlepage}\n"
"\\vspace*{7cm}\n"
"\\begin{center}\n"
"{\\Large ";
//docify(projectName);
//t << " Reference Manual";
//if (!projectNumber.isEmpty())
......@@ -221,7 +224,9 @@ void LatexGenerator::startIndexSection(IndexSections is)
case isTitlePageAuthor:
if (Config::latexHeaderFile.isEmpty())
{
t << "}\n\\author{";
t << "}\\\\" << endl
<< "\\vspace*{1cm}" << endl
<< "{\\large ";
}
break;
case isMainPage:
......@@ -347,11 +352,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isTitlePageAuthor:
if (Config::latexHeaderFile.isEmpty())
{
t << " Doxygen}\n"
"\\date{" << dateToString(TRUE) << "}\n"
"\\maketitle\n"
"\\pagenumbering{roman}\n";
t << " Doxygen " << versionString << "}\\\\" << endl
<< "\\vspace*{0.5cm}" << endl
<< "{\\small " << dateToString(TRUE) << "}\\\\" << endl
<< "\\end{center}" << endl
<< "\\end{titlepage}" << endl;
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{roman}\n";
t << "\\tableofcontents\n";
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n";
......@@ -681,6 +688,25 @@ void LatexGenerator::writeEndAnnoItem(const char *name)
// t << "}";
//}
void LatexGenerator::startTextLink(const char *f,const char *anchor)
{
if (Config::pdfHyperFlag)
{
t << "\\hyperlink{";
if (f) t << f;
if (anchor) t << "_" << anchor;
t << "}{";
}
}
void LatexGenerator::endTextLink()
{
if (Config::pdfHyperFlag)
{
t << "}";
}
}
void LatexGenerator::writeObjectLink(const char *ref, const char *f,
const char *anchor, const char *text)
{
......@@ -739,10 +765,10 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name)
<< name << "@{";
docify(name);
t << "}}" << endl;
if (Config::pdfHyperFlag && fileName)
{
t << "}" << endl;
}
}
if (Config::pdfHyperFlag && fileName)
{
t << "}" << endl;
}
}
......@@ -1040,6 +1066,7 @@ void LatexGenerator::codify(const char *str)
c=*p++;
switch(c)
{
case 0x0c: break; // remove ^L
case '\t': t << &spaces[col&7]; col+=8-(col&7); break;
case '\n': t << '\n'; col=0; break;
default: t << c; col++; break;
......
......@@ -73,8 +73,8 @@ class LatexGenerator : public OutputGenerator
const char *anchor,const char *text);
void writeCodeLink(const char *ref, const char *file,
const char *anchor,const char *text);
void startTextLink(const char *,const char *) {}
void endTextLink() {}
void startTextLink(const char *,const char *);
void endTextLink();
void writeHtmlLink(const char *,const char *);
void startTypewriter() { t << "{\\tt "; }
void endTypewriter() { t << "}"; }
......@@ -100,6 +100,8 @@ class LatexGenerator : public OutputGenerator
void writeAnchor(const char *name) { t << "\\label{" << name << "}" << endl; }
void startCodeFragment() { t << "\\small\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void startCodeLine() { col=0; }
void endCodeLine() { t << endl; }
void writeBoldString(const char *text)
{ t << "{\\bf "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\em "; }
......@@ -115,6 +117,8 @@ class LatexGenerator : public OutputGenerator
void endMemberDoc() { t << "}"; }
void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor();
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
void writeChar(char c);
void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
//void writeLatexLabel(const char *scope,const char *anchor);
......@@ -183,6 +187,17 @@ class LatexGenerator : public OutputGenerator
void writeNonBreakableSpace();
void writeImage(const char *,const char *,const char *);
void startDescTable()
{ t << "\\begin{description}" << endl; }
void endDescTable()
{ t << "\\end{description}" << endl; }
void startDescTableTitle()
{ t << "\\item[" << endl; }
void endDescTableTitle()
{ t << "]"; }
void startDescTableData() {}
void endDescTableData() {}
//static void docifyStatic(QTextStream &t,const char *str);
private:
......
......@@ -202,17 +202,22 @@ void ManGenerator::docify(const char *str)
void ManGenerator::codify(const char *str)
{
static char spaces[]=" ";
//static char spaces[]=" ";
if (str)
{
const char *p=str;
char c;
int spacesToNextTabStop;
while (*p)
{
c=*p++;
switch(c)
{
case '\t': t << &spaces[col&7]; col+=8-(col&7); break;
case '\t': spacesToNextTabStop =
Config::tabSize - (col%Config::tabSize);
t << spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': t << "\n.br\n"; firstCol=TRUE; col=0; break;
case '\\': t << "\\\\"; col++; break;
default: t << c; firstCol=FALSE; col++; break;
......
......@@ -98,6 +98,8 @@ class ManGenerator : public OutputGenerator
void writeAnchor(const char *) {}
void startCodeFragment();
void endCodeFragment();
void startCodeLine() {}
void endCodeLine() { t << endl; }
void writeBoldString(const char *text)
{ t << "\\fB"; docify(text); t << "\\fR"; firstCol=FALSE; }
void startEmphasis() { t << "\\fI"; firstCol=FALSE; }
......@@ -115,6 +117,8 @@ class ManGenerator : public OutputGenerator
void startDoxyAnchor(const char *,const char *,
const char *,const char *) {}
void endDoxyAnchor() {}
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
void writeLatexSpacing() {}
//void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file,
......@@ -172,6 +176,13 @@ class ManGenerator : public OutputGenerator
void writeNonBreakableSpace() { t << " "; }
void writeImage(const char *,const char *,const char *) {}
void startDescTable() {}
void endDescTable() {}
void startDescTableTitle() { writeListItem(); startBold(); }
void endDescTableTitle() { endBold(); }
void startDescTableData() { }
void endDescTableData() {}
private:
bool firstCol;
bool paragraph;
......
......@@ -23,6 +23,10 @@
#include "message.h"
#include "htmlhelp.h"
#include "language.h"
#include "outputlist.h"
#include "example.h"
#include "membergroup.h"
#include "scanner.h"
//-----------------------------------------------------------------------------
......@@ -435,6 +439,7 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd,
anchor(),name());
}
void MemberDef::writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,FileDef *fd,
int prevGroupId,bool inGroup)
{
......@@ -735,12 +740,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
bool hasDocs = detailsAreVisible();
if (
(memberType()==m && // filter member type
(Config::extractAllFlag || hasDocs) &&
groupId()==-1
) || /* member is part of an annonymous scope that is the type of
* another member in the list.
*/
(!hasDocs && !briefDescription().isEmpty() && annUsed)
(Config::extractAllFlag || hasDocs) &&
groupId()==-1 // not in a group
) || /* member is part of an annonymous scope that is the type of
* another member in the list.
*/
(!hasDocs && !briefDescription().isEmpty() && annUsed)
)
{
//printf("************* Writing docs for member %s\n",name().data());
......@@ -927,9 +932,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
ol.newParagraph();
if (!briefDescription().isEmpty() &&
(Config::repeatBriefFlag ||
(!Config::briefMemDescFlag && documentation().isEmpty())
) || !annMemb
(Config::repeatBriefFlag
/* || (!Config::briefMemDescFlag && documentation().isEmpty())*/
) /* || !annMemb */
)
{
parseDoc(ol,scopeName,name(),briefDescription());
......@@ -939,12 +944,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
{
parseDoc(ol,scopeName,name(),documentation()+"\n");
}
if (!bodyCode().isEmpty())
{
ol.startCodeFragment();
parseCode(ol,scopeName,bodyCode(),FALSE,0);
ol.endCodeFragment();
}
//if (!bodyCode().isEmpty())
//{
// ol.startCodeFragment();
// parseCode(ol,scopeName,bodyCode(),FALSE,0);
// ol.endCodeFragment();
//}
if (isEnumerate())
{
......@@ -959,13 +964,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
{
if (first)
{
ol.newParagraph();
//ol.newParagraph();
ol.startDescList();
ol.startBold();
parseText(ol,theTranslator->trEnumerationValues());
//ol.writeBoldString("Enumeration values:");
ol.docify(":");
ol.endBold();
ol.startItemList();
ol.endDescTitle();
ol.writeDescItem();
//ol.startItemList();
ol.startDescTable();
}
ol.addToIndex(fmd->name(),cname);
ol.addToIndex(cname,fmd->name());
......@@ -973,32 +981,47 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
{
HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor());
}
ol.writeListItem();
//ol.writeListItem();
ol.startDescTableTitle();
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name());
first=FALSE;
ol.startBold();
ol.startEmphasis();
ol.docify(fmd->name());
ol.endBold();
ol.endEmphasis();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" ");
ol.enableAll();
ol.endDescTableTitle();
ol.endDoxyAnchor();
ol.newParagraph();
//ol.newParagraph();
ol.startDescTableData();
if (!fmd->briefDescription().isEmpty())
{
parseDoc(ol,scopeName,fmd->name(),fmd->briefDescription());
//ol.newParagraph();
}
if (!fmd->briefDescription().isEmpty() &&
!fmd->documentation().isEmpty())
{
ol.newParagraph();
}
if (!fmd->documentation().isEmpty())
{
parseDoc(ol,scopeName,fmd->name(),fmd->documentation()+"\n");
}
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.enable(OutputGenerator::Man);
ol.endDescTableData();
}
fmd=fmdl->next();
}
}
if (!first) { ol.endItemList(); ol.writeChar('\n'); }
if (!first)
{
//ol.endItemList();
ol.endDescTable();
ol.endDescList();
ol.writeChar('\n');
}
}
MemberDef *bmd=reimplements();
......@@ -1128,7 +1151,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
index=newIndex+matchLen;
}
parseText(ol,reimplInLine.right(reimplInLine.length()-index));
}
}
// write the list of examples that use this member
......@@ -1145,6 +1167,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,const char *sco
//ol.endDescItem();
ol.endDescList();
}
// write reference to the source
writeSourceRef(ol);
ol.endIndent();
// enable LaTeX again
//if (Config::extractAllFlag && !hasDocs) ol.enable(OutputGenerator::Latex);
......@@ -1186,3 +1210,20 @@ bool MemberDef::isLinkable()
{
return isLinkableInProject() || isReference();
}
bool MemberDef::detailsAreVisible() const
{
return !documentation().isEmpty() || // has detailed docs
(Config::sourceBrowseFlag && bodyLine!=-1 && bodyDef) || // has reference to sources
(mtype==Enumeration && docEnumValues) || // has enum values
(mtype==EnumValue && !briefDescription().isEmpty()) || // is doc enum value
(!briefDescription().isEmpty() &&
(!Config::briefMemDescFlag || Config::alwaysDetailsFlag) &&
Config::repeatBriefFlag // has brief description inside detailed area
);
}
void MemberDef::setEnumDecl(OutputList &ed)
{
enumDeclList=new OutputList(&ed);
}
......@@ -22,15 +22,16 @@
#include <qdict.h>
#include "entry.h"
#include "example.h"
#include "config.h"
#include "outputlist.h"
#include "definition.h"
#include "scanner.h"
class FileDef;
class MemberList;
class ClassDef;
class NamespaceDef;
class MemberList;
class MemberGroup;
class ExampleList;
class ExampleDict;
class OutputList;
class MemberDef : public Definition
......@@ -71,7 +72,7 @@ class MemberDef : public Definition
const char *argsString() const { return args; }
const char *excpString() const { return exception; }
const char *anchor() const { return anc; }
QCString bodyCode() const { return body; }
//QCString bodyCode() const { return body; }
ClassDef *memberClass() { return classDef; }
Protection protection() const { return prot; }
Specifier virtualness() const { return virt; }
......@@ -84,7 +85,7 @@ class MemberDef : public Definition
void setFileDec(FileDef *fd) { fileDec=fd; }
void setAnchor(const char *a) { anc=a; }
void setProtection(Protection p) { prot=p; }
void setBody(const QCString &b) { body=b; }
//void setBody(const QCString &b) { body=b; }
void setInline(bool in) { inLine=in; }
FileDef *getFileDef() { return fileDef; }
FileDef *getFileDec() { return fileDec; }
......@@ -93,19 +94,12 @@ class MemberDef : public Definition
bool isStatic() const { return stat; }
bool isInline() const { return inLine; }
bool hasDocumentation() // overrides hasDocumentation in definition.h
{ return Definition::hasDocumentation() || !body.isEmpty(); }
{ return Definition::hasDocumentation(); }
bool isLinkableInProject();
bool isLinkable();
bool detailsAreVisible() const
{ return !documentation().isEmpty() || !body.isEmpty() ||
(mtype==Enumeration && docEnumValues) ||
(mtype==EnumValue && !briefDescription().isEmpty()) ||
(!briefDescription().isEmpty() &&
!Config::briefMemDescFlag && Config::repeatBriefFlag);
}
bool detailsAreVisible() const;
// relation to other members
void setReimplements(MemberDef *md) { redefines=md; }
void insertReimplementedBy(MemberDef *md);
......@@ -116,7 +110,7 @@ class MemberDef : public Definition
void insertEnumField(MemberDef *md);
void setEnumScope(MemberDef *md) { enumScope=md; }
MemberDef *getEnumScope() const { return enumScope; }
void setEnumDecl(OutputList &ed) { enumDeclList=new OutputList(&ed); }
void setEnumDecl(OutputList &ed);
void setEnumUsed() { eUsed=TRUE; }
bool enumUsed() const { return eUsed; }
OutputList *enumDecl() const { return enumDeclList; }
......@@ -202,13 +196,13 @@ class MemberDef : public Definition
QCString type; // return type
QCString args; // function arguments/variable array specifiers
QCString exception; // exceptions that can be thrown
QCString body; // function body code
//QCString body; // function body code
QCString decl; // member declaration in class
QCString declFile; // file where the declaration was found
int declLine; // line where the declaration was found
int declLine; // line where the declaration was found
QCString def; // member definition in code (fully qualified name)
QCString defFile; // file where the definition was found
int defLine; // line where the definition was found
int defLine; // line where the definition was found
QCString anc; // HTML anchor name
Specifier virt; // normal/virtual/pure virtual
Protection prot; // protection type [Public/Protected/Private]
......
......@@ -23,6 +23,7 @@
#include "namespacedef.h"
#include "filedef.h"
#include "language.h"
#include "scanner.h"
static QCString idToName(int id)
{
......
......@@ -19,6 +19,7 @@
#include "qtbc.h"
#include <qlist.h>
#include <qintdict.h>
#include "definition.h"
......@@ -59,4 +60,10 @@ class MemberGroupListIterator : public QListIterator<MemberGroup>
QListIterator<MemberGroup>(l) {}
};
class MemberGroupDict : public QIntDict<MemberGroup>
{
public:
MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
};
#endif
......@@ -21,6 +21,8 @@
#include "util.h"
#include "language.h"
#include "doxygen.h"
#include "outputlist.h"
#include "scanner.h"
MemberList::MemberList() : QList<MemberDef>()
{
......
......@@ -30,6 +30,7 @@ NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name)
fileName="namespace_"+nameToFile(name);
classList = new ClassList;
memList = new MemberList;
usingList = 0;
setReference(ref);
}
......@@ -37,6 +38,7 @@ NamespaceDef::~NamespaceDef()
{
delete classList;
delete memList;
delete usingList;
}
void NamespaceDef::insertUsedFile(const char *f)
......@@ -240,3 +242,12 @@ int NamespaceDef::countMembers()
memList->countDocMembers();
return memList->totalCount()+classList->count();
}
void NamespaceDef::addUsingDirective(NamespaceDef *nd)
{
if (usingList==0)
{
usingList = new NamespaceList;
}
usingList->append(nd);
}
......@@ -27,6 +27,7 @@ class OutputList;
class ClassList;
class MemberList;
class MemberDef;
class NamespaceList;
class NamespaceDef : public Definition
{
......@@ -41,6 +42,8 @@ class NamespaceDef : public Definition
void insertMember(MemberDef *md);
void computeAnchors();
int countMembers();
void addUsingDirective(NamespaceDef *nd);
NamespaceList *getUsedNamespaces() const { return usingList; }
//const char *getReference() { return reference; }
//bool isVisible()
//{
......@@ -71,6 +74,7 @@ class NamespaceDef : public Definition
QStrList files;
ClassList *classList;
MemberList *memList;
NamespaceList *usingList;
};
class NamespaceList : public QList<NamespaceDef>
......
......@@ -18,7 +18,7 @@
#define OUTPUTGEN_H
#include "qtbc.h"
#include <qtstream.h>
#include <qtextstream.h>
#include <qbuffer.h>
#include <qfile.h>
#include "index.h"
......@@ -105,6 +105,8 @@ class OutputGenerator
virtual void writeAnchor(const char *name) = 0;
virtual void startCodeFragment() = 0;
virtual void endCodeFragment() = 0;
virtual void startCodeLine() = 0;
virtual void endCodeLine() = 0;
virtual void writeBoldString(const char *text) = 0;
virtual void startEmphasis() = 0;
virtual void endEmphasis() = 0;
......@@ -115,6 +117,8 @@ class OutputGenerator
virtual void startDoxyAnchor(const char *fileName,const char *clName,
const char *anchor,const char *name) = 0;
virtual void endDoxyAnchor() = 0;
virtual void startCodeAnchor(const char *label) = 0;
virtual void endCodeAnchor() = 0;
virtual void writeLatexSpacing() = 0;
//virtual void writeLatexLabel(const char *clName,const char *anchor) = 0;
virtual void writeStartAnnoItem(const char *type,const char *file,
......@@ -177,6 +181,13 @@ class OutputGenerator
virtual void writeNonBreakableSpace() = 0;
virtual void writeImage(const char *,const char *,const char *) = 0;
virtual void startDescTable() = 0;
virtual void endDescTable() = 0;
virtual void startDescTableTitle() = 0;
virtual void endDescTableTitle() = 0;
virtual void startDescTableData() = 0;
virtual void endDescTableData() = 0;
void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name);
......
......@@ -169,6 +169,10 @@ class OutputList
{ forall(&OutputGenerator::startCodeFragment); }
void endCodeFragment()
{ forall(&OutputGenerator::endCodeFragment); }
void startCodeLine()
{ forall(&OutputGenerator::startCodeLine); }
void endCodeLine()
{ forall(&OutputGenerator::endCodeLine); }
void writeBoldString(const char *text)
{ forall(&OutputGenerator::writeBoldString,text); }
void startEmphasis()
......@@ -187,6 +191,10 @@ class OutputList
{ forall(&OutputGenerator::startDoxyAnchor,fn,cn,anchor,name); }
void endDoxyAnchor()
{ forall(&OutputGenerator::endDoxyAnchor); }
void startCodeAnchor(const char *label)
{ forall(&OutputGenerator::startCodeAnchor,label); }
void endCodeAnchor()
{ forall(&OutputGenerator::endCodeAnchor); }
void writeLatexSpacing()
{ forall(&OutputGenerator::writeLatexSpacing); }
//void writeLatexLabel(const char *scope,const char *anchor)
......@@ -308,6 +316,19 @@ class OutputList
void writeImage(const char *n,const char *w,const char *h)
{ forall(&OutputGenerator::writeImage,n,w,h); }
void startDescTable()
{ forall(&OutputGenerator::startDescTable); }
void endDescTable()
{ forall(&OutputGenerator::endDescTable); }
void startDescTableTitle()
{ forall(&OutputGenerator::startDescTableTitle); }
void endDescTableTitle()
{ forall(&OutputGenerator::endDescTableTitle); }
void startDescTableData()
{ forall(&OutputGenerator::startDescTableData); }
void endDescTableData()
{ forall(&OutputGenerator::endDescTableData); }
private:
void debug();
void clear();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -19,7 +19,9 @@
#include "qtbc.h"
#include <stdio.h>
#include <qfile.h>
//#include <qfile.h>
class BufStr;
void initPreprocessor();
void addSearchDir(const char *dir);
......
......@@ -32,14 +32,16 @@
#include <qstrlist.h>
#include <qdict.h>
#include <qregexp.h>
#include <qfileinfo.h>
#include "constexp.h"
#include "define.h"
#include "doxygen.h"
#include "message.h"
#include "util.h"
#include "defargs.h"
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
#define pclose _pclose
#endif
......@@ -743,10 +745,13 @@ void addDefine()
FileDef *fd=findFileDef(&inputNameDict,yyFileName,ambig);
MemberDef *md=new MemberDef("#define",defName,defArgsStr,0,
Public,Normal,FALSE,FALSE,MemberDef::Define,0,0);
ArgumentList *argList = new ArgumentList;
stringToArgumentList(defArgsStr,argList);
md->setArgumentList(argList);
md->setDefFile(yyFileName);
md->setDefLine(yyLineNr);
md->setFileDef(fd);
md->setDefinition("#define "+defName+defArgsStr);
md->setDefinition("#define "+defName);
MemberName *mn=functionNameDict[defName];
if (mn==0)
......@@ -1301,7 +1306,7 @@ BN [ \t\r\n]
//printf("Error: define %s is defined more than once!\n",defName.data());
}
}
outputChar('\n');
//outputChar('\n');
lastGuardName.resize(0);
BEGIN(Start);
}
......@@ -1464,6 +1469,8 @@ BN [ \t\r\n]
<DefineText>\' { defText += *yytext;
BEGIN(SkipSingleQuote);
}
<SkipDoubleQuote>"//" { defText += yytext; }
<SkipDoubleQuote>"/*" { defText += yytext; }
<SkipDoubleQuote>\" {
defText += *yytext;
BEGIN(DefineText);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -27,7 +27,7 @@
#include "membergroup.h"
class OutputList;
typedef QIntDict<MemberGroup> MemberGroupDict;
//typedef QIntDict<MemberGroup> MemberGroupDict;
typedef QIntDictIterator<MemberGroup> MemberGroupDictIterator;
extern void parseMain(Entry *);
......
......@@ -39,6 +39,7 @@
#include "index.h"
#include "defargs.h"
#include "language.h"
#include "outputlist.h"
#ifndef WIN32
#include <unistd.h>
......@@ -544,6 +545,11 @@ static bool inBlock()
static void endBlock()
{
if (inParamBlock || inRetValBlock)
{
outDoc->endDescTableData();
outDoc->endDescTable();
}
outDoc->endDescList();
inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock=
inVersionBlock=inDateBlock=inBugBlock=inWarningBlock=
......@@ -610,10 +616,107 @@ static void checkDocs()
}
}
static bool curLatexState;
static bool curManState;
static bool curHtmlState;
static void storeOutputListState()
{
curLatexState = outDoc->isEnabled(OutputGenerator::Latex);
curHtmlState = outDoc->isEnabled(OutputGenerator::Html);
curManState = outDoc->isEnabled(OutputGenerator::Man);
}
static void restoreOutputListState()
{
if (curLatexState)
outDoc->enable(OutputGenerator::Latex);
else
outDoc->disable(OutputGenerator::Latex);
if (curHtmlState)
outDoc->enable(OutputGenerator::Html);
else
outDoc->disable(OutputGenerator::Html);
if (curManState)
outDoc->enable(OutputGenerator::Man);
else
outDoc->disable(OutputGenerator::Man);
}
enum ImageTypes
{
IT_Html,
IT_Latex
};
// search for an image in the imageNameDict and if found
// copies the image to the output directory (which is the
// html directory if type==0 or the latex directory if type==1)
static QCString findAndCopyImage(const char *fileName,ImageTypes type)
{
QCString result;
bool ambig;
FileDef *fd;
if ((fd=findFileDef(&imageNameDict,fileName,ambig)))
{
QFile inImage(fd->absFilePath());
if (inImage.open(IO_ReadOnly))
{
result = fileName;
int i;
if ((i=result.findRev('/'))!=-1 || (i=result.findRev('\\'))!=-1)
{
result.right(result.length()-i-1);
}
QCString outputDir;
switch(type)
{
case IT_Html:
outputDir = Config::htmlOutputDir;
break;
case IT_Latex:
outputDir = Config::latexOutputDir;
break;
}
QCString outputFile = outputDir+"/"+result;
QFile outImage(outputFile);
if (outImage.open(IO_WriteOnly)) // copy the image
{
char *buffer = new char[inImage.size()];
inImage.readBlock(buffer,inImage.size());
outImage.writeBlock(buffer,inImage.size());
outImage.flush();
delete buffer;
}
else
{
warn("Warning: could not write output image %s\n",outputFile.data());
}
}
else
{
warn("Warning: could not open image %s\n",fileName);
}
}
else if (ambig)
{
warn("Warning: image file name %s is ambigious.\n",fileName);
warn("Possible candidates:\n");
//includeFileList.writeMatches(fileName);
showFileDefMatches(&imageNameDict,fileName);
}
else
{
warn("Warning: image file %s is not found. ",fileName);
warn("Check your IMAGE_PATH\n");
}
return result;
}
/* ----------------------------------------------------------------- */
static void addToBody(const char *text);
static void addToBodyCond(const char *text);
//static void addToBody(const char *text);
//static void addToBodyCond(const char *text);
/* ----------------------------------------------------------------- */
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
......@@ -709,6 +812,7 @@ VAR [vV][aA][rR]
%x Array
%x Curly
%x Using
%x UsingDirective
%x NameSpaceDocArg1
%x SkipCurly
%x SkipCurlyCpp
......@@ -834,7 +938,7 @@ VAR [vV][aA][rR]
warn("Warning: Missing \\endmgroup in file %s\n",yyFileName);
memberGroupId=-1;
}
yyLineNr= 1 ;
yyLineNr= 0 ; // there is always an extra newline at the start of the file
int i;
for( i = 0 ; yytext[i+1] != 6 ; i++ )
yyFileName[i] = yytext[i+1] ;
......@@ -962,7 +1066,9 @@ VAR [vV][aA][rR]
}
<DocLinkText>. { linkText += *yytext; }
<DocLinkText>"\n" { linkText += " "; }
<DocLink,DocLinkText>("\\"|"@")"endlink"/[^a-z_A-Z0-9] { // <- needed for things like \endlink.
<DocLink,DocLinkText>("\\"|"@")"endlink" { // <- needed for things like \endlink.
//printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n",
// className.data(),linkRef.data(),linkText.data());
generateLink(*outDoc,className,linkRef,inSeeBlock,linkText);
BEGIN( DocScan );
}
......@@ -1162,6 +1268,12 @@ VAR [vV][aA][rR]
scanString(theTranslator->trParameters()+": ");
outDoc->endBold();
outDoc->endDescTitle();
outDoc->writeDescItem();
outDoc->startDescTable();
}
else
{
outDoc->endDescTableData();
}
BEGIN(DocParam);
}
......@@ -1176,6 +1288,12 @@ VAR [vV][aA][rR]
scanString(theTranslator->trReturnValues()+": ");
outDoc->endBold();
outDoc->endDescTitle();
outDoc->writeDescItem();
outDoc->startDescTable();
}
else
{
outDoc->endDescTableData();
}
BEGIN(DocParam);
}
......@@ -1195,12 +1313,13 @@ VAR [vV][aA][rR]
BEGIN(DocException);
}
<DocScan>"\\capt".*
<DocParam>[a-z_A-Z0-9:]+ {
outDoc->writeDescItem();
<DocParam>([a-z_A-Z0-9:]+)|("\"".*"\"") {
outDoc->startDescTableTitle();
outDoc->startEmphasis();
outDoc->docify(yytext);
outDoc->endEmphasis();
outDoc->docify(" - ");
outDoc->endDescTableTitle();
outDoc->startDescTableData();
BEGIN(DocScan);
}
<DocException>{SCOPENAME} {
......@@ -1320,32 +1439,43 @@ VAR [vV][aA][rR]
<DocImage>[lL][aA][tT][eE][xX] {
BEGIN(DocLatexImageName);
}
<DocHtmlImageName>{FILE}|{URLMASK} {
outDoc->disableAllBut(OutputGenerator::Html);
outDoc->writeImage(yytext,0,0);
outDoc->enableAll();
<DocHtmlImageName>{FILE} {
curImageName = findAndCopyImage(yytext,IT_Html);
if (!curImageName.isEmpty())
{
storeOutputListState();
outDoc->disableAllBut(OutputGenerator::Html);
outDoc->writeImage(curImageName,0,0);
restoreOutputListState();
}
BEGIN(DocScan);
}
<DocLatexImageName>{FILE} {
curImageName = yytext;
BEGIN(DocLatexImageWidth);
curImageName = findAndCopyImage(yytext,IT_Latex);
if (curImageName.isEmpty())
BEGIN(DocScan);
else
BEGIN(DocLatexImageWidth);
}
<DocLatexImageWidth>\n { // no width specified
outDoc->disableAllBut(OutputGenerator::Html);
storeOutputListState();
outDoc->disableAllBut(OutputGenerator::Latex);
outDoc->writeImage(curImageName,0,0);
outDoc->enableAll();
restoreOutputListState();
BEGIN(DocScan);
}
<DocLatexImageWidth>"width"{B}*"="{B}*[0-9\.]+({B}*{ID})? {
storeOutputListState();
outDoc->disableAllBut(OutputGenerator::Latex);
outDoc->writeImage(curImageName,yytext,0);
outDoc->enableAll();
restoreOutputListState();
BEGIN(DocScan);
}
<DocLatexImageWidth>"height"{B}*"="{B}*[0-9\.]+({B}*{ID})? {
storeOutputListState();
outDoc->disableAllBut(OutputGenerator::Latex);
outDoc->writeImage(curImageName,0,yytext);
outDoc->enableAll();
restoreOutputListState();
BEGIN(DocScan);
}
<DocImage>[a-z_A-Z0-9\.\-]+ {
......@@ -1353,11 +1483,10 @@ VAR [vV][aA][rR]
}
<DocImage,DocHtmlImageName,DocLatexImageName>\n {
warn("Warning: invalid \\image command found!\n");
yyLineNr++;
outDoc->enableAll();
BEGIN(DocScan);
}
<DocScan>("\\"|"@")"code"/{BN}+ {
<DocScan>("\\"|"@")"code"({BN}*"\n"|{B}*) {
outDoc->startCodeFragment();
codeBlock.resize(0);
BEGIN( DocCodeBlock );
......@@ -1494,9 +1623,11 @@ VAR [vV][aA][rR]
<DocScan>"</"{DFN}{ATTR}">" { outDoc->endTypewriter(); }
<DocScan>"<"{VAR}{ATTR}">" { outDoc->startEmphasis(); }
<DocScan>"</"{VAR}{ATTR}">" { outDoc->endEmphasis(); }
<DocScan>"<"{IMG}{ATTR}">" { outDoc->disableAllBut(OutputGenerator::Html);
<DocScan>"<"{IMG}{ATTR}">" {
storeOutputListState();
outDoc->disableAllBut(OutputGenerator::Html);
outDoc->writeString(yytext);
outDoc->enableAll();
restoreOutputListState();
}
<DocScan>"<"{PRE}{ATTR}">" {
outDoc->startCodeFragment();
......@@ -1789,6 +1920,7 @@ VAR [vV][aA][rR]
current->type = "namespace" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount();
BEGIN( ClassName );
}
......@@ -1798,6 +1930,7 @@ VAR [vV][aA][rR]
current->type = "module" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount();
BEGIN( ClassName );
}
......@@ -1808,6 +1941,7 @@ VAR [vV][aA][rR]
current->type += " interface" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount();
BEGIN( ClassName );
}
......@@ -1818,6 +1952,7 @@ VAR [vV][aA][rR]
current->type += " class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount() ;
BEGIN( ClassName ) ;
}
......@@ -1828,6 +1963,7 @@ VAR [vV][aA][rR]
current->type += " struct" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount() ;
BEGIN( ClassName ) ;
}
......@@ -1838,6 +1974,7 @@ VAR [vV][aA][rR]
current->type += " union" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount() ;
BEGIN( ClassName ) ;
}
......@@ -1848,6 +1985,7 @@ VAR [vV][aA][rR]
current->type += " enum" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
lineCount() ;
BEGIN( ClassName ) ;
}
......@@ -1904,9 +2042,26 @@ VAR [vV][aA][rR]
//printf("Start template list\n");
BEGIN( ReadTempArgs );
}
/* for now the using statement is completely ignored */
<FindMembers>"using"{BN}+ { lineCount(); BEGIN(Using); }
<FindMembers>"using"{BN}+ {
current->startLine=yyLineNr;
lineCount();
BEGIN(Using);
}
<Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); }
<Using>";" { BEGIN(FindMembers); }
<UsingDirective>{SCOPENAME} { current->name=yytext;
current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC;
printf("Found using directive %s\n",yytext);
current_root->addSubEntry(current);
current = new Entry ;
current->protection = protection ;
current->sig = sig;
current->virt = virt;
current->stat = gstat;
current->slot = slot;
BEGIN(Using);
}
<FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl
QCString n=yytext;
addType( current );
......@@ -2001,7 +2156,7 @@ VAR [vV][aA][rR]
current->name += yytext;
}
QCString tmp=yytext;
if (tmp.right(8)=="operator")
if (nameIsOperator(tmp))
BEGIN( Operator );
else
BEGIN(FindMembers);
......@@ -2010,6 +2165,7 @@ VAR [vV][aA][rR]
BEGIN( SkipCPP ) ;
}
<FindMembers>{B}*"#"{B}*"define" {
current->bodyLine = yyLineNr;
BEGIN( Define );
}
<SkipCPP>.
......@@ -2018,6 +2174,7 @@ VAR [vV][aA][rR]
BEGIN( lastCPPContext) ;
}
<Define>{ID}/"(" {
current->bodyLine = yyLineNr;
current->name = yytext;
BEGIN( DefineArg );
}
......@@ -2031,11 +2188,13 @@ VAR [vV][aA][rR]
}
<Define>{ID} {
//printf("Define `%s' without args\n",yytext);
current->bodyLine = yyLineNr;
current->name = yytext;
BEGIN(DefineEnd);
}
<DefineEnd>\n {
//printf("End define\n");
yyLineNr++;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->type.resize(0);
......@@ -2051,12 +2210,20 @@ VAR [vV][aA][rR]
current->slot = slot;
BEGIN(FindMembers);
}
<DefineEnd>\\\n
<DefineEnd>\\\n {
yyLineNr++;
}
<DefineEnd>\" {
lastStringContext=DefineEnd;
BEGIN(SkipString);
}
<DefineEnd>.
<FindMembers>[*&]+ { current->name += yytext ; }
<FindMembers,MemberSpec,Function,NextSemi>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
if (current->bodyLine==-1)
current->bodyLine=yyLineNr;
lastAfterDocContext = YY_START;
afterDocTerminator = ';';
if (yytext[yyleng-3]=='/')
......@@ -2119,6 +2286,7 @@ VAR [vV][aA][rR]
}
}
<FindMembers>"=" {
current->bodyLine=yyLineNr;
BEGIN(NextSemi);
}
<FindMembers>[:;,] {
......@@ -2126,21 +2294,23 @@ VAR [vV][aA][rR]
QCString oldDocs = current->doc.copy();
if ( *yytext != ':')
{
current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace();
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current_root->addSubEntry( current ) ;
current = new Entry ;
// variable found
current->section = Entry::EMPTY_SEC ;
current->protection = protection;
current->slot = slot = FALSE;
current->sig = sig = FALSE;
current->virt = Normal;
current->stat = gstat;
if (current->bodyLine==-1)
current->bodyLine = yyLineNr;
current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace();
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current_root->addSubEntry( current ) ;
current = new Entry ;
// variable found
current->section = Entry::EMPTY_SEC ;
current->protection = protection;
current->slot = slot = FALSE;
current->sig = sig = FALSE;
current->virt = Normal;
current->stat = gstat;
}
// skip expression or bitfield if needed
if ( *yytext == ':')
......@@ -2405,6 +2575,7 @@ VAR [vV][aA][rR]
<Curly>. { current->program += yytext ; }
<FindMembers>"("({ID}{BN}*"::"{BN}*)*("*"{BN}*)+ {
current->bodyLine = yyLineNr;
lineCount();
addType(current);
funcPtrType=yytext;
......@@ -2479,6 +2650,7 @@ VAR [vV][aA][rR]
current->type += *yytext;
}
<FindMembers>"(" { current->args = yytext;
current->bodyLine = yyLineNr;
currentArgumentContext = FuncQual;
copyArgString=&current->args;
BEGIN( ReadFuncArgType ) ;
......@@ -2701,8 +2873,8 @@ VAR [vV][aA][rR]
current->proto = TRUE;
}
}
//printf("Adding entry `%s' inLine`%d'\n",
// current->name.data(),current->inLine);
//printf("Adding entry `%s' inLine`%d' bodyLine=`%d'\n",
// current->name.data(),current->inLine,current->bodyLine);
previous = current;
current_root->addSubEntry(current);
current = new Entry ;
......@@ -2717,29 +2889,33 @@ VAR [vV][aA][rR]
{
if (current_root->section & Entry::COMPOUND_MASK)
previous->inLine = TRUE;
addToBody(yytext);
//addToBody(yytext);
BEGIN( SkipCurly ) ;
}
else if( *yytext == ':' )
{
addToBody(yytext);
//addToBody(yytext);
BEGIN( SkipInits ) ;
}
else
{
if (previous->section!=Entry::VARIABLE_SEC)
previous->bodyLine=-1; // a function/member declaration
BEGIN( FindMembers ) ;
}
}
<SkipInits>"{" {
addToBody(yytext);
//addToBody(yytext);
lastCurlyContext = FindMembers;
BEGIN( SkipCurly ) ;
}
<SkipCurly>"{" {
addToBody(yytext);
//addToBody(yytext);
++bracketCount ;
}
<SkipCurly>"}" {
addToBody(yytext);
//addToBody(yytext);
if( bracketCount )
--bracketCount ;
else
......@@ -2748,7 +2924,7 @@ VAR [vV][aA][rR]
<SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" {
if ( bracketCount )
{
addToBody(yytext);
//addToBody(yytext);
--bracketCount ;
}
else
......@@ -2769,73 +2945,73 @@ VAR [vV][aA][rR]
}
}
<SkipCurlyEndDoc>"}" {
addToBody("}");
//addToBody("}");
current = tempEntry;
BEGIN( lastCurlyContext );
}
<SkipCurly>"'"\\[0-7]{1,3}"'" {
addToBody(yytext);
//addToBody(yytext);
}
<SkipCurly>"'"\\."'" {
addToBody(yytext);
//addToBody(yytext);
}
<SkipCurly>"'"."'" {
addToBody(yytext);
//addToBody(yytext);
}
<SkipCurly>\" {
addToBody(yytext);
//addToBody(yytext);
lastStringContext=SkipCurly;
BEGIN( SkipString );
}
<SkipCurly>^{B}*"#" {
addToBody(yytext);
//addToBody(yytext);
BEGIN( SkipCurlyCpp );
}
<SkipCurly,SkipInits>\n {
yyLineNr++;
addToBody(yytext);
//addToBody(yytext);
}
<SkipCurly,SkipCurlyCpp>. {
addToBody(yytext);
//addToBody(yytext);
}
<SkipCurlyCpp>\n {
addToBody(yytext);
//addToBody(yytext);
yyLineNr++;
lastCurlyContext = FindMembers;
BEGIN( SkipCurly );
}
<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
addToBody(yytext);
//addToBody(yytext);
yyLineNr++;
}
<SkipInits,SkipCurly,SkipCurlyCpp>"/*" {
addToBody(yytext);
//addToBody(yytext);
}
<SkipInits,SkipCurly,SkipCurlyCpp>"*/" {
addToBody(yytext);
//addToBody(yytext);
}
<SkipInits,SkipCurly,SkipCurlyCpp>"//".* {
addToBody(yytext);
//addToBody(yytext);
}
<SkipInits,SkipCurly,SkipCurlyCpp>. {
addToBody(yytext);
//addToBody(yytext);
}
<SkipString>\\. {
addToBodyCond(yytext);
//addToBodyCond(yytext);
}
<SkipString>\" {
addToBodyCond(yytext);
//addToBodyCond(yytext);
BEGIN( lastStringContext );
}
<SkipString>"/*"|"*/"|"//" {
addToBodyCond(yytext);
//addToBodyCond(yytext);
}
<SkipString>\n {
yyLineNr++;
addToBodyCond(yytext);
//addToBodyCond(yytext);
}
<SkipString>. {
addToBodyCond(yytext);
//addToBodyCond(yytext);
}
<Bases,ClassName>";" {
current->section = Entry::EMPTY_SEC ;
......@@ -2847,6 +3023,7 @@ VAR [vV][aA][rR]
}
<ClassName>{SCOPENAME} {
current->name = yytext ;
lineCount();
BEGIN( ClassVar );
}
/*
......@@ -2978,6 +3155,7 @@ VAR [vV][aA][rR]
<Comment>. { current->program += *yytext ; }
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator>("//"{B}*)?"/*!" {
//printf("Start doc block at %d\n",yyLineNr);
removeSlashes=(yytext[1]=='/');
tmpDocType=-1;
if (YY_START==Curly)
......@@ -3087,9 +3265,9 @@ VAR [vV][aA][rR]
current->brief+=".";
BEGIN( tmpDocType );
}
<JavaDoc>("\\"|"@")"internal" {
current->doc+="\\internal";
BEGIN( tmpDocType );
<JavaDoc>("\\"|"@")("image"|"author"|"internal"|"version"|"date"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see") {
current->doc+=yytext;
BEGIN( tmpDocType );
}
<Doc,JavaDoc>{B}*("\\"|"@")("fn"|"var"|"typedef"){B}* {
current->section = Entry::MEMBERDOC_SEC;
......@@ -3468,7 +3646,10 @@ VAR [vV][aA][rR]
}
<ReadFormulaShort>"\\f$" {
formulaText+="$";
if (lastFormulaContext==ClassDocBrief)
if (lastFormulaContext==ClassDocBrief ||
lastFormulaContext==LineDoc ||
lastFormulaContext==JavaDoc
)
current->brief += addFormula();
else
current->doc += addFormula();
......@@ -3476,16 +3657,26 @@ VAR [vV][aA][rR]
}
<ReadFormulaLong>"\\f]" {
formulaText+="\\]";
if (lastFormulaContext==ClassDocBrief)
if (lastFormulaContext==ClassDocBrief ||
lastFormulaContext==LineDoc ||
lastFormulaContext==JavaDoc
)
current->brief += addFormula();
else
current->doc += addFormula();
BEGIN(lastFormulaContext);
}
<ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; }
<ExampleDoc,PageDoc,ClassDocBrief,ClassDoc>"*/" {
<ExampleDoc,PageDoc,ClassDocBrief,SkipCode,ClassDoc>{B}*"*/" {
checkDocs();
if (YY_START==ClassDocBrief &&
if (YY_START==SkipCode) // premature end of code block
{
err("Error: comment block ended inside \\code ... \\endcode block at line %d in %s!\n",
yyLineNr,yyFileName);
current->doc += "\\endcode\n\n";
BEGIN( lastDocContext );
}
else if (YY_START==ClassDocBrief &&
lastBriefContext==Doc)
{
current->doc += "\n\n";
......@@ -3549,7 +3740,10 @@ VAR [vV][aA][rR]
current->brief=current->brief.stripWhiteSpace();
BEGIN( lastBriefContext );
}
<ClassDocBrief>{BS}/("\\"|"@")"image" { BEGIN( lastBriefContext ); }
<ClassDocBrief>{BS}/("\\"|"@")("image"|"author"|"internal"|"version"|"date"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see") {
BEGIN( lastBriefContext );
}
/*
<ClassDocBrief>{BS}/("\\"|"@")"author" { BEGIN( lastBriefContext ); }
<ClassDocBrief>{BS}/("\\"|"@")"internal" { BEGIN( lastBriefContext ); }
<ClassDocBrief>{BS}/("\\"|"@")"version" { BEGIN( lastBriefContext ); }
......@@ -3561,6 +3755,7 @@ VAR [vV][aA][rR]
<ClassDocBrief>{BS}/("\\"|"@")"bug" { BEGIN( lastBriefContext ); }
<ClassDocBrief>{BS}/("\\"|"@")"warning" { BEGIN( lastBriefContext ); }
<ClassDocBrief>{BS}/("\\"|"@")"par"{BN}+ { BEGIN( lastBriefContext ); }
*/
<ClassDocBrief>{BS}/("\\brief"|"@short"){BN}+ {
lastBriefContext=YY_START;
BEGIN( ClassDocBrief );
......@@ -3653,7 +3848,7 @@ VAR [vV][aA][rR]
<Doc>. { current->doc += *yytext; }
<DefLineDoc,LineDoc>. { current->brief += *yytext; }
<Doc>\n { yyLineNr++; current->doc += *yytext; }
<LineDoc>[\n\r]{B}*"//"[!/]
<LineDoc>[\n\r]+{B}*"//"[!/] { lineCount(); }
<LineDoc>\n {
yyLineNr++;
BEGIN( lastDocContext );
......@@ -3666,6 +3861,7 @@ VAR [vV][aA][rR]
<AfterDocLine>"/*"|"//" { current->brief+=yytext; }
<AfterDocLine>\n {
yyLineNr++;
if (afterDocTerminator!=0)
unput(afterDocTerminator);
BEGIN(lastAfterDocContext);
......@@ -3701,7 +3897,7 @@ VAR [vV][aA][rR]
unput(afterDocTerminator);
BEGIN(lastAfterDocContext);
}
<ClassDocRelates,ClassDocFunc,ClassDocDefine,GroupDocArg1,ClassDocArg1,SectionTitle,EnumDocArg1,FileDocArg1,PageDocArg1,ExampleDocArg1,ClassDefineArgs>"*/" {
<ClassDocRelates,ClassDocFunc,ClassDocDefine,GroupDocArg1,ClassDocArg1,SectionTitle,EnumDocArg1,FileDocArg1,PageDocArg1,ExampleDocArg1,ClassDefineArgs,GroupName>"*/" {
current->doc += "\n\n";
err("Warning: unexpected end of "
"documentation block found in "
......@@ -3711,6 +3907,7 @@ VAR [vV][aA][rR]
<Doc>"*/" {
checkDocs();
current->doc += "\n\n";
//printf("End of docs at line %d\n",yyLineNr);
BEGIN( lastDocContext );
}
<JavaDoc>"*/" {
......@@ -3723,6 +3920,7 @@ VAR [vV][aA][rR]
<SkipCxxComment>.*\n { yyLineNr++ ;
BEGIN( lastCContext ) ;
}
<SkipComment>[^\*\n]+
<*>.
<*>\n { yyLineNr++ ; }
<SkipComment>"//"|"/*"
......@@ -3738,17 +3936,17 @@ VAR [vV][aA][rR]
//----------------------------------------------------------------------------
static void addToBody(const char *text)
{
if (Config::includeSourceFlag)
previous->body+=text;
}
//static void addToBody(const char *text)
//{
// if (Config::includeSourceFlag)
// previous->body+=text;
//}
static void addToBodyCond(const char *text)
{
if (Config::includeSourceFlag && lastStringContext==SkipCurly)
previous->body+=text;
}
//static void addToBodyCond(const char *text)
//{
// if (Config::includeSourceFlag && lastStringContext==SkipCurly)
// previous->body+=text;
//}
//----------------------------------------------------------------------------
......@@ -3809,6 +4007,7 @@ void parseCompounds(Entry *rt)
current_root = ce ;
strcpy( yyFileName, ce->fileName ) ;
yyLineNr = ce->startLine ;
//printf("---> Inner block starts at line %d\n",yyLineNr);
//current->reset();
current = new Entry;
// set default protection based on the compound type
......
#define yy_create_buffer tagYY_create_buffer
#define yy_delete_buffer tagYY_delete_buffer
#define yy_scan_buffer tagYY_scan_buffer
#define yy_scan_string tagYY_scan_string
#define yy_scan_bytes tagYY_scan_bytes
#define yy_flex_debug tagYY_flex_debug
#define yy_init_buffer tagYY_init_buffer
#define yy_flush_buffer tagYY_flush_buffer
#define yy_load_buffer_state tagYY_load_buffer_state
#define yy_switch_to_buffer tagYY_switch_to_buffer
#define yyin tagYYin
#define yyleng tagYYleng
#define yylex tagYYlex
#define yyout tagYYout
#define yyrestart tagYYrestart
#define yytext tagYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 20
#define YY_END_OF_BUFFER 21
static yyconst short int yy_accept[69] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 21, 18, 19, 3,
2, 1, 18, 5, 6, 7, 18, 8, 18, 18,
18, 18, 17, 18, 12, 18, 14, 13, 0, 4,
6, 0, 8, 0, 11, 0, 15, 0, 9, 0,
10, 0, 16, 0, 13, 0, 0, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 1, 4, 1, 1, 5, 6, 1, 1,
1, 1, 7, 1, 7, 7, 7, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 9, 1, 1,
1, 10, 11, 1, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1, 7, 1, 1, 12, 1, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 1, 1, 1, 13, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[14] =
{ 0,
1, 2, 1, 1, 1, 1, 3, 4, 5, 1,
6, 4, 1
} ;
static yyconst short int yy_base[81] =
{ 0,
51, 50, 47, 0, 46, 12, 21, 0, 32, 35,
38, 41, 38, 43, 48, 53, 59, 0, 64, 69,
80, 0, 91, 94, 97, 100, 47, 153, 153, 153,
153, 153, 41, 153, 0, 153, 37, 153, 29, 26,
23, 22, 153, 19, 153, 24, 23, 153, 23, 153,
0, 21, 153, 15, 12, 11, 153, 10, 0, 9,
8, 5, 153, 11, 153, 2, 0, 153, 104, 110,
116, 122, 0, 128, 131, 133, 136, 138, 140, 146
} ;
static yyconst short int yy_def[81] =
{ 0,
69, 69, 69, 69, 69, 69, 69, 7, 69, 69,
70, 70, 7, 7, 7, 7, 7, 17, 7, 7,
7, 21, 69, 69, 71, 71, 68, 68, 68, 68,
68, 68, 72, 68, 73, 68, 74, 68, 75, 76,
77, 78, 68, 79, 68, 80, 80, 68, 72, 68,
73, 74, 68, 75, 68, 76, 68, 77, 58, 78,
68, 79, 68, 80, 68, 75, 78, 0, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68
} ;
static yyconst short int yy_nxt[167] =
{ 0,
68, 29, 68, 51, 30, 31, 68, 68, 68, 32,
68, 33, 33, 29, 65, 63, 67, 61, 59, 57,
66, 34, 29, 55, 53, 50, 65, 65, 35, 63,
61, 59, 35, 29, 57, 36, 29, 55, 36, 29,
53, 38, 29, 50, 38, 39, 68, 29, 29, 39,
39, 29, 29, 68, 39, 40, 68, 68, 68, 40,
40, 68, 68, 68, 40, 41, 41, 41, 68, 68,
41, 42, 68, 68, 68, 42, 42, 68, 68, 68,
42, 43, 68, 68, 68, 68, 68, 44, 68, 68,
68, 44, 29, 68, 45, 29, 68, 45, 47, 68,
48, 47, 68, 48, 28, 28, 28, 28, 28, 28,
37, 37, 37, 37, 37, 37, 46, 46, 46, 46,
46, 46, 49, 68, 49, 49, 49, 49, 52, 68,
52, 52, 52, 52, 54, 54, 56, 56, 58, 58,
58, 60, 60, 62, 68, 62, 64, 64, 64, 64,
64, 64, 27, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68
} ;
static yyconst short int yy_chk[167] =
{ 0,
0, 4, 0, 73, 4, 4, 0, 0, 67, 4,
66, 4, 4, 6, 64, 62, 61, 60, 58, 56,
55, 6, 7, 54, 52, 49, 47, 46, 7, 44,
42, 41, 7, 9, 40, 9, 10, 39, 10, 11,
37, 11, 12, 33, 12, 13, 27, 5, 3, 13,
14, 2, 1, 0, 14, 15, 0, 0, 0, 15,
16, 0, 0, 0, 16, 17, 17, 17, 0, 0,
17, 19, 0, 0, 0, 19, 20, 0, 0, 0,
20, 21, 0, 0, 0, 0, 0, 21, 0, 0,
0, 21, 23, 0, 23, 24, 0, 24, 25, 0,
25, 26, 0, 26, 69, 69, 69, 69, 69, 69,
70, 70, 70, 70, 70, 70, 71, 71, 71, 71,
71, 71, 72, 0, 72, 72, 72, 72, 74, 0,
74, 74, 74, 74, 75, 75, 76, 76, 77, 77,
77, 78, 78, 79, 0, 79, 80, 80, 80, 80,
80, 80, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "tag.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "tag.l"
/*
* includes
*/
#include <stdio.h>
#include "qtbc.h"
#include <qfileinfo.h>
#include "classdef.h"
#include "filedef.h"
#include "namespacedef.h"
#include "memberdef.h"
#include "doxygen.h"
#include "util.h"
#include "message.h"
#include "defargs.h"
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
static int yyLineNr;
static QCString className;
static QCString fileName;
static QCString namespaceName;
static QCString tagName;
static QCString memberName;
static QCString anchorName;
static QCString argString;
static ClassDef *cd;
static FileDef *fd;
static NamespaceDef *nd;
static void addClass(const char *name,const char *fileName)
{
//printf("adding class %s\n",name);
if (name!=0 && strlen(name)>0 && classDict[name]==0)
{
cd = new ClassDef(name,ClassDef::Class,tagName,fileName);
fd = 0;
nd = 0;
classList.inSort(cd);
classDict.insert(className,cd);
}
}
static void addFile(const char *name)
{
//printf("adding file %s tagName=`%s'\n",name,tagName.data());
fd = new FileDef(0,name,tagName);
FileName *mn;
if ((mn=inputNameDict[name]))
{
mn->append(fd);
}
else
{
mn = new FileName(name,name);
mn->append(fd);
inputNameList.inSort(mn);
inputNameDict.insert(name,mn);
}
cd = 0;
nd = 0;
//fileList.inSort(fd);
//fileDict.insert(fileName,fd);
}
static void addNamespace(const char *name)
{
if ((nd=namespaceDict[name])==0)
{
// TODO: we assume that each namespace is limited to a single tagfile.
// since namespace are open, this need not to be the case. As a result
// namespace may contain members that are located in
// different namespaces!
nd = new NamespaceDef(name,tagName);
namespaceList.inSort(nd);
namespaceDict.insert(name,nd);
}
cd = 0;
fd = 0;
}
static void addMember(const char *name,const char *anchor,const char *args)
{
//printf("adding member `%s' `%s'\n",name,anchor);
if (cd || fd)
{
MemberNameDict *mnd=0;
MemberNameList *mnl=0;
MemberDef *md;
ArgumentList *argList = new ArgumentList;
stringToArgumentList(args,argList);
md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE,
MemberDef::Function,0,argList);
delete argList;
md->setAnchor(anchor);
md->setReference(tagName);
if (cd) // member of a class
{
md->setMemberClass(cd);
cd->insertMember(md);
mnd=&memberNameDict;
mnl=&memberNameList;
}
else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{
md->setFileDef(fd);
fd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
MemberName *mn = 0;
if ((mn=(*mnd)[memberName]))
{
//printf("mn->inSort()\n");
mn->append(md);
}
else
{
//printf("mn->append()\n");
mn=new MemberName(memberName);
mn->append(md);
//printf("Adding memberName=%s\n",mn->memberName());
mnl->inSort(mn);
mnd->insert(memberName,mn);
}
}
}
/* -----------------------------------------------------------------
*/
#define Pass1 1
#define Pass2 2
#define AnchorName 3
#define ArgString1 4
#define ArgString2 5
#define ClassName1 6
#define ClassName2 7
#define FileName 8
#define NamespaceName 9
#define BaseClasses 10
#define ClassFile1 11
#define ClassFile2 12
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 180 "tag.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 153 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 182 "tag.l"
{ // start of a class
BEGIN(ClassName1);
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 185 "tag.l"
{ // start of a file
BEGIN(FileName);
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 188 "tag.l"
{ // start of a namespace
BEGIN(NamespaceName);
}
YY_BREAK
case 4:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 191 "tag.l"
{
memberName=yytext;
BEGIN(AnchorName);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 195 "tag.l"
{
BEGIN(ClassName2);
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 198 "tag.l"
{
anchorName=yytext;
BEGIN(ArgString1);
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 202 "tag.l"
{
BEGIN(ArgString2);
}
YY_BREAK
case 8:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 205 "tag.l"
{
argString=yytext;
addMember(memberName,anchorName,argString);
BEGIN(Pass1);
}
YY_BREAK
case 9:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 210 "tag.l"
{
fileName=yytext;
addFile(yytext);
BEGIN(Pass1);
}
YY_BREAK
case 10:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 215 "tag.l"
{
namespaceName=yytext;
addNamespace(yytext);
BEGIN(Pass1);
}
YY_BREAK
case 11:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 220 "tag.l"
{
className=yytext;
BEGIN(ClassFile1);
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 224 "tag.l"
{
BEGIN(ClassFile2);
}
YY_BREAK
case 13:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 227 "tag.l"
{
addClass(className,yytext);
BEGIN(Pass1);
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 231 "tag.l"
{
yyLineNr++;
BEGIN(Pass1);
}
YY_BREAK
case 15:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 235 "tag.l"
{
cd=getClass(yytext);
BEGIN(BaseClasses);
}
YY_BREAK
case 16:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 239 "tag.l"
{
ClassDef *bcd=getClass(yytext);
if (cd && bcd)
{
cd->insertBaseClass(bcd,Public,Normal);
bcd->insertSuperClass(cd,Public,Normal);
}
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 247 "tag.l"
{
yyLineNr++;
BEGIN(Pass2);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 251 "tag.l"
YY_BREAK
case 19:
YY_RULE_SETUP
#line 252 "tag.l"
{ yyLineNr++ ; }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 254 "tag.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Pass1):
case YY_STATE_EOF(Pass2):
case YY_STATE_EOF(AnchorName):
case YY_STATE_EOF(ArgString1):
case YY_STATE_EOF(ArgString2):
case YY_STATE_EOF(ClassName1):
case YY_STATE_EOF(ClassName2):
case YY_STATE_EOF(FileName):
case YY_STATE_EOF(NamespaceName):
case YY_STATE_EOF(BaseClasses):
case YY_STATE_EOF(ClassFile1):
case YY_STATE_EOF(ClassFile2):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 68);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 254 "tag.l"
/*@ ----------------------------------------------------------------------------
*/
void parseTagFile(const char *fileName)
{
FILE *f=fopen(fileName,"r");
QFileInfo fi(fileName);
if (!f || !fi.exists());
tagName = fi.fileName();
tagYYin = f;
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass1);
tagYYlex();
rewind(f);
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass2);
tagYYlex();
fclose(f);
}
//extern "C" { // some bogus code to keep the compiler happy
// int tagYYwrap() { return 1 ; }
//}
......@@ -22,7 +22,7 @@
#include <stdio.h>
#include "qtbc.h"
#include <qfileinf.h>
#include <qfileinfo.h>
#include "classdef.h"
#include "filedef.h"
......@@ -72,7 +72,7 @@ static void addFile(const char *name)
}
else
{
mn = new FileName(name);
mn = new FileName(name,name);
mn->append(fd);
inputNameList.inSort(mn);
inputNameDict.insert(name,mn);
......
......@@ -193,8 +193,8 @@ class Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{ return "Here are the classes, structs and "
"unions with brief descriptions:";
{ return "Here are the classes, structs, "
"unions and interfaces with brief descriptions:";
}
/*! This is an introduction to the page with all class members. */
......@@ -716,7 +716,23 @@ class Translator
*/
virtual QCString trPageAbbreviation()
{ return "p."; }
};
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return "Sources";
}
virtual QCString trDefinedAtLineInSourceFile()
{
return "Definition at line @0 of file @1.";
}
virtual QCString trDefinedInSourceFile()
{
return "Definition in file @0.";
}
};
#endif
......@@ -36,23 +36,23 @@ class TranslatorCzech : public Translator
QCString trAnd()
{ return "a"; }
QCString trInheritedBy()
{ return "Je Potomkem"; }
{ return "Je potomkem"; }
QCString trRelatedFunctions()
{ return "Pribuzne Metody"; }
{ return "Pribuzne metody"; }
QCString trRelatedSubscript()
{ return "(Tyto funkce nejsou metody.)"; }
QCString trDetailedDescription()
{ return "Podrobna Dokumentace"; }
{ return "Podrobna dokumentace"; }
QCString trMemberTypedefDocumentation()
{ return "Dokumentace pro Deklaraci Typu (typedef) ve Tride";}
{ return "Dokumentace pro deklaraci typu (typedef) ve tride";}
QCString trMemberEnumerationDocumentation()
{ return "Dokumentace Vyctovych Typu"; }
{ return "Dokumentace vyctovych typu"; }
QCString trEnumerationValueDocumentation()
{ return "Dokumentace Hodnot Vyctovych Typu"; }
{ return "Dokumentace hodnot vyctovych typu"; }
QCString trMemberFunctionDocumentation()
{ return "Dokumentace Metod"; }
{ return "Dokumentace metod"; }
QCString trMemberDataDocumentation()
{ return "Dokumentace Datovych Slozek Tridy"; }
{ return "Dokumentace datovych slozek tridy"; }
QCString trGeneratedFrom(const char *s,bool single)
{
QCString result=(QCString)"Dokumentace pro tento"+s+
......@@ -65,15 +65,15 @@ class TranslatorCzech : public Translator
QCString trReference()
{ return "Reference"; }
QCString trListOfAllMembers()
{ return "Seznam vsech datovych slozek a metod tridy."; }
{ return "Seznam vsech datovych polozek a metod tridy."; }
QCString trMemberList()
{ return "Seznam datovych polozek a metod tridy"; }
QCString trThisIsTheListOfAllMembers()
{ return "Toto je uplny seznam datovych slozek a metod tridy pro"; }
{ return "Toto je uplny seznam datovych polozek a metod tridy pro"; }
QCString trIncludingInheritedMembers()
{ return "zahrnuje vsechny nasledujici zdedene datove slozky a metody."; }
{ return "zahrnuje vsechny nasledujici zdedene datove polozky a metody."; }
QCString trGeneratedAutomatically(const char *s)
{ QCString result="Automaticky vygenerovany pomoci programu Doxygen";
{ QCString result="Automaticky vygenerovany pomoci programu doxygen";
if (s) result+=(QCString)" pro "+s;
result+=" ze zdrojoveho souboru.";
return result;
......@@ -115,7 +115,7 @@ class TranslatorCzech : public Translator
QCString trFileListDescription(bool extractAll)
{
QCString result="A toto je seznam vsech ";
if (!extractAll) result+="dokumentovanych ";
if (!extractAll) result+="zdokumentovanych ";
result+="souboru s kratkymi popisy:";
return result;
}
......@@ -126,7 +126,7 @@ class TranslatorCzech : public Translator
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Zde je seznam vsech ";
if (!extractAll) result+="dokumentovanych ";
if (!extractAll) result+="zdokumentovanych ";
result+="clenu tridy (metod a datovych slozek) s odkazy na ";
if (extractAll) result+="dokumentaci tridy pro kazdo polozku:";
else result+="tridy, kam patri:";
......@@ -159,7 +159,7 @@ class TranslatorCzech : public Translator
QCString trModuleIndex()
{ return "Index modulu"; }
QCString trHierarchicalIndex()
{ return "Index Hierarchie"; }
{ return "Index hierarchie"; }
QCString trCompoundIndex()
{ return "Index objektovych typu"; }
QCString trFileIndex()
......@@ -192,7 +192,7 @@ class TranslatorCzech : public Translator
QCString trEnumerationValues()
{ return "Hodnoty vyctovych typu"; }
QCString trReimplementedFrom()
{ return "Je znovu implementovan z"; }
{ return "Je znovu implementovan podle"; }
QCString trReimplementedIn()
{ return "Je znovu implementovan v"; }
QCString trAuthor()
......@@ -215,14 +215,14 @@ class TranslatorCzech : public Translator
{ return "Soubory:"; }
QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=(QCString)"Gegenerovany v "+date;
QCString result=(QCString)"Generovany dne "+date;
if (projName) result+=(QCString)" pro "+projName;
result+=(QCString)" ";
return result;
}
QCString trWrittenBy()
{
return "napsany ";
return "napsany podle";
}
QCString trClassDiagram(const char *clName)
{
......@@ -248,29 +248,242 @@ class TranslatorCzech : public Translator
QCString trReturns()
{ return "ma navratovou hodnotu"; }
QCString trSeeAlso()
{ return "Podivej se take na"; }
{ return "Podrobnosti take tady"; }
QCString trParameters()
{ return "Parametry"; }
QCString trExceptions()
{ return "Vyjimky"; }
QCString trGeneratedBy()
{ return "Gegenerovan podle"; }
{ return "Generovan podle"; }
// new since 0.49-990307
QCString trNamespaces()
{ return "Prostory jmen"; }
QCString trNamespaceList()
{ return "Seznam prostoru jmen"; }
QCString trNamespaceListDescription(bool extractAll)
{
QCString result="Zde jsou vsechny ";
if (!extractAll) result+="dokumentovane ";
result+="prostory jem s kratkymi popisy:";
QCString result="Zde je seznam vsech ";
if (!extractAll) result+="dokumentovanych ";
result+="prostoru jmen s kratkymi popisy:";
return result;
}
QCString trFriends()
{ return "Spratelene tridy, funkce a metody"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
/*! used in the class documentation as a header before the list of all
* related classes
*/
QCString trRelatedFunctionDocumentation()
{ return "Dokumentace pro spratelene funkce a ostatni"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType)
{
QCString result=(QCString)clName+" ";
result+=" Reference";
switch(compType)
{
case ClassDef::Class: result+=" tridy"; break;
case ClassDef::Struct: result+=" struktury"; break;
case ClassDef::Union: result+=" unie"; break;
case ClassDef::Interface: result+=" rozhrani"; break;
}
return result;
}
/*! used as the title of the HTML page of a file */
QCString trFileReference(const char *fileName)
{
QCString result=fileName;
result+=" Reference souboru";
return result;
}
/*! used as the title of the HTML page of a namespace */
QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
result+=" Reference prostoru jmen";
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
QCString trPublicMembers()
{ return "Verejne metody a datove polozky"; }
QCString trPublicSlots()
{ return "Verejne sloty"; }
QCString trSignals()
{ return "Signaly"; }
QCString trStaticPublicMembers()
{ return "Staticke verejne metody a datove polozky"; }
QCString trProtectedMembers()
{ return "Chranene metody a datove polozky"; }
QCString trProtectedSlots()
{ return "Chranene sloty"; }
QCString trStaticProtectedMembers()
{ return "Staticke chranene metody a datove polozky"; }
QCString trPrivateMembers()
{ return "Privatni metody a datove polozky"; }
QCString trPrivateSlots()
{ return "Privatni sloty"; }
QCString trStaticPrivateMembers()
{ return "Staticke privatni metody a datove polozky"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
QCString trWriteList(int numEntries)
{
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=" a ";
}
}
return result;
}
/*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
QCString trInheritsList(int numEntries)
{
return "dedi "+trWriteList(numEntries)+".";
}
/*! used in class documentation to produce a list of super classes,
* if class diagrams are disabled.
*/
QCString trInheritedByList(int numEntries)
{
return "je zdeden z "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
QCString trReimplementedFromList(int numEntries)
{
return "Znovu implementuje "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* all member that overwrite the implementation of this member.
*/
QCString trReimplementedInList(int numEntries)
{
return "znovu implementovan v "+trWriteList(numEntries)+".";
}
/*! This is put above each page as a link to all members of namespaces. */
QCString trNamespaceMembers()
{ return "Polozky prostoru jmen"; }
/*! This is an introduction to the page with all namespace members */
QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="Tady je seznam vsech ";
if (!extractAll) result+="zdokumentovanych ";
result+="clenu prostoru jmen s odkazy na ";
if (extractAll)
result+="dukumentaci prostoru jmen pro kazdou polozku:";
else
result+="prostor jmen, kteremu patri:";
return result;
}
/*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
QCString trNamespaceIndex()
{ return "Index prostoru jmen"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
QCString trNamespaceDocumentation()
{ return "Dokumentace prostoru jmen"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
/*! This is used in the documentation before the list of all
* namespaces in a file.
*/
QCString trNamespaces()
{ return "Prostory jmen"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990728
//////////////////////////////////////////////////////////////////////////
/*! This is put at the bottom of a class documentation page and is
* followed by a list of files that were used to generate the page.
*/
QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
QCString result=(QCString)"Dokumentace pro ";
switch(compType)
{
case ClassDef::Class: result+="tuto tridu"; break;
case ClassDef::Struct: result+="tuto struktury"; break;
case ClassDef::Union: result+="tuto unii"; break;
case ClassDef::Interface: result+="toto rozhrani"; break;
}
result+=" byla vygenerovana z nasledujiciho souboru";
if (single) result+=":"; else result+="s:";
return result;
}
/*! This is in the (quick) index as a link to the alphabetical compound
* list.
*/
QCString trAlphabeticalList()
{ return "Abecedni seznam"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990901
//////////////////////////////////////////////////////////////////////////
/*! This is used as the heading text for the retval command. */
QCString trReturnValues()
{ return "Vraci hodnoty"; }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
QCString trMainPage()
{ return "Hlavni stranka"; }
/*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
QCString trPageAbbreviation()
{ return "p."; }
};
#endif // TRANSLATOR_CZ_H
......
......@@ -70,11 +70,11 @@ class TranslatorFrench : public Translator
/*! this is the first part of a sentence that is followed by a class name */
QCString trThisIsTheListOfAllMembers()
{ return "Ceci est la liste complète des membres de"; }
{ return "Ceci est la liste complète des membres de "; }
/*! this is the remainder of the sentence after the class name */
QCString trIncludingInheritedMembers()
{ return "y compris des membres des classes héritées."; }
{ return " y compris des membres des classes héritées."; }
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
......
......@@ -19,6 +19,7 @@
#include "qtbc.h"
#include <qregexp.h>
#include <qfileinfo.h>
#include "util.h"
#include "message.h"
#include "classdef.h"
......@@ -30,6 +31,7 @@
#include "language.h"
#include "config.h"
#include "htmlhelp.h"
#include "example.h"
// an inheritance tree of depth of 100000 should be enough for everyone :-)
const int maxInheritanceDepth = 100000;
......@@ -317,6 +319,9 @@ void writeExample(OutputList &ol,ExampleList *el)
{
QCString exampleLine=theTranslator->trWriteList(el->count());
bool latexEnabled = ol.isEnabled(OutputGenerator::Latex);
bool manEnabled = ol.isEnabled(OutputGenerator::Html);
bool htmlEnabled = ol.isEnabled(OutputGenerator::Man);
QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes
......@@ -326,7 +331,20 @@ void writeExample(OutputList &ol,ExampleList *el)
parseText(ol,exampleLine.mid(index,newIndex-index));
uint entryIndex = exampleLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
Example *e=el->at(entryIndex);
if (ok && e) ol.writeObjectLink(0,e->file,e->anchor,e->name);
if (ok && e)
{
if (latexEnabled) ol.disable(OutputGenerator::Latex);
// link for Html / man
ol.writeObjectLink(0,e->file,e->anchor,e->name);
if (latexEnabled) ol.enable(OutputGenerator::Latex);
if (manEnabled) ol.disable(OutputGenerator::Man);
if (htmlEnabled) ol.disable(OutputGenerator::Html);
// link for Latex / pdf with anchor because the sources
// are not hyperlinked (not possible with a verbatim environment).
ol.writeObjectLink(0,e->file,0,e->name);
if (manEnabled) ol.enable(OutputGenerator::Man);
if (htmlEnabled) ol.enable(OutputGenerator::Html);
}
index=newIndex+matchLen;
}
parseText(ol,exampleLine.right(exampleLine.length()-index));
......@@ -479,7 +497,14 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
ol.startQuickIndexItem(extLink,absPath+"headers.html");
parseText(ol,theTranslator->trHeaderFiles());
ol.endQuickIndexItem();
}
}
if (Config::sourceBrowseFlag)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,absPath+"sources.html");
parseText(ol,theTranslator->trSources());
ol.endQuickIndexItem();
}
if (documentedNamespaceMembers>0)
{
if (!compact) ol.writeListItem();
......@@ -587,19 +612,30 @@ void setAnchors(char id,MemberList *ml)
QCString fileToString(const char *name)
{
if (name==0 || name[0]==0) return 0;
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
QFile f;
bool fileOpened=FALSE;
if (name[0]=='-' && name[1]==0) // read from stdin
{
err("Error: file `%s' not found\n",name);
exit(1);
fileOpened=f.open(IO_ReadOnly,stdin);
}
QFile f(name);
if (!f.open(IO_ReadOnly))
else // read from file
{
err("Error: cannot open file `%s'\n",name);
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
err("Error: file `%s' not found\n",name);
exit(1);
}
f.setName(name);
fileOpened=f.open(IO_ReadOnly);
}
if (!fileOpened)
{
err("Error: cannot open file `%s' for reading\n",name);
exit(1);
}
int fsize=fi.size();
int fsize=f.size();
QCString contents(fsize+1);
f.readBlock(contents.data(),fsize);
contents[fsize]='\0';
......@@ -741,7 +777,7 @@ static QCString trimBaseClassScope(BaseClassList *bcl,const QCString &s)
for (;(bcd=bcli.current());++bcli)
{
ClassDef *cd=bcd->classDef;
int spos=s.find(cd->name());
int spos=s.find(cd->name()+"::");
if (spos!=-1)
{
return s.left(spos)+s.right(
......@@ -836,6 +872,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
{
srcAType=trimScope(className,srcAType);
dstAType=trimScope(className,dstAType);
//printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
ClassDef *cd;
if (!namespaceName.isEmpty())
cd=getClass(namespaceName+"::"+className);
......@@ -846,6 +883,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
srcAType=trimBaseClassScope(cd->baseClasses(),srcAType);
dstAType=trimBaseClassScope(cd->baseClasses(),dstAType);
}
//printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
}
if (!namespaceName.isEmpty())
{
......@@ -1320,14 +1358,14 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{
if (md->isLinkable())
{
//printf("md->name()=`%s'\n",md->name().data());
//printf("md->name()=`%s' md->args=`%s'\n",md->name().data(),args);
fd=md->getFileDef();
if (fd && fd->isLinkable())
{
//printf("fd->name()=`%s'\n",fd->name().data());
bool match=TRUE;
ArgumentList *argList=0;
if (args)
if (args && !md->isDefine())
{
argList=new ArgumentList;
stringToArgumentList(args,argList);
......@@ -1524,6 +1562,7 @@ void generateRef(OutputList &ol,const char *scName,
ClassDef *cd = 0;
FileDef *fd = 0;
NamespaceDef *nd = 0;
GroupDef *gd = 0;
//printf("Try with scName=`%s' nameStr=`%s' argsStr=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data());
......@@ -1567,7 +1606,7 @@ void generateRef(OutputList &ol,const char *scName,
}
// for functions we add the arguments if explicitly specified or else "()"
if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot()))
if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot() || md->isDefine()))
{
if (argsStr.isNull())
ol.writeString("()");
......@@ -1589,6 +1628,18 @@ void generateRef(OutputList &ol,const char *scName,
}
return;
}
else if (inSeeBlock && !nameStr.isEmpty() && (gd=groupDict[nameStr]))
{ // group link
ol.startTextLink(gd->getOutputFileBase(),0);
if (rt) // explict link text
ol.docify(rt);
else // use group title as the default link text
{
ol.docify(gd->groupTitle());
}
ol.endTextLink();
return;
}
// nothing found
if (rt)
......@@ -1615,6 +1666,7 @@ void generateLink(OutputList &ol,const char *clName,
//printf("generateLink(%s,%s,%s) inSeeBlock=%d\n",clName,lr,lt,inSeeBlock);
//FileInfo *fi=0;
FileDef *fd;
GroupDef *gd;
bool ambig;
if (linkRef.length()==0) // no reference name!
ol.docify(lt);
......@@ -1622,6 +1674,15 @@ void generateLink(OutputList &ol,const char *clName,
ol.writeObjectLink(0,linkRef,0,lt);
else if ((exampleDict[linkRef])) // link to an example
ol.writeObjectLink(0,linkRef+"-example",0,lt);
else if ((gd=groupDict[linkRef])) // link to a group
{
ol.startTextLink(gd->getOutputFileBase(),0);
if (lt)
ol.docify(lt);
else
ol.docify(gd->groupTitle());
ol.endTextLink();
}
else if ((fd=findFileDef(&inputNameDict,linkRef,ambig))
&& fd->isLinkable())
// link to documented input file
......
......@@ -17,14 +17,10 @@
#ifndef UTIL_H
#define UTIL_H
#include "qtbc.h"
#include <qlist.h>
#include <qtstream.h>
#include <qtextstream.h>
#include <ctype.h>
//#include "filedef.h"
//#include "filename.h"
#include "memberdef.h"
//#include "outputlist.h"
class ClassDef;
class FileDef;
......@@ -33,14 +29,10 @@ class NamespaceDef;
class FileNameDict;
class ArgumentList;
class OutputList;
class MemberDef;
class ExampleList;
//extern void writeMemberDecs(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
// FileDef *fd, const char *title, const char *subtitle,
// MemberList *ml);
//extern void writeMemberDocs(OutputList &ol,
// MemberList *ml,const char *scopeName,MemberDef::MemberType m);
extern void setAnchors(char id,MemberList *ml);
//extern int countMemberDocs(MemberList *ml,MemberDef::MemberType m);
extern QCString fileToString(const char *name);
extern QCString dateToString(bool);
extern void linkifyText(OutputList &ol,const char *clName,const char *name,
......@@ -52,8 +44,6 @@ extern void generateRef(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char * =0);
extern void generateLink(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char *);
//extern void generateClassRef(OutputList &ol,const char *clName,
// const char *linkTxt=0);
extern void generateFileRef(OutputList &ol,const char *,
const char *linkTxt=0);
extern bool matchArguments(ArgumentList *,ArgumentList *,
......@@ -64,12 +54,10 @@ extern QCString convertSlashes(const QCString &s,bool dots=FALSE);
extern QCString substitute(const char *s,const char *src,const char *dst);
extern QCString resolveDefines(const char *n);
extern ClassDef *getClass(const char *key);
//extern int strcscmp(const char *s1,const char *s2);
extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
bool &ambig);
extern void showFileDefMatches(const FileNameDict *fnDict,const char *n);
extern int guessSection(const char *name);
//extern QCString nameToFile(const char *name);
extern bool isId(char c);
extern QCString removeRedundantWhiteSpace(const QCString &s);
extern void startTitle(OutputList &ol,const char *fileName);
......@@ -85,11 +73,6 @@ void writeExample(OutputList &ol,ExampleList *el);
void setFileNameForSections(QList<QCString> *anchorList,const char *fileName);
QCString stripAnnonymousScope(const QCString &s);
QCString stripAnnonymousNamespaceScope(const QCString &s);
//void writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd,
// FileDef *fd,MemberDef *md,const char *name);
//void warnForUndocumentedMember(MemberDef *md);
QCString stripFromPath(const QCString &path);
bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment