Commit Graph

1191 Commits

Author SHA1 Message Date
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
354f26e020 Quickbook: Fix code blocks in quickbook docs.
Under 1.6 indentation rules they were interpreted as paragraphs inside a list
item. An alternative fix would have been to increase the indentation so that it
was more than the previous list item's.


[SVN r75703]
2011-11-28 08:47:11 +00:00
Daniel James
cc3ec7f700 Quickbook: Fix list processing bug.
[SVN r75700]
2011-11-28 00:13:10 +00:00
Daniel James
46cd4c2dba Quickbook: Fix error with empty macro defines.
[SVN r75699]
2011-11-27 22:45:55 +00:00
Daniel James
cf6b21e786 Quickbook: Update version.
[SVN r75698]
2011-11-27 21:48:00 +00:00
Daniel James
684e03c894 Quickbook: Remove files left over after merge.
[SVN r75697]
2011-11-27 21:41:42 +00:00
Daniel James
ef6628f851 Quickbook: Merge from quickbook-dev to trunk.
[SVN r75696]
2011-11-27 21:34:56 +00:00
Daniel James
e1a8323497 Quickbook: Fix contexts.
[SVN r75633]
2011-11-23 00:01:25 +00:00
Daniel James
73f76e778e Quickbook: Allow block elements in lists.
[SVN r75632]
2011-11-22 23:50:48 +00:00
Daniel James
c518701be9 Quickbook: Allocate correctly sized buffer for cygwin.
[SVN r75631]
2011-11-22 23:50:32 +00:00
Daniel James
e779bb6f08 Quickbook: Avoid expanding macros that are now invalid.
The macro syntax has been tightened up in 1.6, so that fewer characters
are available for macro identifiers. But macros can still be defined
using the older quickbook versions When such macros are defined, prevent
them from expanding in a quickbook 1.6 document.

[SVN r75630]
2011-11-22 23:50:17 +00:00
Daniel James
16fe2e20e0 Quickbook: Remove incorrect line number.
There's no pressing need to have a line number here. Could possibly
create an error per duplicate attribute with the correct line numbers.

I have half a plan to integrate the docinfo grammar with the main
grammar, this would involve arranging the action calls so that the full
position info is available. Would probably also process the document
attributes before the docinfo attributes.

[SVN r75629]
2011-11-22 23:49:58 +00:00
Daniel James
0cc4910fc4 Quickbook: Quickbook values are always references now.
And store an intrusive pointer to they maintain the lifetime of the
text they refer to.

[SVN r75628]
2011-11-22 23:49:43 +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
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