From 8a67ae946b5c26740c180fa47ee8c6ba3c3132cb Mon Sep 17 00:00:00 2001 From: David Beazley Date: Sat, 7 Mar 2020 13:16:04 -0600 Subject: [PATCH] Fixed doc typo --- docs/sly.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sly.rst b/docs/sly.rst index 30e9e3e..39df462 100644 --- a/docs/sly.rst +++ b/docs/sly.rst @@ -883,7 +883,7 @@ it is to enclose one more more symbols in [ ] like this:: if p.item is not None: print("item was given and has value", p.item) else: - print("item was not given" + print("item was not given") @_('whatever') def item(self, p): @@ -900,8 +900,9 @@ list of comma separated expressions. To parse that, you could write:: return [p.expr0] + p.expr1 In this example, the ``{ COMMA expr }`` represents zero or more repetitions -of a rule. The value of all symbols inside is now a list. So, ``p.expr`` -is a list of all expressions matched. +of a rule. The value of all symbols inside is now a list. So, ``p.expr1`` +is a list of all expressions matched. Note, when duplicate symbol names +appear in a rule, they are distinguished by appending a numeric index as shown. Dealing With Ambiguous Grammars ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^