module SciDbAFL where
bnfcFile :: String
bnfcFile = "-- SciDB AFL queries\n\nentrypoints AFL ;\n\ncomment \"--\" ;\ncomment \"{-\" \"-}\" ;\n\n-- SciDB reserves certain keywords that you cannot use as identifiers\n-- (such as array names, dimension names, or attribute names). The\n-- lists are language-dependent.\n--\n-- The following words are reserved when using AFL:\n-- and array as\n-- asc between case\n-- compression create default\n-- desc else empty\n-- end false if\n-- is not null\n-- or reserve temp\n-- then true using\n-- when\ntoken ResAnd [\"Aa\"][\"Nn\"][\"Dd\"] ;\ntoken ResArray [\"Aa\"][\"Rr\"][\"Rr\"][\"Aa\"][\"Yy\"] ;\ntoken ResAs [\"Aa\"][\"Ss\"] ;\ntoken ResAsc [\"Aa\"][\"Ss\"][\"Cc\"] ;\n--ken ResBetween [\"Bb\"][\"Ee\"][\"Tt\"][\"Ww\"][\"Ee\"][\"Ee\"][\"Nn\"] ; -- Not used here\n--ken ResCase [\"Cc\"][\"Aa\"][\"Ss\"][\"Ee\"] ; -- Not used here\ntoken ResCompression [\"Cc\"][\"Oo\"][\"Mm\"][\"Pp\"][\"Rr\"][\"Ee\"][\"Ss\"][\"Ss\"][\"Ii\"][\"Oo\"][\"Nn\"] ;\ntoken ResCreate [\"Cc\"][\"Rr\"][\"Ee\"][\"Aa\"][\"Tt\"][\"Ee\"] ;\ntoken ResDefault [\"Dd\"][\"Ee\"][\"Ff\"][\"Aa\"][\"Uu\"][\"Ll\"][\"Tt\"] ;\ntoken ResDesc [\"Dd\"][\"Ee\"][\"Ss\"][\"Cc\"] ;\n--ken ResElse [\"Ee\"][\"Ll\"][\"Ss\"][\"Ee\"] ; -- Not used here\n--ken ResEmpty [\"Ee\"][\"Mm\"][\"Pp\"][\"Tt\"][\"Yy\"] ; -- Not used here\n--ken ResEnd [\"Ee\"][\"Nn\"][\"Dd\"] ; -- Not used here\ntoken ResFalse [\"Ff\"][\"Aa\"][\"Ll\"][\"Ss\"][\"Ee\"] ;\n--ken ResIf [\"Ii\"][\"Ff\"] ; -- Not used here\n--ken ResIs [\"Ii\"][\"Ss\"] ; -- Not used here\ntoken ResNot [\"Nn\"][\"Oo\"][\"Tt\"] ;\ntoken ResNull [\"Nn\"][\"Uu\"][\"Ll\"][\"Ll\"] ;\ntoken ResOr [\"Oo\"][\"Rr\"] ;\n--ken ResReserve [\"Rr\"][\"Ee\"][\"Ss\"][\"Ee\"][\"Rr\"][\"Vv\"][\"Ee\"] ; -- Not used here\ntoken ResTemp [\"Tt\"][\"Ee\"][\"Mm\"][\"Pp\"] ;\n--ken ResThen [\"Tt\"][\"Hh\"][\"Ee\"][\"Nn\"] ; -- Not used here\ntoken ResTrue [\"Tt\"][\"Rr\"][\"Uu\"][\"Ee\"] ;\n--ken ResUsing [\"Uu\"][\"Ss\"][\"Ii\"][\"Nn\"][\"Gg\"] ; -- Not used here\n--ken ResWhen [\"Ww\"][\"Hh\"][\"Ee\"][\"Nn\"] ; -- Not used here\n\n-- SciDb expressions (Precedence follows C language conventions)\nEor . Exp ::= Exp ResOr Exp1 ;\nEand . Exp1 ::= Exp1 ResAnd Exp2 ;\nEeq . Exp2 ::= Exp2 \"=\" Exp3 ;\nEne . Exp2 ::= Exp2 \"<>\" Exp3 ;\nElt . Exp3 ::= Exp3 \"<\" Exp4 ;\nEgt . Exp3 ::= Exp3 \">\" Exp4 ;\nEle . Exp3 ::= Exp3 \"<=\" Exp4 ;\nEge . Exp3 ::= Exp3 \">=\" Exp4 ;\nEAdd . Exp4 ::= Exp4 \"+\" Exp5 ;\nESub . Exp4 ::= Exp4 \"-\" Exp5 ;\nEMul . Exp5 ::= Exp5 \"*\" Exp6 ;\nEDiv . Exp5 ::= Exp5 \"/\" Exp6 ;\nEMod . Exp5 ::= Exp5 \"%\" Exp6 ;\nENeg . Exp7 ::= \"-\" Exp6 ;\nEFunc . Exp8 ::= Id \"(\" [Exp] \")\" ;\nseparator Exp \",\" ;\nEVersion . Exp8 ::= Id \"@\" Integer ;\nEArrayVar . Exp8 ::= Id \".\" Id ;\nEOption . Exp8 ::= Id \":\" Exp ; -- shift/reduce conflicts: +42\nEAsId . Exp9 ::= Exp8 ResAs Id ;\nEAsc . Exp9 ::= Exp8 ResAsc ;\nEDesc . Exp9 ::= Exp8 ResDesc ;\nEVar . Exp10::= Id ;\nEScheme . Exp10::= Schema ;\nEString . Exp10 ::= AString ;\nEFalse . Exp10 ::= ResFalse ;\nETrue . Exp10 ::= ResTrue ;\nENull . Exp10 ::= ResNull ;\nEInt . Exp10 ::= Integer ;\nEDouble . Exp10 ::= ADouble ;\nEWildcard . Exp10 ::= \"*\" ;\nEDefault . Exp10 ::= \"?\" ;\ncoercions Exp 10 ;\ntoken ADouble digit+ (('.' digit+ ([\"Ee\"] '-'? digit+)?)\n |([\"Ee\"] '-'? digit+)\n ) ;\ntoken AString ('\\'' ((char - [\"'\\\\\"] ) | ('\\\\' [\"'\\\\\"]))* '\\'') ;\n\n-- AFL\nQueries . AFL ::= [Query] ;\nterminator Query \";\" ;\nQueryNil . Query ::= ;\nQueryExp . Query ::= Exp ;\nQueryArray . Query ::= ResCreate ResArray Id Schema ;\nQueryTemp . Query ::= ResCreate ResTemp ResArray Id Schema ;\n\nScheme . Schema ::= \"<\" [Attribute] \">\" \"[\" Dimensions \"]\" ;\nseparator nonempty Attribute \",\" ;\n\nAttrib . Attribute ::= Id \":\" Id NullableOption DefaultOption CompressionOption ;\n\nNullabeOff . NullableOption ::= ;\nNullableOn . NullableOption ::= ResNull ;\nNullableNot . NullableOption ::= ResNot ResNull ;\nDefaultOff . DefaultOption ::= ;\nDefaultOn . DefaultOption ::= ResDefault Exp6 ;\nCompressionOff . CompressionOption ::= ;\nCompressionOn . CompressionOption ::= ResCompression AString ;\n\nDim . Dimensions ::= Dimension ;\nDimSemicolon . Dimensions ::= Dimension \";\" Dimensions ;\nDimComma . Dimensions ::= Dimension \",\" Dimensions ; -- shift/reduce conflicts: +1\nDimId . Dimension ::= Id ;\nDimLoHi . Dimension ::= Id \"=\" Exp \":\" Exp ;\nDimLoHiOverlap . Dimension ::= Id \"=\" Exp \":\" Exp \":\" Exp ;\nDimAll . Dimension ::= Id \"=\" Exp \":\" Exp \":\" Exp \":\" Exp ;\nDimDeprecated . Dimension ::= Id \"=\" Exp \":\" Exp \",\" Exp \",\" Exp ;\n\n--------------------------------------------------------------------------------\n\n-- Identifier (Id) is last as a catch all\ntoken Id letter (letter | digit | '_')* ;\n"