Skip to content

Commit

Permalink
Ep8: postfix_expression is now a proto.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcurtis committed Jul 20, 2010
1 parent 30b5123 commit 64df55f
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions doc/tutorial_episode_8.pod
Expand Up @@ -90,20 +90,11 @@ straightforward. First, we're going to update the grammar rule for primary:
<identifier> <postfix_expression>*
}

rule postfix_expression {
| <index> {*} #= index
| <key> {*} #= key
}
proto rule postfix_expression { <...> }

rule index {
'[' <expression> ']'
{*}
}
rule postfix_expression:sym<index> { '[' <EXPR> ']' }

rule key {
'{' <expression> '}'
{*}
}
rule postfix_expression:sym<key> { '{' <EXPR> '}' }

A primary object is now an identifier followed by any number of
postfix-expressions. A postfix expression is either a hashtable key or an array
Expand Down

0 comments on commit 64df55f

Please sign in to comment.