1<?xml version="1.0" encoding="UTF-8" ?> 2<!DOCTYPE language SYSTEM "language.dtd"> 3<language 4 5name="quickbook" 6version="0.9.4" 7kateversion="2.4" 8section="boost::hs" 9extensions="*.qbk" 10mimetype="allFiles" 11author="Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com" 12license="Distributed under the Boost Software License, Version 1.0. 13http://www.boost.org/LICENSE_1_0.txt" 14 15> 16 17<highlighting> 18 19<!-- Contexts --> 20 21<contexts> 22 23<!-- 24 Main context 25 This is bottom the context, every thing the user type will stack another 26 context. This context is special because some things can only be called 27 from here. (e.g. The quickbook description) 28--> 29 30<context name="c_main" attribute="d_normal" lineEndContext="#stay"> 31 32 <IncludeRules context="c_main_before_code" /> 33 <IncludeRules context="c_cpp_code_block_finder" /> 34 <IncludeRules context="c_main_after_code" /> 35 <IncludeRules context="c_normal" /> 36 37</context> 38 39<context name="c_main_before_code" attribute="d_normal" lineEndContext="#stay"> 40 41 <IncludeRules context="c_sections_finder" /> 42 <IncludeRules context="c_predefined_macros" /> 43 <IncludeRules context="c_boost::hs call finder" /> 44 <IncludeRules context="c_item_list_finder" /> 45 46</context> 47 48<context name="c_main_after_code" attribute="d_normal" lineEndContext="#stay"> 49 50 <IncludeRules context="c_scape_sequence_finder" /> 51 <IncludeRules context="c_headings_finder" /> 52 <IncludeRules context="c_includes_finder" /> 53 <IncludeRules context="c_macro_definition_finder" /> 54 <IncludeRules context="c_template_definition_finder" /> 55 <IncludeRules context="c_quickbook_type_finder" /> 56 <IncludeRules context="c_text_block_finder" /> 57 <IncludeRules context="c_table_finder" /> 58 <IncludeRules context="c_variable_list_finder" /> 59 <IncludeRules context="c_import_finder" /> 60 61</context> 62 63<!-- Common Structures, this constructions can be called in almost every context --> 64 65<context name="c_common_structures" attribute="d_normal" lineEndContext="#stay"> 66 67 <DetectSpaces/> 68 <IncludeRules context="c_common_structures_before_code" /> 69 <IncludeRules context="c_cpp_inline_code_block_finder" /> 70 <IncludeRules context="c_common_structures_after_code" /> 71 72</context> 73 74<context name="c_common_structures_before_code" attribute="d_normal" lineEndContext="#stay"> 75 76 <DetectSpaces/> 77 <IncludeRules context="c_scape_sequence_finder" /> 78 <IncludeRules context="c_predefined_macros" /> 79 <IncludeRules context="c_language_finder" /> 80 <IncludeRules context="c_comment_finder" /> 81 <IncludeRules context="c_boost::hs call finder" /> 82 <IncludeRules context="c_no_processing_finder" /> 83 84</context> 85 86<context name="c_common_structures_after_code" attribute="d_normal" lineEndContext="#stay"> 87 88 <IncludeRules context="c_anchor_finder" /> 89 <IncludeRules context="c_image_finder" /> 90 <IncludeRules context="c_link_finder" /> 91 <IncludeRules context="c_cpp_link_finder" /> 92 <IncludeRules context="c_text_format_finder" /> 93 94</context> 95 96<!-- Normal contex, defines plain text and look for a structure to appear --> 97 98<context name="c_normal" attribute="d_normal" lineEndContext="#stay"> 99 100 <!-- For performance the [endsect] resets the engine --> 101 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 102 103 <IncludeRules context="c_common_structures" /> 104 <IncludeRules context="c_simple_text_block_finder" /> 105 106</context> 107 108<!-- Inside tables and list, you can not use every construction --> 109 110<context name="c_strict_normal" attribute="d_normal" lineEndContext="#stay"> 111 112 <!-- For performance the [endsect] resets the engine --> 113 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 114 115 <IncludeRules context="c_common_structures" /> 116 117</context> 118 119<!-- Normal block contexs, this contexts will be stacked so we can know the state --> 120 121<context name="c_normal_block" attribute="d_normal" lineEndContext="#stay"> 122 <IncludeRules context="c_normal" /> 123 <DetectChar char="]" attribute="d_structure" context="#pop" /> 124</context> 125 126<context name="c_normal_bold_block" attribute="d_normal_bold" lineEndContext="#stay"> 127 <IncludeRules context="c_normal" /> 128 129 <DetectChar char="]" attribute="d_structure" context="#pop" /> 130</context> 131 132<context name="c_indirect_normal_block" attribute="d_normal" lineEndContext="#stay"> 133 <IncludeRules context="c_normal" /> 134 135 <DetectChar char="]" attribute="d_structure" context="#pop#pop" /> 136</context> 137 138<context name="c_deep_normal_block" attribute="d_normal" lineEndContext="#stay"> 139 <IncludeRules context="c_normal" /> 140 <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" /> 141</context> 142 143<context name="c_indirect_normal_bold_block" attribute="d_normal_bold" lineEndContext="#stay"> 144 <IncludeRules context="c_normal" /> 145 146 <DetectChar char="]" attribute="d_structure" context="#pop#pop" /> 147</context> 148 149<!-- Blocks used in macros and templates bodies --> 150 151<context name="c_indirect_main_block" attribute="d_normal" lineEndContext="#stay"> 152 <IncludeRules context="c_main" /> 153 154 <DetectChar char="]" attribute="d_structure" context="#pop#pop" /> 155</context> 156 157<context name="c_deep_main_block" attribute="d_normal" lineEndContext="#stay"> 158 <IncludeRules context="c_main" /> 159 <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" /> 160</context> 161 162<!-- No processing block --> 163 164<context name="c_no_processing_block" attribute="d_normal" lineEndContext="#stay"> 165 <IncludeRules context="c_predefined_macros" /> 166 <StringDetect String="'''" attribute="d_structure" context="#pop" endRegion="r_no_processing"/> 167</context> 168 169<context name="c_no_processing_finder" attribute="d_normal" lineEndContext="#stay"> 170 <StringDetect String="'''" attribute="d_structure" context="c_no_processing_block" beginRegion="r_no_processing"/> 171</context> 172 173<!-- Items list finder --> 174 175<context name="c_item_list" attribute="d_normal" lineEndContext="#stay"> 176 <RegExpr String="^\s*[\*\#]\s" minimal="true" attribute="d_structure" context="c_item_list"/> 177 <RegExpr String="^." minimal="true" attribute="d_structure" lookAhead="true" context="#pop"/> 178 <IncludeRules context="c_strict_normal" /> 179</context> 180 181<context name="c_item_list_finder" attribute="d_normal" lineEndContext="#stay"> 182 <RegExpr String="^\s*[\*\#]\s" minimal="true" attribute="d_structure" context="c_item_list"/> 183</context> 184 185<!-- Code blocks --> 186 187<context name="c_back_to_quickbook_block" attribute="d_normal" lineEndContext="#stay"> 188 <Detect2Chars char="`" char1="`" attribute="d_structure" context="#pop" /> 189 <IncludeRules context="c_strict_normal" /> 190</context> 191 192<context name="c_code_block" attribute="d_normal" lineEndContext="#stay"> 193 <RegExpr String="^[\S]" minimal="true" attribute="d_structure" lookAhead="true" context="#pop" /> 194 <Detect2Chars char="`" char1="`" attribute="d_structure" context="c_back_to_quickbook_block" /> 195 <IncludeRules context="c_predefined_macros" /> 196 <IncludeRules context="##C++" /> 197</context> 198 199<context name="c_preformated_code_block" attribute="d_normal" lineEndContext="#stay"> 200 <Detect2Chars char="`" char1="`" attribute="d_structure" context="#pop" endRegion="r_code_block" /> 201 <IncludeRules context="c_predefined_macros" /> 202 <IncludeRules context="##C++" /> 203</context> 204 205<context name="c_inline_code_block" attribute="d_normal" lineEndContext="#stay"> 206 <DetectChar char="`" attribute="d_structure" context="#pop" /> 207 <IncludeRules context="c_predefined_macros" /> 208 <IncludeRules context="##C++"/> 209</context> 210 211<context name="c_cpp_code_block_finder" attribute="d_normal" lineEndContext="#stay"> 212 <RegExpr String="^[\s]" minimal="true" attribute="d_structure" context="c_code_block" /> 213</context> 214 215<context name="c_cpp_inline_code_block_finder" attribute="d_normal" lineEndContext="#stay"> 216 <Detect2Chars char="`" char1="`" attribute="d_structure" context="c_preformated_code_block" beginRegion="r_code_block" /> 217 <DetectChar char="`" attribute="d_structure" context="c_inline_code_block" /> 218</context> 219 220<context name="c_language_finder" attribute="d_normal" lineEndContext="#stay"> 221 <StringDetect String="[c++]" attribute="d_structure" context="#stay" /> 222 <StringDetect String="[python]" attribute="d_structure" context="#stay" /> 223</context> 224 225<!-- Sections and Headings --> 226 227<context name="c_section_definition" attribute="d_anchor" lineEndContext="#stay"> 228 <DetectChar char=" " attribute="d_structure" context="c_indirect_normal_bold_block" /> 229</context> 230 231<context name="c_sections_finder" attribute="d_normal" lineEndContext="#stay"> 232 <StringDetect String="[section" attribute="d_structure" context="c_section_definition" beginRegion="r_section" /> 233 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop" endRegion="r_section"/> 234</context> 235 236<context name="c_headings_finder" attribute="d_normal" lineEndContext="#stay"> 237 <StringDetect String="[heading" minimal="true" attribute="d_structure" context="c_normal_bold_block" /> 238 <RegExpr String="\[h[1-6]\b" minimal="true" attribute="d_structure" context="c_normal_bold_block" /> 239</context> 240 241 242<!-- Macros --> 243 244<context name="c_macro_definition" attribute="d_macro" lineEndContext="c_indirect_main_block"> 245 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_main_block" /> 246</context> 247 248<context name="c_predefined_macros" attribute="d_macro"> 249 <RegExpr String="[_]{2}[\w_]+[_]{2}" minimal="true" attribute="d_macro" context="#stay" /> 250</context> 251 252<context name="c_macro_definition_finder" attribute="d_normal" lineEndContext="#stay"> 253 <RegExpr String="\[def\b[\s]*" attribute="d_structure" context="c_macro_definition" /> 254</context> 255 256 257<!-- Templates --> 258 259<context name="c_template_parameters" attribute="d_path" lineEndContext="#stay"> 260 <DetectChar char="]" attribute="d_structure" context="c_deep_main_block" /> 261</context> 262 263<context name="c_template_definition" attribute="d_macro" lineEndContext="c_indirect_main_block"> 264 <DetectChar char="[" attribute="d_structure" context="c_template_parameters" /> 265 <RegExpr String="\\\s" minimal="true" attribute="d_structure" context="c_indirect_main_block"/> 266 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_main_block" /> 267</context> 268 269<context name="c_template_definition_finder" attribute="d_normal" lineEndContext="#stay"> 270 <RegExpr String="\[template\b[\s]*" attribute="d_structure" context="c_template_definition" /> 271</context> 272 273<!-- Text format logic --> 274 275<context name="c_text_format_finder" attribute="d_normal"> 276 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold" /> 277 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic" /> 278 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_underline" /> 279 <Detect2Chars char="[" char1="-" attribute="d_structure" context="c_normal_strikeout" /> 280 <Detect2Chars char="[" char1="^" attribute="d_structure" context="c_normal_teletype" /> 281 <Detect2Chars char="[" char1="~" attribute="d_structure" context="c_normal_replaceable" /> 282 <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold" context="#stay" /> 283 <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_italic" context="#stay" /> 284 <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_underline" context="#stay" /> 285 <RegExpr String="(?=(^|\W))[=][\S][^\[\]]*[\S]?[=](?=($|\W))" minimal="true" attribute="d_normal_teletype" context="#stay" /> 286</context> 287 288<context name="c_normal_bold" attribute="d_normal_bold" lineEndContext="#stay"> 289 <IncludeRules context="c_common_structures" /> 290 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold" /> 291 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic" /> 292 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_underline" /> 293 <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_bold_italic" context="#stay" /> 294 <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_bold_underline" context="#stay" /> 295 <IncludeRules context="c_simple_text_block_finder" /> 296 <DetectChar char="]" attribute="d_structure" context="#pop" /> 297</context> 298 299<context name="c_normal_italic" attribute="d_normal_italic" lineEndContext="#stay"> 300 <IncludeRules context="c_common_structures" /> 301 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic" /> 302 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_italic_underline" /> 303 <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold_italic" context="#stay" /> 304 <RegExpr String="(?=(^|\W))[_][\S][^\[\]]*[\S]?[_](?=($|\W))" minimal="true" attribute="d_normal_italic_underline" context="#stay" /> 305 <IncludeRules context="c_simple_text_block_finder" /> 306 <DetectChar char="]" attribute="d_structure" context="#pop" /> 307</context> 308 309<context name="c_normal_underline" attribute="d_normal_underline" lineEndContext="#stay"> 310 <IncludeRules context="c_common_structures" /> 311 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_underline" /> 312 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic_underline" /> 313 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_underline" /> 314 <RegExpr String="(?=(^|\W))[\*][\S][^\[\]]*[\S]?[\*](?=($|\W))" minimal="true" attribute="d_normal_bold_underline" context="#stay" /> 315 <RegExpr String="(?=(^|\W))[/][\S][^\[\]]*[\S]?[/](?=($|\W))" minimal="true" attribute="d_normal_italic_underline" context="#stay" /> 316 <IncludeRules context="c_simple_text_block_finder" /> 317 <DetectChar char="]" attribute="d_structure" context="#pop" /> 318</context> 319 320<context name="c_normal_bold_italic" attribute="d_normal_bold_italic" lineEndContext="#stay"> 321 <IncludeRules context="c_common_structures" /> 322 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic" /> 323 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic" /> 324 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_italic_underline" /> 325 <IncludeRules context="c_simple_text_block_finder" /> 326 <DetectChar char="]" attribute="d_structure" context="#pop" /> 327</context> 328 329<context name="c_normal_bold_underline" attribute="d_normal_bold_underline" lineEndContext="#stay"> 330 <IncludeRules context="c_common_structures" /> 331 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_underline" /> 332 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic_underline" /> 333 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_underline" /> 334 <IncludeRules context="c_simple_text_block_finder" /> 335 <DetectChar char="]" attribute="d_structure" context="#pop" /> 336</context> 337 338<context name="c_normal_italic_underline" attribute="d_normal_italic_underline" lineEndContext="#stay"> 339 <IncludeRules context="c_common_structures" /> 340 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic_underline" /> 341 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_italic_underline" /> 342 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_italic_underline" /> 343 <IncludeRules context="c_simple_text_block_finder" /> 344 <DetectChar char="]" attribute="d_structure" context="#pop" /> 345</context> 346 347<context name="c_normal_bold_italic_underline" attribute="d_normal_bold_italic_underline" lineEndContext="#stay"> 348 <IncludeRules context="c_common_structures" /> 349 <Detect2Chars char="[" char1="*" attribute="d_structure" context="c_normal_bold_italic_underline" /> 350 <Detect2Chars char="[" char1="'" attribute="d_structure" context="c_normal_bold_italic_underline" /> 351 <Detect2Chars char="[" char1="_" attribute="d_structure" context="c_normal_bold_italic_underline" /> 352 <IncludeRules context="c_simple_text_block_finder" /> 353 <DetectChar char="]" attribute="d_structure" context="#pop" /> 354</context> 355 356<context name="c_normal_strikeout" attribute="d_normal_strikeout" lineEndContext="#stay"> 357 <IncludeRules context="c_common_structures" /> 358 <IncludeRules context="c_simple_text_block_finder" /> 359 <DetectChar char="]" attribute="d_structure" context="#pop" /> 360</context> 361 362<context name="c_normal_teletype" attribute="d_normal_teletype" lineEndContext="#stay"> 363 <IncludeRules context="c_common_structures" /> 364 <IncludeRules context="c_simple_text_block_finder" /> 365 <DetectChar char="]" attribute="d_structure" context="#pop" /> 366</context> 367 368<context name="c_normal_replaceable" attribute="d_normal_ replaceable" lineEndContext="#stay"> 369 <IncludeRules context="c_common_structures" /> 370 <IncludeRules context="c_simple_text_block_finder" /> 371 <DetectChar char="]" attribute="d_structure" context="#pop" /> 372</context> 373 374<!-- Links --> 375 376<context name="c_link" attribute="d_anchor" lineEndContext="c_indirect_normal_block"> 377 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" /> 378</context> 379 380<context name="c_web_link" attribute="d_path" lineEndContext="c_indirect_normal_block"> 381 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" /> 382 <IncludeRules context="c_simple_text_block_finder" /> 383 <DetectChar char="]" attribute="d_structure" context="#pop" /> 384</context> 385 386<context name="c_link_finder" attribute="d_normal" lineEndContext="#stay"> 387 <RegExpr String="\[link\b[\s]*" attribute="d_structure" context="c_link" /> 388 <Detect2Chars char="[" char1="@" attribute="d_structure" context="c_web_link" /> 389</context> 390 391<context name="c_cpp_link_finder" attribute="d_normal" lineEndContext="#stay"> 392 <RegExpr String="\[(funcref|classref|memberref|enumref|headerref)\b[\s]*" attribute="d_structure" context="c_link" /> 393</context> 394 395<!-- Anchors --> 396 397<context name="c_anchor" attribute="d_anchor" lineEndContext="#stay"> 398 <DetectChar char="]" attribute="d_structure" context="#pop" /> 399</context> 400 401<context name="c_anchor_finder" attribute="d_normal" lineEndContext="#stay"> 402 <Detect2Chars char="[" char1="#" attribute="d_structure" context="c_anchor" /> 403</context> 404 405<!-- Images --> 406 407<context name="c_image" attribute="d_path" lineEndContext="#stay"> 408 <IncludeRules context="c_simple_text_block_finder" /> 409 <DetectChar char="]" attribute="d_structure" context="#pop" /> 410</context> 411 412<context name="c_image_finder" attribute="d_normal" lineEndContext="#stay"> 413 <Detect2Chars char="[" char1="$" attribute="d_structure" context="c_image" /> 414</context> 415 416<!-- Comments --> 417 418<context name="c_comment" attribute="d_comment" lineEndContext="#stay"> 419 420 <!-- For performance the [endsect] resets the engine --> 421 <!-- Is this the best approach here? --> 422 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 423 424 <DetectChar char="[" attribute="d_structure" context="c_comment" /> 425 <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_comment" /> 426</context> 427 428<context name="c_comment_finder" > 429 <Detect2Chars char="[" char1="/" attribute="d_structure" context="c_comment" beginRegion="r_comment" /> 430</context> 431 432<!-- Scape sequences --> 433 434<context name="c_scape_sequence_finder" attribute="d_normal" lineEndContext="#stay"> 435 <DetectChar char="\" attribute="d_structure" context="c_scape_character" /> 436</context> 437 438<context name="c_scape_character" attribute="d_normal" lineEndContext="#stay"> 439 <RegExpr String="." minimal="true" attribute="d_normal" context="#pop" /> 440</context> 441 442<!-- Text blocks --> 443 444<context name="c_normal_text_block" attribute="d_normal" lineEndContext="#stay"> 445 <IncludeRules context="c_strict_normal" /> 446 <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_text_block"/> 447</context> 448 449<context name="c_text_block_finder" attribute="d_normal" lineEndContext="#stay"> 450 <Detect2Chars char="[" char1=":" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block" /> 451 <RegExpr String="[\[][\x0022]" minimal="true" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block"/> 452 <RegExpr String="\[(pre|footnote|blurb|warning|note|tip|important|pre|caution)(\b|\W|$)" minimal="true" attribute="d_structure" context="c_normal_text_block" beginRegion="r_text_block"/> 453</context> 454 455 456<context name="c_simple_text_block" attribute="d_anchor" lineEndContext="#stay"> 457 <DetectChar char="]" attribute="d_structure" context="#pop" /> 458 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_indirect_normal_block" /> 459</context> 460 461<context name="c_simple_text_block_finder" attribute="d_normal" lineEndContext="#stay"> 462 <DetectChar char="[" attribute="d_structure" context="c_simple_text_block" /> 463</context> 464 465<!-- Includes --> 466 467<context name="c_included_path" attribute="d_path" lineEndContext="#stay"> 468 <IncludeRules context="c_simple_text_block_finder" /> 469 <DetectChar char="]" attribute="d_structure" context="#pop#pop" /> 470</context> 471 472<context name="c_include" attribute="d_anchor" lineEndContext="#stay"> 473 <RegExpr String="\s" minimal="true" attribute="d_structure" context="c_included_path" /> 474</context> 475 476<context name="c_includes_finder" attribute="d_normal" lineEndContext="#stay"> 477 <StringDetect String="[include" attribute="d_structure" context="c_include" /> 478 <StringDetect String="[xinclude" attribute="d_structure" context="c_include" /> 479</context> 480 481<!-- Import --> 482 483<context name="c_import_path" attribute="d_path" lineEndContext="#stay"> 484 <IncludeRules context="c_simple_text_block_finder" /> 485 <DetectChar char="]" attribute="d_structure" context="#pop" /> 486</context> 487 488<context name="c_import_finder" attribute="d_normal" lineEndContext="#stay"> 489 <StringDetect String="[import" attribute="d_structure" context="c_import_path" /> 490</context> 491 492<!-- Document Type logic --> 493 494<context name="c_quickbook_type_finder" attribute="d_normal" lineEndContext="#stay"> 495 <RegExpr String="\[(book|article|library|chapter|part|appendix|preface|qandadiv|qandaset|reference|set)\b" minimal="true" attribute="d_structure" context="c_documment_definition" beginRegion="r_documment_definition" /> 496</context> 497 498<context name="c_documment_definition" attribute="d_normal_bold" lineEndContext="#stay"> 499 <IncludeRules context="c_quickbook_attribute_finder" /> 500 <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_documment_definition"/> 501</context> 502 503<context name="c_quickbook_attribute_finder" attribute="d_normal" lineEndContext="#stay"> 504 <RegExpr String="\[(quickbook|version|id|dirname|copyright|purpose|category|authors|license|source\-mode)\b" minimal="true" attribute="d_structure" context="c_normal_block" /> 505 506</context> 507 508<!-- Tables 509 510 [table A Simple Table 511 [[Heading 1] [Heading 2] [Heading 3]] 512 [[R0-C0] [R0-C1] [R0-C2]] 513 [[R1-C0] [R1-C1] [R1-C2]] 514 [[R2-C0] [R2-C1] [R2-C2]]] --> 515 516<context name="c_table" attribute="d_normal_bold" lineEndContext="#stay"> 517 <IncludeRules context="c_strict_normal" /> 518 <DetectChar char="[" attribute="d_structure" context="c_table_title_row" /> 519</context> 520 521<context name="c_table_title_row" attribute="d_nop" lineEndContext="#stay"> 522 523 <!-- For performance the [endsect] resets the engine --> 524 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 525 526 <DetectChar char="[" attribute="d_structure" context="c_table_title_cell" /> 527 <DetectChar char="]" attribute="d_structure" context="c_table_body" /> 528</context> 529 530<context name="c_table_title_cell" attribute="d_table_title_cell" lineEndContext="#stay"> 531 <IncludeRules context="c_strict_normal" /> 532 533 <DetectChar char="[" attribute="d_structure" context="c_table_cell" /> 534 <DetectChar char="]" attribute="d_structure" context="#pop" /> 535</context> 536 537<context name="c_table_body" attribute="d_nop" lineEndContext="#stay"> 538 539 <!-- For performance the [endsect] resets the engine --> 540 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 541 542 <DetectChar char="[" attribute="d_structure" context="c_table_row" /> 543 <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop" endRegion="r_table"/> 544</context> 545 546<context name="c_table_row" attribute="d_nop" lineEndContext="#stay"> 547 548 <!-- For performance the [endsect] resets the engine --> 549 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 550 551 <DetectChar char="[" attribute="d_structure" context="c_table_cell" /> 552 553 <DetectChar char="]" attribute="d_structure" context="#pop" /> 554</context> 555 556<context name="c_table_cell" attribute="d_normal" lineEndContext="#stay"> 557 <IncludeRules context="c_normal" /> 558 <RegExpr String="Row[\s]+[\d]+[\s]*,[\s]*Col[\s]+[\d]+[\s]*:" minimal="true" attribute="d_structure" context="#stay" /> 559 <!--DetectChar char="[" attribute="d_structure" context="c_table_cell" /--> 560 <DetectChar char="]" attribute="d_structure" context="#pop" /> 561</context> 562 563<context name="c_table_finder" attribute="d_normal" lineEndContext="#stay"> 564 <RegExpr String="\[table\b" minimal="true" attribute="d_structure" context="c_table" beginRegion="r_table" /> 565</context> 566 567<!-- Variable List 568 569 [variablelist A Variable List 570 [[term 1] [The definition of term 1]] 571 [[term 2] [The definition of term 2]] 572 [[term 3] [The definition of term 3]] 573 ] 574 --> 575 576<context name="c_variable_list" attribute="d_normal_bold" lineEndContext="#stay"> 577 <IncludeRules context="c_strict_normal" /> 578 <DetectChar char="[" attribute="d_structure" context="c_var_list_body_1" /> 579 <DetectChar char="]" attribute="d_structure" context="#pop" endRegion="r_variable_list"/> 580</context> 581 582<context name="c_var_list_body_1" attribute="d_nop" lineEndContext="#stay"> 583 584 <!-- For performance the [endsect] resets the engine --> 585 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 586 587 <DetectChar char="[" attribute="d_structure" context="c_var_list_element_name" /> 588</context> 589 590<context name="c_var_list_body_2" attribute="d_nop" lineEndContext="#stay"> 591 592 <!-- For performance the [endsect] resets the engine --> 593 <StringDetect String="[endsect]" attribute="d_structure" context="#pop#pop#pop#pop#pop" endRegion="r_section"/> 594 595 <DetectChar char="[" attribute="d_structure" context="c_var_list_element_info" /> 596</context> 597 598<context name="c_var_list_body_3" attribute="d_nop" lineEndContext="#stay"> 599 <DetectChar char="]" attribute="d_structure" context="#pop#pop#pop#pop#pop" /> 600</context> 601 602<context name="c_var_list_element_name" attribute="d_list_element_name" lineEndContext="#stay"> 603 <IncludeRules context="c_normal" /> 604 <DetectChar char="]" attribute="d_structure" context="c_var_list_body_2" /> 605</context> 606 607<context name="c_var_list_element_info" attribute="d_normal" lineEndContext="#stay"> 608 <IncludeRules context="c_normal" /> 609 <DetectChar char="]" attribute="d_structure" context="c_var_list_body_3" /> 610</context> 611 612<context name="c_variable_list_finder" attribute="d_normal" lineEndContext="#stay"> 613 <RegExpr String="\[variablelist\b" minimal="true" attribute="d_structure" context="c_variable_list" beginRegion="r_variable_list" /> 614</context> 615 616 617<!-- 618 boost::hs 619--> 620 621<context name="c_boost::hs call finder" attribute="d_boost::hs"> 622 <StringDetect String="[/boost::hs::turn_off()]" attribute="d_boost::hs" context="c_scape_highlighting" /> 623 <StringDetect String="[/boost::hs::turn_on()]" attribute="d_boost::hs" context="#stay" /> 624 <StringDetect String="[/boost::hs::begin_region()]" attribute="d_boost::hs" context="#stay" beginRegion="r_boost::hs::region" /> 625 <StringDetect String="[/boost::hs::end_region()]" attribute="d_boost::hs" context="#stay" endRegion="r_boost::hs::region" /> 626</context> 627 628<context name="c_scape_highlighting" attribute="d_normal" lineEndContext="#stay"> 629 <StringDetect String="[/boost::hs::turn_on()]" attribute="d_boost::hs" context="#pop" /> 630 <StringDetect String="[/boost::hs::turn_off()]" attribute="d_boost::hs" context="#stay" /> 631</context> 632 633</contexts> 634 635<!-- 636 This section defines the colors and format of each type of string parsed 637 Try to use defaults so the user can change it as he wished 638--> 639 640<itemDatas> 641 642 <itemData name="d_normal" defStyleNum="dsNormal" /> 643 644 <itemData name="d_normal_bold" bold="true" defStyleNum="dsNormal" /> 645 646 <itemData name="d_normal_italic" italic="true" defStyleNum="dsNormal" /> 647 648 <itemData name="d_normal_underline" underline="true" defStyleNum="dsNormal" /> 649 650 <itemData name="d_normal_bold_italic" bold="true" italic="true" defStyleNum="dsNormal" /> 651 <itemData name="d_normal_bold_underline" bold="true" underline="true" defStyleNum="dsNormal" /> 652 653 <itemData name="d_normal_italic_underline" italic="true" underline="true" defStyleNum="dsNormal" /> 654 655 <itemData name="d_normal_bold_italic_underline" bold="true" italic="true" underline="true" defStyleNum="dsNormal" /> 656 657 <itemData name="d_normal_strikeout" strikeout="true" defStyleNum="dsNormal" /> 658 659 <itemData name="d_normal_teletype" italic="true" defStyleNum="dsNormal" /> 660 661 <itemData name="d_normal_replaceable" italic="true" defStyleNum="dsNormal" /> 662 663 <itemData name="d_anchor" defStyleNum="dsDataType" /> 664 665 <itemData name="d_macro" defStyleNum="dsDataType" /> 666 667 <itemData name="d_path" defStyleNum="dsOthers" /> 668 669 <itemData name="d_structure" color="#5555FF" defStyleNum="dsNormal" /> 670 671 <itemData name="d_comment" defStyleNum="dsComment" /> 672 673 <itemData name="d_table_title_cell" color="#000000" bold="true" backgroundColor="#E6E6E6" defStyleNum="dsNormal" /> 674 675 <itemData name="d_list_element_name" bold="true" defStyleNum="dsNormal" /> 676 677 <itemData name="d_nop" defStyleNum="dsComment" /> 678 679 <itemData name="d_boost::hs" defStyleNum="dsFunction" /> 680 681</itemDatas> 682 683<!-- Last Part, Give acces to some tools, for example comment/uncomment in edit menu --> 684 685</highlighting> 686 687<general> 688 689 <comments> 690 691 <comment name="multiLine" start="[/" end="]" region="r_comment" /> 692 693 </comments> 694 695</general> 696 697</language> 698 699<!-- 700 701Aknowelegments 702================================================= 703 704Boost.Quickbook is a poweful C++ documentation tool. 705It is developped by Joel de Guzman and Eric Niebler, I am very thankful they give 706this tool a Boost License and allowed C++ developpers to document their work 707in a easy and fun way. 708Check www.boost.org to get the tool and meet one of the most impressive c++ 709library communities in the world. 710 711Version history 712================================================= 713 714[ 0.9.4 ] Add [heading ] 715Add templates 716Add import 717[ 0.9.3 ] "[endsect]" reset the engine to avoid lags in long files 718[ 0.9.2 ] Change file name ( quickbook_sintaxis.xml -> boost::hs::quickbook.xml ) 719Change section ( Docs -> boost::hs ), 720Change name ( Boost.Quickbook -> quickbook ) 721This changes aims to incorporate a boost kate sintaxis framework in KDE. 722[ 0.9.1 ] Fixed simple formating ( for example: "*this] [that*" is not longer bolded ). 723[ 0.9.0 ] Initial beta, sended to Joel de Guzman and Eric Niebler. 724 725Known bugs 726================================================= 727 728Feedback will be appreciated. 729They are very small and it is very unlikely to encounter one. 730 731* List items * and # are not fully implemented. 732* The line ` \\ C++ comment ` is not working because of Kate C++ 733highlight definitions. 734* Python code is not yet supported. 735 736--> 737