Skip to content

Commit

Permalink
Fix readme rendering bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
beelsebob committed Jun 26, 2011
1 parent 90f2c9a commit a278972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -68,7 +68,7 @@ We construct parsers by specifying their grammar. We can construct a grammar si
CPParser *parser = [CPLALR1Parser parserWithGrammar:grammar]; CPParser *parser = [CPLALR1Parser parserWithGrammar:grammar];
[parser setDelegate:self]; [parser setDelegate:self];


When a rule is matched by the parser, the `initWithSyntaxTree:` method will be called on a new instance of the apropriate class. If no such class exists the parser delegate's `parser:didProduceSyntaxTree:` method is called. To deal with this cleanly, we implement 3 classes ÐÊExpression, Term and Factor. AddOp and MultOp non-terminals are dealt with by the parser delegate. Here we see the initWithSyntaxTree: method for the Expression class, these methods are similar for Term and Factor: When a rule is matched by the parser, the `initWithSyntaxTree:` method will be called on a new instance of the apropriate class. If no such class exists the parser delegate's `parser:didProduceSyntaxTree:` method is called. To deal with this cleanly, we implement 3 classes -ÊExpression, Term and Factor. AddOp and MultOp non-terminals are dealt with by the parser delegate. Here we see the initWithSyntaxTree: method for the Expression class, these methods are similar for Term and Factor:


- (id)initWithSyntaxTree:(CPSyntaxTree *)syntaxTree - (id)initWithSyntaxTree:(CPSyntaxTree *)syntaxTree
{ {
Expand Down

0 comments on commit a278972

Please sign in to comment.