Commit Graph

1191 Commits

Author SHA1 Message Date
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
Daniel James
0bd528ce8d Quickbook: Clean up some of the value parser stuff.
Since values are now used in most places, a lot of the complexity became
unnecessary. Some of the string stuff in values.cpp is now redundant,
but I'll leave it alone for now.

[SVN r75358]
2011-11-06 22:21:50 +00:00
Daniel James
1531b4f348 Quickbook: Move more phrase parsing into local.common.
This change has two side effects: anchors are placed slightly better and
non-element/template square brackets are terminated by the end of a
paragraph.

[SVN r75357]
2011-11-06 22:21:32 +00:00
Daniel James
febcb14e01 Quickbook: Some anchor placement tests.
[SVN r75356]
2011-11-06 22:21:17 +00:00
Daniel James
3279b99901 Quickbook: Try make some sense of the various block/phrase rules.
[SVN r75355]
2011-11-06 22:21:01 +00:00
Daniel James
b9f3b68580 Quickbook: No point in using hard_space here.
The difference between `hard_space` and `space` is that `hard_space`
won't have a zero-width match in certain places. But in the `-` part of
a classic spirit rule, zero-width matches don't count so there's
effectively no difference.

[SVN r75354]
2011-11-06 22:20:44 +00:00
Daniel James
99a9e73b4d Quickbook: Rename methods for extracting docinfo values.
[SVN r75353]
2011-11-06 22:20:29 +00:00
Daniel James
e48ed3afe7 Quickbook: xmlbase docinfo attributes.
Useful for escaped `xi:include`.

(does this break horribly if it's given an absolute path?).

[SVN r75352]
2011-11-06 22:20:14 +00:00
Daniel James
4e411e96ce Quickbook: Better punctuation support for various elements.
[SVN r75351]
2011-11-06 22:19:53 +00:00
Daniel James
cdcd5349f6 Quickbook: Better parser for hr.
The old version had issues with multi-line comments.

[SVN r75350]
2011-11-06 22:19:25 +00:00
Daniel James
9fe74a58e4 Quickbook: Use a closure instead of scoped_context.
[SVN r75349]
2011-11-06 22:19:05 +00:00
Daniel James
d5a788063a Quickbook: Fix Visual C++ compile errors.
[SVN r75348]
2011-11-06 22:18:49 +00:00
Daniel James
1058b13396 Quickbook: Compatibility mode to make upgrading easier.
[SVN r75347]
2011-11-06 22:18:32 +00:00
Daniel James
3afae60dd4 Quickbook: Fix old changelog entry.
[SVN r75340]
2011-11-06 09:33:55 +00:00
Daniel James
9f606dc46f Merge to release several changes for 1.48.
[SVN r75293]
2011-11-04 02:31:36 +00:00
Daniel James
a2fe7199c9 Quickbook: Better encoded template support.
- Detect encoded templates in `call_template` so they're handled if
  anything calls it or `call_code_snippet` directly.
- Handle any paragraphs that comebefore a encoded block template.
- Escaped templates should always be inline, it isn't block content.
- Try to support escaped encoded templates. It's a bit of a weird case
  so I wasn't sure what to do. Just wrote out the boostbook in a phrase
  which seems the best option.
- Escapes now override the template type. This should happen as the user
  explictly asks for an escaped template.

[SVN r75270]
2011-11-02 08:52:05 +00:00
Daniel James
af4ea5b066 Quickbook: Deal with blocks following anchors.
Turn anchors into a special type of element that can either be a block
or a phrase, so that when immediately followed by block content, the
parser will do the right thing.

`xinclude` and conditional phrases might need similar treatment,
although they're trickier.

[SVN r75269]
2011-11-02 08:51:41 +00:00
Daniel James
3e91b39fa3 Quickbook: Move scoped_context into main_grammar.
It's only used there so it fits into main_grammar's local state. It
would probably be a good idea to move more parsing stuff out of actions.
Or maybe the document state should be moved out of actions.

[SVN r75268]
2011-11-02 08:51:16 +00:00
Daniel James
1aede8bf77 Quickbook: Make windows paths an error in 1.6
[SVN r75267]
2011-11-02 08:50:53 +00:00
Daniel James
4c9d028578 Quickbook: break_action is no longer deprecateed.
[SVN r75266]
2011-11-02 08:50:30 +00:00
Daniel James
fee3477a76 Quickbook: Move syntax highlight actions.
Plus a little bit of a cleanup. There's a little bit of duplication
caused by this, but I think the clarity is worth it. Really do need a
better way of handling actions.

[SVN r75265]
2011-11-02 08:49:59 +00:00
Daniel James
0ee79fe849 Quickbook: Move escaped phrase handling to the main grammar.
Note there's no need to check for the end of the escapse as the
intersection (`&`) rule only passes the content within the esapse.

[SVN r75264]
2011-11-02 08:49:33 +00:00
Daniel James
5be4962caf Quickbook: Fix issue with mixed version templates.
If a 1.5 template called a 1.4 template, its parent would be its
'dynamic' parent (the 1.5 template), whose parent would be its lexical
parent - breaking the dynamic lookup. I've changed it so that when
using a dynamic lookup, 1.5+ templates are skipped over. That means
they can use whatever variable names they wish without issues.

It does mean that if a 1.4- template was specifically written to use
dynamic lookup, then it wouldn't be callable from 1.5. So it might
be better if they didn't skip over 1.5+ templates.

Alternatively if might be better to always lexical scoping, even for
older versions, on the assumption that it was a bug.

[SVN r75263]
2011-11-02 08:48:52 +00:00
Daniel James
c9e3ea1ec7 Quickbook: Represent callouts in value tree.
[SVN r75262]
2011-11-02 08:47:31 +00:00
Daniel James
0f28f2da9c Quickbook: Store template_body as just a value.
[SVN r75261]
2011-11-02 08:47:01 +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
f627c79f88 Quickbook: Add 'block' element.
[SVN r75259]
2011-11-02 08:46:05 +00:00
Daniel James
5530f14171 Quickbook: Fix rebase error in last commit.
In the offline version I had made some changes to string handling that I
decided not to check in. The last change relied on them.

[SVN r75258]
2011-11-02 08:41:09 +00:00
Daniel James
2fb0330405 Quickbook: Trim leading underscores in normalized ids.
[SVN r75257]
2011-11-02 07:59:12 +00:00
Daniel James
e146d8dd90 Quickbook: Prioritize explicit ids.
[SVN r75256]
2011-11-02 07:58:52 +00:00
Daniel James
ea063efe1f Quickbook: role tag for 1.6. Refs #5860.
This implements the markup `[role red Some red text]`. Although I'm not
sure I like it that much. It would be pretty easy to use a template for
the same effect.

This is just the quickbook part of supporting coloured text, to complete
the ticket there needs to be css support for html pages and xsl support
for pdfs.

[SVN r75255]
2011-11-02 07:58:32 +00:00
Daniel James
eec3f7304c Quickbook: Only create the syntax highlighter keywords once.
Symbol tables are really expensive to create, so share between all
instances of `cpp_highlight` and `python_highlight`. It would be better
to create all the grammars just once, but that's trickier as they're quite
stateful and they're not nearly as expensive as the symbol tables.

[SVN r75254]
2011-11-02 07:58:11 +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
84c637c7eb Quickbook: Separate string_ref.
[SVN r75252]
2011-11-02 07:49:52 +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