Permalink
Browse files

Updated readme to use single quotes for terminals.

  • Loading branch information...
1 parent b87de8e commit 7838cd27fc95d2bedab13037611604261d906fc3 @beelsebob beelsebob committed Feb 4, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.md
View
@@ -60,9 +60,9 @@ We construct parsers by specifying their grammar. We can construct a grammar si
NSString *expressionGrammar =
@"Expression ::= <Term> | <Expression> <AddOp> <Term>;"
@"Term ::= <Factor> | <Term> <MulOp> <Factor>;"
- @"Factor ::= \"Number\" | \"(\" <Expression> \")\";"
- @"AddOp ::= \"+\" | \"-\";"
- @"MulOp ::= \"*\" | \"/\";";
+ @"Factor ::= 'Number' | '(' <Expression> ')';"
+ @"AddOp ::= '+' | '-';"
+ @"MulOp ::= '*' | '/';";
CPGrammar *grammar = [CPGrammar grammarWithStart:@"Expression" backusNaurForm:expressionGrammar];
CPParser *parser = [CPLALR1Parser parserWithGrammar:grammar];
[parser setDelegate:self];

0 comments on commit 7838cd2

Please sign in to comment.