Skip to content

Instantly share code, notes, and snippets.

@fjolnir
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjolnir/9095087 to your computer and use it in GitHub Desktop.
Save fjolnir/9095087 to your computer and use it in GitHub Desktop.
layout ::= rules.
rules ::= rule.
rules ::= rules rule.
rule ::= orientation superview connection view connection superview
view ::= LBRACKET className selectors predicateList RBRACKET
LBRACE layout RBRACE.
selectors ::= selector.
selectors ::= selectors SEMICOLON selector.
selector ::= selectorPart.
selector ::= selector selectorPart.
selectorPart ::= IDENT COLON literal.
selectorPart ::= IDENT ASGN literal.
orientation ::= H COLON.
orientation ::= V COLON.
superview ::= PIPE.
connection ::= DASH predicateList DASH
connection ::= DASH simplePredicate DASH
connection ::= DASH
predicateList ::= LPAREN predicateList_ RPARENT
predicateList_ ::= predicate.
predicateList_ ::= predicateList_ predicate.
simplePredicate ::= metricName.
simplePredicate ::= NUMBER.
predicate ::= objectOfPredicate.
predicate ::= relation objectOfPredicate.
predicate ::= objectOfPredicate priority.
predicate ::= relation objectOfPredicate priority.
metricName ::= STRING.
relation ::= EQ.
relation ::= LEQ.
relation ::= GEQ.
priority ::= AT NUMBER.
literal ::= NUMBER.
literal ::= STRING.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment