Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (38 sloc) 656 Bytes
grammar Ngs
rule expression
space? '(' body ')' space? <Expression>
end
rule body
(expression / me / (friends / people) / likeandlives / likeand / likes / lives / thing / space )* <Body>
end
rule me
"me" <Me>
end
rule friends
"friends" <Friends>
end
rule likes
"who like" <Likes>
end
rule lives
("who live in" / "live in" ) space place <Lives>
end
rule likeand
likes space thing space "and" space thing <LikeAnd>
end
rule likeandlives
likes space thing space "and" space lives <LikeAndLives>
end
rule thing
[a-zA-Z0-9]+ <Thing>
end
rule place
[a-zA-Z0-9]+
end
rule people
"people" <People>
end
rule space
[\s]+
end
end