diff --git a/README.md b/README.md
index 0a21ecb..89b4603 100644
--- a/README.md
+++ b/README.md
@@ -102,11 +102,11 @@ You can pick and choose the style for each parser and sub-parser, as there are n
| Description | Grammars |
| ----------- | -------- |
-| Parsing a token and getting its text
Parses: `ab`, `aB` | Procedural:
val ab by regexToken("a[bB]")Combinator:
override val root by parser {
val abMatch = ab()
abMatch.text
}
val ab by regexToken("a[bB]")| -| Parsing two tokens sequentially
override val root by ab map { it.text }
val a by literalToken("a")Combinator:
val b by regexToken("[bB]")
override val root by parser {
val aMatch = a()
val bMatch = b()
aMatch.text to bMatch.text
}
val a by literalToken("a")| -| Parsing one of two tokens
val b by regexToken("[bB]")
override val root by a and b map
{ (aM, bM) -> aM.text to bM.text }
val a by literalToken("a")Combinator:
val b by regexToken("[bB]")
override val root by parser {
val abMatch = choose(a, b)
abMatch.text
}
val a by literalToken("a")| -| Parsing an optional token
val b by regexToken("[bB]")
override val root by a or b map { it.text }
val a by literalToken("a")Combinator:
val b by regexToken("[bB]")
override val root by parser {
val aMatch = poll(a)
val bMatch = b()
aMatch?.text to bMatch.text
}
val a by literalToken("a")| -| Parsing a token and ignoring its value
val b by regexToken("[bB]")
override val root by maybe(a) and b map
{ (aM, bM) -> aM?.text to bM.text }
val a by literalToken("a")Combinator:
val b by regexToken("[bB]")
override val root by parser {
skip(a) // or just a() without using the value
val bMatch = b()
bMatch.text
}
val a by literalToken("a")| +| Parsing a token and getting its text Parses: `ab`, `aB` | Procedural:
val b by regexToken("[bB]")
override val root by -a * b map { it.text }
val ab by regexToken("a[bB]")
override val root by parser {
val abMatch = ab()
abMatch.text
}
Combinator:
val ab by regexToken("a[bB]")
override val root by ab map { it.text }
|
+| Parsing two tokens sequentially
Parses: `ab`, `aB` | Procedural:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by parser {
val aMatch = a()
val bMatch = b()
aMatch.text to bMatch.text
}
Combinator:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by a and b map
{ (aM, bM) -> aM.text to bM.text }
|
+| Parsing one of two tokens
Parses: `a`, `b`, `B` | Procedural:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by parser {
val abMatch = choose(a, b)
abMatch.text
}
Combinator:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by a or b map { it.text }
|
+| Parsing an optional token
Parses: `ab`, `aB`, `b`, `B` | Procedural:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by parser {
val aMatch = poll(a)
val bMatch = b()
aMatch?.text to bMatch.text
}
Combinator:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by maybe(a) and b map
{ (aM, bM) -> aM?.text to bM.text }
|
+| Parsing a token and ignoring its value
Parses: `ab`, `aB` | Procedural:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by parser {
skip(a) // or just a() without using the value
val bMatch = b()
bMatch.text
}
Combinator:
val a by literalToken("a")
val b by regexToken("[bB]")
override val root by -a * b map { it.text }
|
## Introduction
diff --git a/buildSrc/src/main/kotlin/GenerateQuickReferenceMarkdown.kt b/buildSrc/src/main/kotlin/GenerateQuickReferenceMarkdown.kt
index 9afc428..64361f3 100644
--- a/buildSrc/src/main/kotlin/GenerateQuickReferenceMarkdown.kt
+++ b/buildSrc/src/main/kotlin/GenerateQuickReferenceMarkdown.kt
@@ -26,14 +26,14 @@ abstract class GenerateQuickReferenceMarkdown : DefaultTask() {
for (entry in entries) {
append("| ")
append(entry.description)
- append("", postfix = "") + return joinToString(" ", prefix = "
", postfix = "
")
}
private data class QuickRefEntry(