summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-20 15:17:46 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-20 15:17:46 -0400
commit742a4c0b0caa6a868f0133c10c56dcf4915f0e68 (patch)
treec656c4f933091fb76421efd02f154f6b635b2b67
parenteeab66f5159ac0870c902f384e656c5ee934ad8c (diff)
README: Explain the purely functional parser combinator API.
-rw-r--r--README13
1 files changed, 13 insertions, 0 deletions
diff --git a/README b/README
index 28df55d..bfafa2c 100644
--- a/README
+++ b/README
@@ -73,6 +73,19 @@ converted to HTML (via SXML) or any other format for rendering.
highlighter is used to deal with text that doesn't match any
recognized syntax and simply produces an untagged string.
+ Most syntax highlighters use lots of regular expressions to do their
+ magic, but guile-syntax-highlight uses a purely functional, monadic
+ parser combinator interface instead. This makes it easy for
+ developers to build complex parsers by creating compositions of many
+ simpler ones. Additionally, rather than working with raw strings or
+ Guile's file ports, the input code is represented as a lazy stream
+ of characters using the SRFI-41 streams library. By using streams,
+ parsers do not have to worry about things like reverting the
+ character index from which a file is being read upon a failure, or
+ any other state management. Parsers simply return the thing they
+ parsed, if any, and the remaining stream to be consumed by another
+ parser.
+
* Requirements
- GNU Guile >= 2.0.9