[flang] Update documentation.
authorpeter klausler <pklausler@nvidia.com>
Thu, 29 Mar 2018 23:53:10 +0000 (16:53 -0700)
committerpeter klausler <pklausler@nvidia.com>
Thu, 29 Mar 2018 23:53:10 +0000 (16:53 -0700)
Original-commit: flang-compiler/f18@7045fbcd0c3412d990c9c7d2af963765dbb2395f
Reviewed-on: https://github.com/flang-compiler/f18/pull/35
Tree-same-pre-rewrite: false

flang/documentation/ParserCombinators.md

index 25190ab..9cd029d 100644 (file)
@@ -114,13 +114,16 @@ Last, we have these basic parsers on which the actual grammar of the Fortran
 is built.  All of the following parsers consume characters acquired from
 `nextCh`.
 
-* `spaces` always succeeds after consuming any spaces or tabs
+* `space` always succeeds after consuming any spaces
+* `spaceCheck` always succeeds after consuming any spaces, and can emit
+  a warning if there was no space in free form code before a character
+  that could continue a name or keyword
 * `digit` matches one cooked decimal digit (0-9)
 * `letter` matches one cooked letter (A-Z)
 * `"..."_tok` match the content of the string, skipping spaces before and
-  after, and with multiple spaces accepted for any internal space.
-  (Note that the `_tok` suffix is optional when the parser appears before
-  the combinator `>>` or after `/`.)
+  after.  Internal spaces are optional matches; `~` denotes a space that
+  is not optional in free form.  The `_tok` suffix is optional when the
+  parser appears before the combinator `>>` or after `/`.
 * `parenthesized(p)` is shorthand for `"(" >> p / ")"`.
 * `bracketed(p)` is shorthand for `"[" >> p / "]"`.
 * `nonEmptyListOf(p)` matches a comma-separated list of one or more