Commit Graph

1426 Commits

Author SHA1 Message Date
Daniel James
395526a447 Quickbook: Check that code snippet grammars always succeed.
[SVN r75625]
2011-11-22 23:48:39 +00:00
Daniel James
32721bd39e Quickbook: Deal with invalid command line macros.
[SVN r75624]
2011-11-22 23:48:25 +00:00
Daniel James
ffd808966e Quickbook: Replace id/dirname TODO with a new TODO.
[SVN r75623]
2011-11-22 23:48:09 +00:00
Daniel James
0f4dcb961f Quickbook: Swallow up doc info fallback value.
[SVN r75622]
2011-11-22 23:47:52 +00:00
Daniel James
b8cb0d4f4d Quickbook: Extract image attribute printer.
[SVN r75621]
2011-11-22 23:47:34 +00:00
Daniel James
1165c7a147 Quickbook: Only use explicit alt text.
[SVN r75620]
2011-11-22 23:47:19 +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
7e6f023689 Quickbook: Add static check that Scanner is what the code assumes.
[SVN r75618]
2011-11-22 23:46:45 +00:00
Daniel James
537513de13 Quickbook: Add note about how import/include works.
[SVN r75617]
2011-11-22 23:46:31 +00:00
Daniel James
23e168a340 Quickbook: Use intrusive_ptr for files.
[SVN r75616]
2011-11-22 23:46:13 +00:00
Daniel James
1a32f82bdb Quickbook: Remove qbk_value.
[SVN r75615]
2011-11-22 23:45:53 +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
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
7ff2843d9f Quickbook: No need to save phrase for syntax highlighter.
I pushes the phrase collector whenever it parses escaped quickbook, and
stores its generated code in a separate collector.

[SVN r75611]
2011-11-22 23:44:32 +00:00
Daniel James
48d023522b Quickbook: Some id_manager clean up.
Tweak the id handling for using 1.5- compatibility mode inside 1.6
documents (you can't see this in the tests).

[SVN r75610]
2011-11-22 23:44:16 +00:00
Daniel James
caf01e40e7 Quickbook: Prevent 'endsect' from ending an include id.
[SVN r75539]
2011-11-17 21:07:16 +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
317704c7b7 Quickbook: Fix issue with unbalanced sections.
[SVN r75537]
2011-11-17 21:06:44 +00:00
Daniel James
af94d16c68 Quickbook: Move id_state together.
[SVN r75536]
2011-11-17 21:06:25 +00:00
Daniel James
1451ace82e Quickbook: values don't actually use intrustive_ptr anymore.
Although I kept the increment and decrement funcitons as it's a useful
convention.

[SVN r75535]
2011-11-17 21:06:11 +00:00
Daniel James
ad0d5cd69b Quickbook: Another id_manager rewrite.
Now separates file and section tracking, since sections aren't
necessarily cleanly nested in files, and files have some local state.

[SVN r75534]
2011-11-17 21:05:53 +00:00
Daniel James
0081b73a34 Quickbook: 1.6 note.
[SVN r75533]
2011-11-17 21:05:33 +00:00
Daniel James
edc0060910 Quickbook: Empty ids and titles.
[SVN r75532]
2011-11-17 21:05:17 +00:00
Daniel James
e10c641c1e Quickbook: Clean up version info processing code.
[SVN r75531]
2011-11-17 21:04:57 +00:00
Daniel James
539a12be2a Quickbook: Generate dirname in doc_info_actions.
This was always a bit silly. I was originally going to change it to only
use an explicit dirname, but dirname is technically required by the
boostbook dtd. There's no particular reason to maintain backwards
compatibility though.

[SVN r75530]
2011-11-17 21:04:42 +00:00
Daniel James
d125ab418c Quickbook: Trim trailing space from document title.
[SVN r75529]
2011-11-17 21:04:27 +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
53be4f1e81 Quickbook: Add boost versions to old releases.
[SVN r75527]
2011-11-17 21:03:41 +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
719731e8ba Quickbook: Split up the doc info parser.
[SVN r75525]
2011-11-17 21:03:06 +00:00
Daniel James
f4a09997c8 Quickbook: Rename some variables.
[SVN r75524]
2011-11-17 21:02:52 +00:00
Daniel James
03af2bf876 Quickbook: Move the backwards compatible id thing into id_manager.
[SVN r75523]
2011-11-17 21:02:36 +00:00
Daniel James
25879e161c Quickbook: Move the no_eols stuff into main_grammar.cpp.
[SVN r75522]
2011-11-17 21:02:21 +00:00
Daniel James
506310c682 Quickbook: Fix the preformatted parser for 1.6.
In the old parser, the `eol` never matched anything because the `space`
would gobble up any newlines, so I'm pretty sure the intent was to use
`blank` to remove any leading spaces. So do that in 1.6.

[SVN r75521]
2011-11-17 21:01:55 +00:00
Daniel James
892d725694 Quickbook: Merge documentation change.
[SVN r75451]
2011-11-12 12:03:30 +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
5f5c526ea3 Quickbook: Better table titles.
[SVN r75445]
2011-11-10 18:16:37 +00:00
Daniel James
00f06ac438 Quickbook: Convert quickbook docs to 1.6
[SVN r75444]
2011-11-10 18:16:19 +00:00
Daniel James
9a158d6bf3 Quickbook: Don't require newlines in docinfo.
[SVN r75443]
2011-11-10 18:16:03 +00:00
Daniel James
952b3b6550 Quickbook: Support version info outside of document info blocks.
[SVN r75442]
2011-11-10 18:15:49 +00:00
Daniel James
34c053f833 Quickbook: Parse version as for any other docinfo attribute.
[SVN r75441]
2011-11-10 18:15:30 +00:00
Daniel James
6f991cde11 Quickbook: Fix order of docinfo tags.
[SVN r75440]
2011-11-10 18:15:14 +00:00
Daniel James
be5f066299 Quickbook: Remove trailing spaces in explicit code blocks.
[SVN r75439]
2011-11-10 18:14:53 +00:00
Daniel James
f1386c3ce5 Quickbook: no-self-linked-headers flag.
[SVN r75438]
2011-11-10 18:14:34 +00:00
Daniel James
0e7874bfb6 Quickbook: Fix some tests.
I use compatibility mode to decide whether to link headers to
themselves. I'm not sure about that.

[SVN r75437]
2011-11-10 18:14:08 +00:00
Daniel James
fc7e9d0919 Quickbook: Start to document 1.6
[SVN r75363]
2011-11-06 22:23:48 +00:00
Daniel James
8bb70e9c3b Quickbook: Revert documentation to trunk.
[SVN r75362]
2011-11-06 22:23:29 +00:00
Daniel James
1e3a88f440 Quickbook: Support escapes in links, anchors, images, includes, imports and exports.
[SVN r75360]
2011-11-06 22:22:42 +00:00
Daniel James
5470260f54 Quickbook: Make the version checker a parser.
[SVN r75359]
2011-11-06 22:22:12 +00:00