OHM is a PEG-based grammar parser generator which seems to be more
compatible with the Jinja language. We are not making use of their
automatic space handling since in Jinja whitespace is significant.
--- /dev/null
+Jinja {
+ Template
+ = expressions
+
+ expressions
+ = expression*
+
+ expression
+ = inlineStatement
+
+ inlineStatement
+ = statementOpen sp? inlineStatementContent sp? statementClose
+
+ inlineStatementContent
+ = statement_extends
+
+ statement_extends
+ = statementId_extends sp stringLiteral
+
+ statementOpen = "{%"
+ statementClose = "%}"
+
+ statementId_extends = "extends"
+
+ stringLiteral = stringLiteral_single | stringLiteral_double
+
+ stringLiteral_single = quote_single (~quote_single any)* quote_single
+ stringLiteral_double = quote_double (~quote_double any)* quote_double
+
+ quote_single = "'"
+ quote_double = "\""
+
+ sp = (" " | "\t")+
+}
\ No newline at end of file