Skip to content

Instantly share code, notes, and snippets.

@kinwahlai
Created March 26, 2014 02:04
Show Gist options
  • Save kinwahlai/9775640 to your computer and use it in GitHub Desktop.
Save kinwahlai/9775640 to your computer and use it in GitHub Desktop.
Objective C grammar for ParseKit
@symbols = ':' ',';
@start = expression;
expression = functionExpression | messageExpression;
funcName = Word;
selector = Word;
className = Word;
openSquareParen = '[';
closeSquareParen = ']';
openParen = '(';
closeParen = ')';
comma = ',';
colon = ':';
super = 'super';
messageExpression = openSquareParen receiver messageSelector closeSquareParen;
receiver = expression | className | super;
messageSelector = selector keywordArgumentList;
keywordArgumentList = Empty | keywordArgument*;
keywordArgument = colon agrument | selector colon agrument;
functionExpression = funcName openParen paramListOpt closeParen;
paramListOpt = Empty | paramList;
paramList = agrument commaArgument*;
commaArgument = comma agrument;
agrument = QuotedString | Word | Number | expression;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment