This allows to write the grammar in a simpler way without running into
shift/reduce conflicts all the time because a Doxygen post comment can often
be either reduced with the preceding token or shifted if there is another
Doxygen post comment after it.
Just take care of concatenating the comments in the lexer, which makes it
handling of comment tokens slightly more complex as it now needs to look ahead
at the next tokens, but it's worse the simplifications in the parser.
No changes in behaviour.
Don't accept both pre- and post-comments for the same declaration (a function
parameter or a class member), this didn't work before neither as the
pre-comment overrode the post-one due to the default shift/reduce resolution
preferring to shift, but it happened silently whereas now it will result in a
parse error.
In the future we could complicate the grammar to detect this and give a
warning about one of the comments being ignored instead, but for now keep
things simple.
This is a more logical place to do this and it also simplifies the parser
code, e.g. the parser doesn't get the ignored (called "structural" for some
reason in the code) Doxygen comments from the lexer at all any more instead of
having to ignore them on its own. It also allows to define doxygen_comment and
doxygen_post_comment rules in a simpler way and avoid shift/reduce conflicts
for the sequences of Doxygen [post] comments by specifying their associativity.
In principle, the lexer could also take care of concatenating the subsequent
Doxygen comments in a single one, as this would also seem to belong to it
rather than the parser, but this doesn't seem to provide any immediate gains
and so isn't done by this commit.
Updated Doxygen error numbers yet again, as Python errors got added in the
meanwhile, pushing the Doxygen ones further off.
And re-merged PEP8/whitespace-related conflicts in autodoc_runme.py once again
(if anybody is looking for a motivating example about why significant
whitespace is bad, here is a great use case).
* m7thon-issue-445-python-class-docstrings:
Add changes note for Python tp_doc slot and docstring
Set class docstring in tp_doc slot for python -builtin
Conflicts:
CHANGES.current
g++-5 errors out with this now with errors such as:
default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
result = (FFF *)new FFF();
^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
class FFF : public F {
^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
~F() { }
^
default_constructor_wrap.cxx:314:7: error: within this context
Previously SWIG looked at the indentation of the first line and removed
that many characters from each subsequent line, regardless of what those
characters were. This was made worse because SWIG's preprocessor removes
any whitespace before a '#'. Fixes github issue #379, reported by Joe
Orton.
* Sghirate-master:
changes file update for -outfile
Add in all C# command line options to the docs
C# -outfile cosmetic code fixes
[C#] Single file mode (fixes)
[C#] Single file mode (minor fix)
[C#] Single file mode
Conflicts:
CHANGES.current
Added "-csout <path>" parameter. If supplied all generated C# code will
be written to the given file. Makes it easier to integrate SWIG into
automated script based build processes.