Skip to content

Commit

Permalink
Wave V1.2.4
Browse files Browse the repository at this point in the history
[SVN r33362]
  • Loading branch information
hkaiser committed Mar 17, 2006
1 parent 2da3dac commit c959794
Show file tree
Hide file tree
Showing 62 changed files with 7,741 additions and 7,465 deletions.
74 changes: 74 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,80 @@ TODO (known issues):
CHANGELOG

Boost V1.34.0
- Wave Version 1.2.4
- Added the possibility to explicitely enable/disable the generation of #line
directives. Added a corresponding commandline argument to the Wave driver
tool (--line/-L) which takes either 0 or 1 as its parameter.
- Added support for #pragma wave option(command: value) directives, which
supports the following commands:
. #pragma wave option(line: [0|1])
Enable/disable generation of #line directives
. #pragma wave option(preserve: [0|1|2])
Control whitespace preservation
. #pragma wave option(output: ["filename" | null | default])
Redirect output to the given file (or no output, if 'null' is specified,
or output to the file as given on the command line, if 'default' is
specified).
The filename is resolved relative to the directory of the processed
file.
These new #pragma directives are implemented in the Wave driver tool only.
It is possible to combine several options in one #pragma directive, i.e.
#pragma wave option(line: 0, preserve: 2).
- Changed the signature of the may_skip_whitespace() preprocessing hook to
additionally take the preprocessing context as its first parameter.
- Added the possibility to the Wave tool to disable initial output by
specifying a '-' as the output file. This is useful for syntax checks only or
in conjunction with the #pragma wave option(output: ...) to restrict the
generated output.
- Improved error reporting in the Wave tool on bad output file stream state.
- Switched to Re2C V0.10.0
- Fixed some of the VC7.1 /W4 warnings.
- The Wave tool now creates the directory hierarchy of output files as needed.
- Applied some optimization, which causes skipping of the parsing for almost
all preprocessor directives when the if block status is false. This gains
upto 10-20% in speed for average applications.
- Added error diagnostic for #elif without matching #if, which was missing
under certain circumstances.
- Avoided the evaluation of #elif expressions if one of the previous #if/#elif
blocks of the same level was true. This gains upto another 5% of speed for
average applications.
- The MS specific integer suffix 'i64' is now correctly supported by the Re2C
and SLex lexer components (only when BOOST_WAVE_SUPPORT_MS_EXTENSIONS is
defined during compilation).
- Changed the Wave tool to print the column number of an error/warning along
with the line number. The new format is: 'filename:line:column: error text'.
- It is now possible to recover from the unbalanced #if/#endif statement
warning in a proper way.
- The Wave library now automaticaly recognizes include guards in headers files
and uses this information to avoid opening these header files more than once.
This speeds up things by upto 10-20% depending on the concrete include files.
- Fixed the failing test t_6_023.cpp. Error reporting for illformed #else
directives was broken (because of some recent changes).
- Fixed the failing test t_5_007.cpp. This was caused by the automatic include
guard detection, which prevented the second inclusion of the specified
include file the test was relying on.
- Added the possibility to switch off the automatic include guard detection.
- Added a new command line option to the Wave tool: --noguard/-G, which
disables the automatic include guard detection.
- Now a header with include guards will be included correctly for a second time
after its include guard symbol gets undefined.
- Added the generating platform to Wave's full version string.
- Made the Wave tool fully interactive when started with input from stdin and
and output to stdout. In this mode the Wave tool preprocesses the input
line by line and not only after receiving the full input as normally.
- Added serialization support for the wave::context object, which stores
all information about defined macros and all #pragma once header information.
- Added the command line option --state (-s) to the Wave tool, which tries to
load the serialized information from the file given as the argument to
--state and save the state information at the end to the same file.
This option is available in interactive mode only.
- Added possibility to verify the compatibility of the configuration used
during compilation of the Wave library with the config info used for the
application. Added a corresponding test to the Wave tool.
- Added a new predefined macro __WAVE_CONFIG__ which expands to an integer
literal containg the configuration information the library was compiled
with.

- Version 1.2.3
- Added a missing throw() specification to the function
cpp_exception::get_related_name().
Expand Down
1 change: 1 addition & 0 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SOURCES = instantiate_cpp_exprgrammar
instantiate_re2c_lexer
instantiate_re2c_lexer_str
token_ids
wave_config_constant
cpplexer/re2clex/aq
cpplexer/re2clex/cpp_re
;
Expand Down
1 change: 1 addition & 0 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SOURCES =
instantiate_re2c_lexer
instantiate_re2c_lexer_str
token_ids
wave_config_constant
cpplexer/re2clex/aq
cpplexer/re2clex/cpp_re
;
Expand Down
65 changes: 47 additions & 18 deletions doc/class_reference_context.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<head>
<title>The Context Object</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="theme/style.css" type="text/css">
</head>
<link rel="stylesheet" href="theme/style.css" type="text/css"></head>
<body text="#000000" background="theme/bkd.gif">
<table width="100%" border="0" cellspacing="2" background="theme/bkd2.gif">
<tr>
Expand Down Expand Up @@ -380,13 +379,14 @@ <h3><a name="get_version"></a>Get Version information</h3>
the release number, <span class="literal">'ss'</span> the subrelease number
and <span class="literal">'bbbb'</span> the build number. A possible return
value looks like <span class="literal">&quot;0.9.1.454&quot;</span>. The returned
value is the same as is inserted in the preprocessed token stream, when the
value is the same as it will be inserted in the preprocessed token stream, when the
predefined macro <tt>__WAVE_VERSION_STR__</tt> is expanded.</p>
</blockquote>
<h3>Control extended options</h3>
<p><a name="language_support"></a>set_language<br>
get_language</p>
<pre><span class="keyword"> void</span> set_language(<span class="keyword">language_support</span> language);
<pre><span class="keyword"> void</span> set_language(<span class="keyword">language_support</span> language,
<span class="keyword">bool</span> reset_macros = <span class="keyword">true</span>);
<span class="keyword">language_support</span> get_language() <span class="keyword">const</span>;</pre>
<blockquote>
<p>This functions allows to specify the language mode, in which the <tt>Wave</tt>
Expand All @@ -398,28 +398,57 @@ <h3>Control extended options</h3>
support_cpp = support_normal,

<span class="comment">// support flags for C99</span>
support_long_long = 0x02,
support_variadics = 0x04,
support_c99 = support_variadics |
support_long_long | 0x08,
support_option_long_long = 0x02,
support_option_variadics = 0x04,
support_c99 = support_option_variadics |
support_option_long_long |
0x08,

<span class="comment"> // the mask for the main language settings</span>
support_option_mask = 0xFF00,<br>
<span class="comment"> // additional fine tuning of the general behaviour</span>
support_option_preserve_comments = 0x0100,<br> support_option_no_character_validation = 0x0200,<br> support_option_convert_trigraphs = 0x0400<br> };</pre>
<p>When used with <tt>support_variadics</tt> the support for variadics, placemarkers
and the <tt>operator _Pragma()</tt> is enabled in normal C++ mode. When used with the <tt>support_long_long</tt> the support for long long suffixes is enabled in C++ mode. </p>
<p>The <tt>support_c99</tt> switches to the C99 language support, which enables variadics, placemarkers, the <tt>operator _Pragma</tt> and long long suffixes by default. Additionally it disables the C++ specific tokens such as <tt>'-&gt;*'</tt>, <tt>'.*'</tt>, <tt>'::'</tt> etc. </p>
<span class="comment"> // additional fine tuning of the general behavior</span>
support_option_preserve_comments = 0x0100,
support_option_no_character_validation = 0x0200,
support_option_convert_trigraphs = 0x0400,
support_option_single_line = 0x0800,
support_option_prefer_pp_numbers = 0x1000,
support_option_emit_line_directives = 0x2000,
support_option_include_guard_detection = 0x4000
};</pre>
<p>When used with <tt>support_option_variadics</tt> the support for variadics, placemarkers
and the <tt>operator&nbsp;_Pragma()</tt> is enabled in normal C++ mode. When used with the <tt>support_option_long_long</tt> the support for long long suffixes is enabled in C++ mode. </p>
<p>The <tt>support_c99</tt> switches on the C99 language support, which enables variadics, placemarkers, the <tt>operator&nbsp;_Pragma</tt> and long long suffixes by default. Additionally it disables the C++ specific tokens such as <tt>'-&gt;*'</tt>, <tt>'.*'</tt>, <tt>'::'</tt> etc. </p>
<p>The <tt>support_option_...</tt> values are to be used in conjunction with the main language settings (<tt>support_normal</tt> and <tt>support_c99</tt>) . </p>
<ul>
<li>If the <tt>support_option_preserve_comments</tt> flag is set, the <tt>Wave</tt> library preserves almost all comments in the source code. The only comments not preserved are those contained inside macro definitions. By default all comments are replaced by a single space. </li>
<li>If the <tt>support_option_no_character_validation</tt> flag is set , the <tt>Wave</tt> library doesn't validate universal character literals (given in the form of <tt>'u1234'</tt> or <tt>'U12345678'</tt>) to be in the allowed value range. This flag is merely used for internal purposes by the testing framework and will be rarely used by a user of the library.</li>
<li>If the <tt>support_option_preserve_comments</tt> flag is set, the <tt>Wave</tt> library preserves almost all comments in the source code. The only comments not preserved are those contained inside macro definitions. If this flag is not set all comments are replaced by a single space. </li>
<li>If the <tt>support_option_no_character_validation</tt> flag is set , the <tt>Wave</tt> library does not validate universal character literals (given in the form of <tt>'u1234'</tt> or <tt>'U12345678'</tt>) to be in the allowed value range. This flag is merely used for internal purposes by the testing framework and will be rarely used by a user of the library.</li>
<li>If the <tt>support_option_convert_trigraphs</tt> flag is set, the <tt>Wave</tt> library replaces all occurences of trigraph characters with their non-trigraph character sequence (i.e. <tt>'??='</tt> is replaced by <tt>'#'</tt> etc.) . By default no replacement is performed. </li>
<li>If the <tt>support_option_single_line</tt> flag is set, the <tt>Wave</tt> library will now reprot an error if the last line of the processed input is not terminated by a new line. This flag is merely used for internal purposes by the testing framework and will be rarely used by a user of the library.</li>
<li>If the <tt>support_option_prefer_pp_numbers</tt> flag is set, the <tt>Wave</tt> library is instructed to correctly identify pp-number's in the input stream. These get recognized into 'normal' number tokens before they get returned to the calling application. The flag is set by default and is used merely for internal purposes and will be rarely reset by a user of the library. </li>
<li>If the <span class="keyword">support_option_emit_line_directives</span> flag is set, the <tt>Wave</tt> library will emit <span class="preprocessor">#line</span> directives in the generated token stream, if appropriate. This flag is set by default, to prevent the library from generating <span class="preprocessor">#line</span> directives it must be reset explicitely. </li>
<li>If the <span class="keyword">support_option_include_guard_detection</span> flag is set, the <tt>Wave</tt> library will try to automatically identify include guards during the processing of a included file. Files which contained include guards are handled as if they contained a #pragma once, i.e. these files wonn#t be opened twice, even if specified in a second <span class="preprocessor">#include</span> statement. </li>
</ul>
<blockquote>
<p>During this process the library will recognize two forms of include guards:</p>
<pre> <span class="preprocessor">#ifndef</span> INCLUDE_GUARD_MACRO
<span class="preprocessor">#define</span> INCLUDE_GUARD_MACRO
...
<span class="preprocessor">#endif</span>

or

<span class="preprocessor">#if</span> !defined(INCLUDE_GUARD_MACRO)
<span class="preprocessor">#define</span> INCLUDE_GUARD_MACRO
...
<span class="preprocessor">#endif</span></pre>
<p> Note, that the parenthesis in the second form are optional (i.e. <tt>!defined INCLUDE_GUARD_MACRO</tt> will work as well). The code allows for any whitespace, newline and single
'#' tokens before the <span class="preprocessor">#if</span>/<span class="preprocessor">#ifndef</span> and after the final <span class="preprocessor">#endif</span> for the include guard to be recognized.</p>
<p>This flag is on by default, so if you do not want the library to automatically reconize include guards you will need to reset this explicitely. </p>
</blockquote>
<p><strong> </strong>If the parameter <tt>reset_macros</tt> is true the <tt>set_language</tt> function internally resets the list of defined macros, so please be careful not to call it after you have defined your own macros already. </p>
</blockquote>
<p><strong>Note:</strong> The set_language function internally resets the list of defined macros, so please be careful not to call it after you have defined your own macros already. </p>
<p><a name="set_max_include_nesting_depth" id="set_max_include_nesting_depth"></a>set_max_include_nesting_depth<br>
g et_max_include_nesting_depth</p>
get_max_include_nesting_depth</p>
<pre><span class="keyword"> void</span> set_max_include_nesting_depth(size_t new_depth);
size_t get_max_include_nesting_depth() <span class="keyword">const</span>;</pre>
<blockquote>
Expand All @@ -442,7 +471,7 @@ <h3>Control extended options</h3>
<font size="2">Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) </font> </p>
<span class="updated"></span>
<p class="copyright"><span class="updated">Last updated:
<!-- #BeginDate format:fcAm1m -->Tuesday, March 7, 2006 13:20<!-- #EndDate -->
<!-- #BeginDate format:fcAm1m -->Tuesday, March 7, 2006 13:23<!-- #EndDate -->
</span>
</p>
<p>&nbsp;</p>
Expand Down
Loading

0 comments on commit c959794

Please sign in to comment.