Commit Graph

69 Commits

Author SHA1 Message Date
Daniel James
b3b8feb4e1 Quickbook: Set version for release.
[SVN r78727]
2012-05-28 17:57:42 +00:00
Daniel James
80e65f66fe Quickbook: Deal with checked paths that aren't present. Refs #6691.
I think that the dependencies should just be files that were loaded, so
I changed it to do that, but added an extra (hidden for now) option to
list all paths that were checked, staring with a `+` for files that are
present, and `-` for files that are absent.

Also fixed a bug with the path resolver.

[SVN r77973]
2012-04-14 17:33:14 +00:00
Daniel James
23fbf1a714 Quickbook: Further dependencies development. Refs #6691
- Include relevant locations on path where file wasn't found.
- Improve `include_search` while I'm at it.
- Normalize paths for non-existent files.
- Tests, not integrated with Boost.Build yet. Needs to check that
  python is available then run the script with the location of the
  quickbook executable.

[SVN r77598]
2012-03-27 23:00:48 +00:00
Daniel James
a17fd624c7 Quickbook: Track dependencies in state. Refs #6691
- Use cananoical filenames where possible.
- Remove duplicates.
- Include SVG files.
- Less hacky.

[SVN r77490]
2012-03-22 23:19:30 +00:00
Daniel James
fc8d7bf0ef Quickbook: Rough stab at outputting dependencies. Refs #6691
Adds `--output-deps` flag. To write out dependencies to `deps.txt`:
{{{
quickbook --output-deps deps.txt source.qbk
}}}

If `--output-deps` is specified, quickbook won't generate an output file
unless one is specified with `--output-file`. If there is an error it
will return an error code, but it will still write out all the opened
files.

Known issues:
- If the same file is included/imported twice it may or may not list it
  twice. Should be consistent.
- Doesn't include SVG files. It probably should as they can affect the
  output.
- Need to check some of the path issues for things such as xinclude
  paths which depend on the output file path.
- Needs tests and documentation.

[SVN r77442]
2012-03-20 23:43:33 +00:00
Daniel James
9b332bdcf9 Quickbook: Merge from trunk.
[SVN r77380]
2012-03-18 18:44:50 +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
12feb1ad56 Quickbook: Merge to quickbook-dev
[SVN r76630]
2012-01-21 21:43:17 +00:00
Daniel James
f1d9efd4b7 Quickbook: Merge from trunk to quickbook-dev.
[SVN r75779]
2011-12-03 09:26:25 +00:00
Daniel James
2f1ab31350 Quickbook: More error checking for file handling.
[SVN r75769]
2011-12-02 08:28:57 +00:00
Daniel James
cc34500587 Quickbook: Merge from trunk to quickbook-dev
[SVN r75739]
2011-11-30 01:35:25 +00:00
Daniel James
a30b43f166 Quickbook: Windows compile fixes.
I really need to use either a custom string class or a custom stream class to
avoid this.


[SVN r75729]
2011-11-29 21:56:15 +00:00
Daniel James
cf6b21e786 Quickbook: Update version.
[SVN r75698]
2011-11-27 21:48:00 +00:00
Daniel James
32721bd39e Quickbook: Deal with invalid command line macros.
[SVN r75624]
2011-11-22 23:48:25 +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
43f9288487 Quickbook: Fix SVG handling.
- Fixes extension check.
- Looks for images relative to quickbook file instead of the current
  working directory, so that it will work when run from another
  directory.
- Allow user to specify the image location.
- Use `bbk_value` for synthesized attributes rather than `qbk_value`.
  It's the right thing to do, but doesn't make any practical difference.

Still not happy with image path handling. I feel that they should be
relative to the quickbook file and be rewritten - in a similar manner to
`xinclude`.

[SVN r75612]
2011-11-22 23:44:57 +00:00
Daniel James
a041edab9c Quickbook: Fail gracefully if document info is missing.
I also tweaked `pre` and `post` a bit while I was at it.

[SVN r75538]
2011-11-17 21:07:01 +00:00
Daniel James
476e11c3ab Quickbook: Make source mode a document attribute and fix implementation.
In quickbook 1.6, nested documents default to C++, regardless of the
parent's source mode so that they are interpreted as if they are
standalone documents.

[SVN r75528]
2011-11-17 21:04:02 +00:00
Daniel James
0ce22a2c67 Quickbook: Deal with doc attributes without doc info block.
[SVN r75526]
2011-11-17 21:03:25 +00:00
Daniel James
9711cead8b Quickbook: Parse lists with paragraphs.
Quite a big change. I moved the list logic into the grammar so that it's
easier to tell how to parse different blocks. Also reworked some of the
block vs. phrase stuff - it's a lot cleaner now which helped implement
this.  It generates terrible markup at the moment, but at least the
parser is in place.

[SVN r75446]
2011-11-10 18:17:00 +00:00
Daniel James
f1386c3ce5 Quickbook: no-self-linked-headers flag.
[SVN r75438]
2011-11-10 18:14:34 +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
3ae7265139 Quickbook: New version of id_manager. Fixes #1221.
This encapsulates more in the id and section handling code. Fixes a few
edge cases and separates implementation of the new and old section
handling code. Always normalizes and truncates generated ids in quickbook
1.6.

[SVN r75251]
2011-11-02 07:49:22 +00:00
Daniel James
894862e309 Quickbook: Sort a placeholder for doc_id.
[SVN r75250]
2011-11-02 07:45:03 +00:00
Daniel James
cd03beb84e Quickbook: Move doc_id into section_info.
And doc_id state saving into quickbook.cpp.

[SVN r75248]
2011-11-02 07:44:26 +00:00
Daniel James
a44ec6d363 Quickbook: Move section_info into id_generator.
And shuffle things round a bit to avoid adding too many dependents to
id_generator. For 1.6 I want section_info to use id_generator to nest
ids properly when there are duplicate section ids.

[SVN r75246]
2011-11-02 07:43:41 +00:00
Daniel James
3ab3116ee4 Quickbook: Reset section info for nested documents.
So when including a document inside a section, the section's id is not
used. Also cleans up the messy handling of section.min_leveln.

[SVN r75245]
2011-11-02 07:43:03 +00:00
Daniel James
bdca375f24 Quickbook: Set version for dev.
[SVN r75229]
2011-11-01 19:01:44 +00:00
Daniel James
77694a9ce4 Quickbook: Close any open sections at end of document.
[SVN r75220]
2011-11-01 18:59:08 +00:00
Daniel James
a2b3c3aa04 Quickbook: Merge from trunk to quickbook-dev.
[SVN r73365]
2011-07-25 21:41:36 +00:00
Daniel James
09165188f1 Quickbook: merge from trunk to dev.
[SVN r72762]
2011-06-26 11:07:04 +00:00
Daniel James
d90650a679 Quickbook: In 1.6, override document id with id from include element.
[SVN r71013]
2011-04-05 20:03:18 +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
a615a0a6e3 Quickbook: Nested documents in 1.6.
If an included file has a docinfo block, use that docinfo. I'm not
entirely sure if the nested file be treated as if it's completely
standalone - i.e. should macros and templates defined in the parent be
used?

Also, there's some odd behaviour in quickbook if the docinfo block in an
included file has a parse error. It just goes back to the start and
parses as a file without a docinfo block. I think it would be better if
this was a hard error, but what should happen in someone has defined a
template with the same name as a docinfo block? That's actually valid in
existing quickbook, so the dodgy docinfo block might just be a template
call.

[SVN r70963]
2011-04-03 21:15:14 +00:00
Daniel James
72958f8dfa Quickbook: 'alpha' version.
[SVN r70622]
2011-03-27 10:54:08 +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
ce9dcf4c2f Quickbook: windows fixes.
[SVN r70208]
2011-03-19 19:24:20 +00:00
Daniel James
35cae039f4 Quickbook: support escapes in simple markup.
[SVN r70204]
2011-03-19 19:13:38 +00:00
Daniel James
3b09b15f55 Quickbook: A couple of hidden flags for testing.
[SVN r70187]
2011-03-19 15:09:54 +00:00
Daniel James
f7c5e244e8 Quickbook: merge further 'value' development.
[SVN r70185]
2011-03-19 14:43:12 +00:00
Daniel James
f41178fa4d Quickbook: include boost version in version info.
[SVN r70052]
2011-03-17 09:08:05 +00:00
Daniel James
98266fe89a Quickbook: version bump.
[SVN r70050]
2011-03-17 09:06:50 +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
f8635bcb41 Another testing flag to allow testing xinclude.
Not ideal, since not testing normal use. But at least it would have
caught the error fixed in [68308].

[SVN r69181]
2011-02-22 20:47:15 +00:00
Daniel James
e4bddcebe5 Flag for testing errors.
quickbook-fail-test couldn't distinguish between correctly handled
errors and bugs, so add quickbook-error-test which will only succeed for
quickbook errors.

[SVN r69180]
2011-02-22 20:45:26 +00:00
Daniel James
0ce7cd0969 Use values for some more block markup.
[SVN r69172]
2011-02-22 20:33:24 +00:00