Commit Graph

47 Commits

Author SHA1 Message Date
Daniel James
62f4b4fcf3 More warnings 2017-09-03 04:50:35 +01:00
Daniel James
6b46281363 Fix some shadow warnings + tweak constructors
Fixed a lot of shadow warnings. Haven't actually turned shadow warnings
on, as there are a lot of warnings in dependencies. Also made some
constructors explicit, and tweaked the initialisers in some places.
2017-09-02 15:03:21 +01:00
Daniel James
a45ffc5772 Extract stream and path code from native_text 2017-08-09 20:12:47 +01:00
Daniel James
82dcaa8373 Use the string_iterator typedef 2017-08-06 12:38:11 +01:00
Rene Rivera
05bec31f90 Allow jam source to be included/imported with python parsing.
This allows *.jam files to be treated as python files when importing and
including since the jam comment syntax is the same a python. This allows
us to write docs with b2 build files.
2017-07-11 10:50:56 -06:00
Daniel James
38e5c35294 Wrapper for boost::string_view
Can be constructed from an rvalue std::string.
2017-03-26 19:55:21 +01:00
Daniel James
c70fb3ed5e Rename input_path.?pp to native_text.
[SVN r86645]
2013-11-12 09:16:18 +00:00
Daniel James
75842c4f5d Clean up poorly overloaded 'add' method.
[SVN r83120]
2013-02-24 11:22:33 +00:00
Daniel James
b2a5262c81 Convert to use boost::string_ref
[SVN r83116]
2013-02-24 11:21:31 +00:00
Daniel James
ad3097e83a Quickbook: Use custom stream-like class for console output.
Deals correctly with paths and UTF-8 strings.

[SVN r76789]
2012-01-30 00:05:59 +00:00
Daniel James
bcd3ca2aa5 Quickbook: Rename actions to state.
[SVN r76644]
2012-01-22 23:06:56 +00:00
Daniel James
30a3300297 Quickbook: Don't include actions.hpp from actions_class.hpp.
[SVN r76643]
2012-01-22 23:06:17 +00:00
Daniel James
672caeec17 Quickbook: Code block callouts.
[SVN r75897]
2011-12-11 11:16:01 +00:00
Daniel James
cc34500587 Quickbook: Merge from trunk to quickbook-dev
[SVN r75739]
2011-11-30 01:35:25 +00:00
Daniel James
44cdb88eec Quickbook: Deal with unbalanced code snippets.
[SVN r75627]
2011-11-22 23:49:26 +00:00
Daniel James
6be3b71545 Quickbook: Clean up starting and ending snippets.
[SVN r75626]
2011-11-22 23:48:54 +00:00
Daniel James
395526a447 Quickbook: Check that code snippet grammars always succeed.
[SVN r75625]
2011-11-22 23:48:39 +00:00
Daniel James
a7de315f0c Quickbook: Better string names for value.
`value` doesn't track what a string is encoded as, and sometimes it's
plain text not boostbook. It would be nice to track the encoding and
automatically do the right thing, but I'm not sure if it's worth the
effort just now.

[SVN r75619]
2011-11-22 23:47:02 +00:00
Daniel James
23e168a340 Quickbook: Use intrusive_ptr for files.
[SVN r75616]
2011-11-22 23:46:13 +00:00
Daniel James
650c3088c2 Quickbook: Track position in code blocks and snippets.
[SVN r75614]
2011-11-22 23:45:37 +00:00
Daniel James
a26a70fc7b Quickbook: Don't unindent code blocks in code snippets.
Because code blocks are added in sections, a nested section could be
unindented too far. Code is unindented in the main quickbook actions, so
there's actually no need to do it when extracting code snippets.

But this lead to left over whitespace that would have been stripped. So
change the `start_snippet` and `end_snippet` grammars to swallow up the
line they're on.

I also added a newline before the end of the snippet, this cleaned up
the occasional syntax error.

But due to these changes there is more leading and trailing whitespace
in the generated code blocks, so I just changed the code block grammar
to strip them out. This means there are no newlines at the beginning or
end of code blocks, but that should be fine.

[SVN r75613]
2011-11-22 23:45:16 +00:00
Daniel James
c9e3ea1ec7 Quickbook: Represent callouts in value tree.
[SVN r75262]
2011-11-02 08:47:31 +00:00
Daniel James
3ee432e250 Quickbook: Parse templates using the version they were defined for.
Needs to store the version in the file object, since it's only known
after the file is read in, had to make files non-const. Put some checks
in to make sure this isn't abused but pretty messy.

[SVN r75260]
2011-11-02 08:46:38 +00:00
Daniel James
4dea2a8ad5 Quickbook: Keep files in memory, stop tracking position in iterators.
Files are now permanently loaded. Quickbook substrings are stored as
references into the file. Now positions are stored as iterators into
the original file, the line and column is calculated when messages are
output.

This doesn't have much effect on efficiency but it simplifies a few
things.

[SVN r75253]
2011-11-02 07:57:47 +00:00
Daniel James
4a6dd9e97a Quickbook: Port Rene's sort code inclusion to quickbook-dev.
[SVN r75175]
2011-10-30 09:29:56 +00:00
Daniel James
4012b1f753 Quickbook: Merge to quickbook-dev.
[SVN r73983]
2011-08-21 13:27:52 +00:00
Daniel James
066d27a264 Quickbook: Better error messages when loading a file.
[SVN r70978]
2011-04-04 22:11:09 +00:00
Daniel James
d1cfea9f86 Quickbook: merge from trunk.
[SVN r70976]
2011-04-04 22:10:20 +00:00
Daniel James
85e8c03d70 Quickbook: Include code file in 1.6.
[SVN r70960]
2011-04-03 19:19:07 +00:00
Daniel James
bac2bf1f48 Quickbook: Small code clean ups.
[SVN r70865]
2011-04-02 17:42:57 +00:00
Daniel James
dc47dcbdc9 Quickbook: Don't require newlines at end of grammar.
[SVN r70617]
2011-03-27 10:31:13 +00:00
Daniel James
352a9ca028 Quickbook: Release lists from list builder.
[SVN r70562]
2011-03-26 11:11:58 +00:00
Daniel James
ff2fd55ac6 Quickbook: Use a different type for stored values.
And fix some bugs in the process.

[SVN r70529]
2011-03-24 21:25:50 +00:00
Daniel James
e478c5befb Quickbook: Use values for templates and snippets.
[SVN r70528]
2011-03-24 21:25:18 +00:00
Daniel James
bee5d0dd77 Quickbook: Small cleanups.
Mostly avoiding warnings, and removing unnecessary includes.

[SVN r70526]
2011-03-24 21:24:24 +00:00
Daniel James
345f0a2648 Quickbook: pass-thru comments.
[SVN r70207]
2011-03-19 19:22:45 +00:00
Daniel James
496cdb2ed6 Merge improved unicode support on windows for quickbook.
[SVN r70044]
2011-03-17 00:12:56 +00:00
Daniel James
6500170f49 Pass-thru comments.
[SVN r70018]
2011-03-16 09:12:01 +00:00
Daniel James
704e3e7217 Don't require newlines at end of grammars.
[SVN r69888]
2011-03-12 10:08:00 +00:00
Daniel James
9557da3e43 Use filesystem alias more consistently.
[SVN r68394]
2011-01-23 16:45:57 +00:00
Daniel James
024feb181b Change the way the filename is stored.
No longer stored in the iterator which means there's less messing around
with pointers and strings. Always stored as a fs::path which will help
with support for unicode. Also passed to outwarn and outerr as fs::path
so they can handle writing unicode filenames to the output.

[SVN r68392]
2011-01-23 16:42:51 +00:00
Daniel James
ad9145c6fd Create a parser to extract block as an attribute.
This lets us get rid of temp_para, a source of nasty bugs. Also should
make it easier to nest blocks in the future.

[SVN r65418]
2010-09-14 20:44:22 +00:00
Daniel James
0aa633b450 Use confix parsers in a few places.
[SVN r65359]
2010-09-09 00:11:02 +00:00
Daniel James
ac0ea799eb Use explicit namespaces.
[SVN r65357]
2010-09-09 00:09:34 +00:00
Daniel James
d67b0e3931 Fix argument position in break_arguments.
And some small code_snippet improvements.

[SVN r65280]
2010-09-05 08:14:16 +00:00
Daniel James
4fb6a45290 Use C strings in position_iterator.
Copying std::string in position_iterator was taking up a lot of
execution time.

[SVN r65104]
2010-08-29 11:20:57 +00:00
Daniel James
ae95377f50 Move most of code_snippet into its own file.
[SVN r65036]
2010-08-26 21:00:38 +00:00