Created
September 24, 2012 17:20
-
-
Save adamretter/3777121 to your computer and use it in GitHub Desktop.
Scala Parser Combinators - need mutually exclusive Global Directives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Expr = (GlobalDirectiveExpr*) ~ (ColumnRuleExpr+) ^^ { | |
case d ~ r => CsvSchema(d, r) | |
} | |
def GlobalDirectiveExpr = "@" ~> (SeparatorExpr | QuotedExpr | TotalColumnsExpr | NoHeaderExpr | IgnoreColumnNameCaseExpr) ^^ { | |
case d => Directive(d) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment