Commit Graph

69 Commits

Author SHA1 Message Date
Daniel James
0ce22a2c67 Quickbook: Deal with doc attributes without doc info block.
[SVN r75526]
2011-11-17 21:03:25 +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
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
1e3a88f440 Quickbook: Support escapes in links, anchors, images, includes, imports and exports.
[SVN r75360]
2011-11-06 22:22:42 +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
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
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
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
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
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
59e67eae30 Quickbook: Put all the section tracking stuff in a struct.
[SVN r75244]
2011-11-02 07:42:37 +00:00
Daniel James
39e3a6e670 Quickbook: Fix including from inside a section.
It's a bit of a crazy edge case which creates invalid docbook in 1.6.

[SVN r75236]
2011-11-01 19:21:36 +00:00
Daniel James
a2b3c3aa04 Quickbook: Merge from trunk to quickbook-dev.
[SVN r73365]
2011-07-25 21:41:36 +00:00
Daniel James
9b1eed66f4 Quickbook: Merge from trunk to quickbook-dev.
[SVN r73239]
2011-07-19 07:35:49 +00:00
Daniel James
09165188f1 Quickbook: merge from trunk to dev.
[SVN r72762]
2011-06-26 11:07:04 +00:00
Daniel James
bf1d753dba Merge tools directory from trunk.
[SVN r72698]
2011-06-20 19:19:56 +00:00
Daniel James
d4344ed435 Quickbook: Remove most of process suppression stuff.
Imports were failing because doc info expected values. The process_state
stuff is too fragile, so instead just process the contents of a
conditional phrase and discard them afterwards. Still suppresses all
elements.

[SVN r71062]
2011-04-06 23:59:24 +00:00
Daniel James
d72d923f2e Quickbook: Write out blocks smuggled into phrases.
Pretty clumsy, but it's a dodgy thing to do. Maybe the values could
include whether they're blocks or phrases and actions could react
accordingly.

[SVN r71060]
2011-04-06 23:58:44 +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
9489385464 Quickbook: Import templates+macros from quickbook file in 1.6
[SVN r70959]
2011-04-03 19:18:38 +00:00
Daniel James
02406bf553 Quickbook: Scope templates in include in 1.6
[SVN r70958]
2011-04-03 19:18:12 +00:00
Daniel James
6e38216bc3 Quickbook: Clearer tracking of state in templates and files.
Not quite exception safe, since macros can't be swapped.

[SVN r70872]
2011-04-02 17:45:28 +00:00
Daniel James
87d71d0633 Quickbook: Alternative tst that's cheaper to copy.
[SVN r70871]
2011-04-02 17:45:09 +00:00
Daniel James
1c9648e21d Quickbook: Clean up anchor stuff.
[SVN r70564]
2011-03-26 11:12:45 +00:00
Daniel James
03456cb4c4 Quickbook: Template as value.
[SVN r70563]
2011-03-26 11:12:19 +00:00
Daniel James
42c353f617 Quickbook: Remove remainging uses for markup_action.
[SVN r70525]
2011-03-24 21:23:54 +00:00
Daniel James
85cb554400 Quickbook: use relative paths in errors and __FILENAME__.
This is more consistent than it is at the moment. For the __FILENAME__
macro, use the path relative to the original file or the location last
matched on the include path. This ensures that the macro is consistent
no matter which directory you call quickbook from.

Also enable `__FILENAME__` in debug mode - so I can test this.

[SVN r70230]
2011-03-20 21:41:18 +00:00
Daniel James
ec6300c841 Quickbook: further improvements for simple markup.
[SVN r70196]
2011-03-19 16:28:49 +00:00
Daniel James
97c2a337ea Quickbook: nestable elements. Refs #1193
[SVN r70189]
2011-03-19 15:19:09 +00:00
Daniel James
a9dd56e168 Quickbook: simplify a couple of things.
[SVN r70188]
2011-03-19 15:12:55 +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
a6606bdba6 Use values for lists.
[SVN r69178]
2011-02-22 20:41:36 +00:00
Daniel James
493aa3d1af Clean up paragraphs a little.
[SVN r69176]
2011-02-22 20:38:41 +00:00
Daniel James
2f8000ab9b Phrase elements.
[SVN r69175]
2011-02-22 20:36:46 +00:00
Daniel James
5ebb425b6a Rest of the block elements.
[SVN r69174]
2011-02-22 20:35:54 +00:00
Daniel James
cc83a0c4fe Better scoped_parser.
[SVN r69173]
2011-02-22 20:35:03 +00:00
Daniel James
0ce7cd0969 Use values for some more block markup.
[SVN r69172]
2011-02-22 20:33:24 +00:00
Daniel James
9a0e44ac88 Convert begin and end section to new style.
[SVN r69170]
2011-02-22 20:31:27 +00:00
Daniel James
0ce077188f Try out more dynamic action dispatch.
Rather than a switch case, the final version will probably use something
like `std::map<value_tag, boost::function<...> >` to dispatch the
actions.

[SVN r69167]
2011-02-22 20:29:23 +00:00
Daniel James
aec8a1cefb Use values for headings, sections and some phrase elements.
[SVN r69165]
2011-02-22 20:28:10 +00:00
Daniel James
551db999f2 Use values for doc info.
[SVN r68888]
2011-02-15 00:24:55 +00:00
Daniel James
e945ae4604 Use values for various block elements.
[SVN r68887]
2011-02-15 00:23:57 +00:00
Daniel James
3385beaac2 Remove attributes from scoped_block.
[SVN r68886]
2011-02-15 00:23:07 +00:00
Daniel James
5b5548f9de Use values for calling templates.
[SVN r68885]
2011-02-15 00:22:20 +00:00
Daniel James
2763816a80 Use the new value class for images.
[SVN r68884]
2011-02-15 00:21:37 +00:00
Daniel James
5f7636fce2 Nicer link break warnings.
[SVN r68609]
2011-02-02 00:19:24 +00:00