Permalink
Browse files

Added roma1n's doco fix

  • Loading branch information...
1 parent f61a1a5 commit 8413716845e7a0b8b0ad7295a330c9b97ac03217 @cjheath cjheath committed Dec 19, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 doc/pitfalls_and_advanced_techniques.markdown
@@ -14,10 +14,10 @@ Here are a few interesting problems I've encountered. I figure sharing them may
##Matching a String
rule string
- '"' (!'"' . / '\"')* '"'
+ '"' ('\"' / !'"' .)* '"'
end
-This expression says: Match a quote, then zero or more of any character but a quote or an escaped quote followed by a quote. Lookahead assertions are essential for these types of problems.
+This expression says: Match a quote, then zero or more of, an escaped quote or any character but a quote, followed by a quote. Lookahead assertions are essential for these types of problems.
##Matching Nested Structures With Non-Unique Delimeters
Say I want to parse a diabolical wiki syntax in which the following interpretations apply.
@@ -48,4 +48,4 @@ This says that `'end'` must be followed by a space, but this space is not consum
'end' !(!' ' .)
end
-In general, when the syntax gets tough, it helps to focus on what you really mean. A keyword is a character not followed by another character that isn't a space.
+In general, when the syntax gets tough, it helps to focus on what you really mean. A keyword is a character not followed by another character that isn't a space.

0 comments on commit 8413716

Please sign in to comment.