tutorial_intro.qbk 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. [/==============================================================================
  2. Copyright (C) 2001-2011 Joel de Guzman
  3. Copyright (C) 2001-2011 Hartmut Kaiser
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ===============================================================================/]
  7. [section Quick Start]
  8. [heading Why would you want to use Spirit.Qi?]
  9. Spirit.Qi is designed to be a practical parsing tool. The ability to generate a
  10. fully-working parser from a formal EBNF specification inlined in C++
  11. significantly reduces development time. Programmers typically approach parsing
  12. using ad hoc hacks with primitive tools such as scanf. Even regular-expression
  13. libraries (such as boost regex) or scanners (such as Boost tokenizer) do not
  14. scale well when we need to write more elaborate parsers. Attempting to write
  15. even a moderately-complex parser using these tools leads to code that is hard to
  16. understand and maintain.
  17. One prime objective is to make the tool easy to use. When one thinks of a
  18. parser generator, the usual reaction is "it must be big and complex with a
  19. steep learning curve." Not so. Spirit is designed to be fully scalable. The
  20. library is structured in layers. This permits learning on an as-needed basis,
  21. after only learning the minimal core and basic concepts.
  22. For development simplicity and ease in deployment, the entire library
  23. consists of only header files, with no libraries to link against or build.
  24. Just put the Spirit distribution in your include path, compile and run. Code
  25. size? -very tight -essentially comparable to hand written recursive descent
  26. code.
  27. Our tutorials will walk you through the simplest Spirit examples, incrementally
  28. building on top of the earlier examples as we expose more and more features and
  29. techniques. We will try to be as gentle as possible with the learning curve.
  30. We will present the tutorials in a cookbook style approach. This style of
  31. presentation is based on our BoostCon '07 and BoostCon '08 slides.
  32. Have fun!
  33. [endsect] [/ Quickstart]