nR[      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None *+-035;DFIN  ! ! None *+-035;DFINC%-&not'#(~*++-,*-/.///^0%1&2~3|4>>5<<6..7<8<=9>:>=;==<~==and>or? Zero or more As, separated by , or ;.B [exp1] = exp2C name = expD expEA table constructor. /http://www.lua.org/manual/5.3/manual.html#3.4.9F { x = 5, [f(1)] = 6, 7 }H  (x, y, ...) block endJ (exp1, exp2)K { x = exp }L "str"M5A function call. May be a statement or an expression. /http://www.lua.org/manual/5.3/manual.html#3.3.6 0http://www.lua.org/manual/5.3/manual.html#3.4.10T One or more Xs.V Zero or more Xs.XAn expression. -http://www.lua.org/manual/5.3/manual.html#3.4d One or more fs.f A variable. -http://www.lua.org/manual/5.3/manual.html#3.2g xh table[exp]i table.fieldk  foo.bar:bazm return exp1, exp2n A statement. -http://www.lua.org/manual/5.3/manual.html#3.3o ;p var1, var2, var3 = exp1, exp2, exp3q foo.bar(args)r  ::label::s breakt goto labelu do block endv while exp do block endw repeat block until expx if exp then block else block endy for x = exp do block endz for a, b, c in exp1, exp2, exp3 do block end{ function name body| local function name body} local x, y, z~=A block of statements, possibly ending in a return statement. /http://www.lua.org/manual/5.3/manual.html#3.3.1 A chunk; Lua's compilation unit. /http://www.lua.org/manual/5.3/manual.html#3.3.2 One or more s. Zero or more s.eAn identifier, defined as any string of letters, digits, or underscores, not beginning with a digit. -http://www.lua.org/manual/5.3/manual.html#3.1"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~e"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~e~nopqrstuvwxyz{|}lmjkfghideXYZ[\]^_`abcVWTUPQRSMNOIJKLGHEFABCD?@)*+,-./0123456789:;<=>$%&'("#<"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe *+-035;DFINSafe *+-035;DFIN9 and break do else elseif end false for function goto if in local nil not or repeat return then true until while + - * / % ^ # & ~ | << >> // == ~= <= >= < > = ( ) { } [ ] :: ; : , . .. ... ' "???=None *+-035;DFIN !lex :: String -> [L Token] lex =  .    ""  lex "5+5""[TkIntLit "5",TkPlus,TkIntLit "5"] lex "foo?"2[TkIdent "foo"*** Exception: Lexical error at :1:4              None *+-035;DFINAST node source location and constituent tokens. The tokens are provided for style-checking purposes; with them, you may assert proper whitespace protocol, alignment, trailing commas on table constructors, and whatever other subjectivities.0Source location; spans the entirety of the node.*Parsed tokens involved in node production.Parse a Lua file. May throw .  =   1Parse Lua code with the given grammar. May throw ."parseLuaWith luaExprssion "" "5+5"Binop (NodeInfo8 { nodeLoc = Loc (Pos "" 1 1 0) (Pos "" 1 3 2)B , nodeTokens = fromList [TkIntLit "5",TkPlus,TkIntLit "5"] }) (Plus (NodeInfo< { nodeLoc = Loc (Pos "" 1 2 1) (Pos "" 1 2 1), , nodeTokens = fromList [TkPlus] })) (Integer (NodeInfo< { nodeLoc = Loc (Pos "" 1 1 0) (Pos "" 1 1 0)2 , nodeTokens = fromList [TkIntLit "5"] }) "5") (Integer (NodeInfo< { nodeLoc = Loc (Pos "" 1 3 2) (Pos "" 1 3 2)2 , nodeTokens = fromList [TkIntLit "5"] }) "5")All AST nodes are s over their annotation:/(() <$) <$> parseLuaWith luaExpression "" "5+5"4Binop () (Plus ()) (Integer () "5") (Integer () "5")Grammar for a Lua chunk; i.e. a Lua compilation unit, defined as a list of statements. This is the grammar you should use to parse real Lua code.7Grammar for a single Lua statement. Mostly subsumed by .hGrammar for a Lua expression. Provided for smaller REPL-like parsing that operates only on expressions.t$Source filename (used in locations).Source contents.Grammar to parse with.$Source filename (used in locations).Source contents. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy  m !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJJKLMKNNOOPQRSTTUVWXYZZ[[\]^_`abcde4/ffghijkkllmnopqrstuvwxyz{|}}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstlangu_AcGzBgs3MdS6Ls2TxGdPtJLanguage.Lua.ParserLanguage.Lua.LexerLanguage.Lua.PrettyLanguage.Lua.SyntaxLanguage.Lua.TokenLanguage.Lua.InternalEarle_Exj2cSgXz5JDge3jKwxpGcText.Earley.Internalreport fullParses allParsesparser unconsumedexpectedpositionReportParsedEndedResultlexer_2kk4CCQ44DTGvnmDbuOUaaLanguage.Lexer.ApplicativerunLexerstreamToEitherList streamToList LexicalErrorTsErrorTsEofTsToken TokenStreamwlppr_5yN7q1pAoUb89IckasciOYText.PrettyPrint.Leijen displayIOdisplayS renderCompact renderPretty prettyListprettyPrettyDocSLineSTextSCharSEmpty SimpleDoc AnnotatedannUnopNegateNotLength BitwiseNotBinopPlusMinusMultFloatDivFloorDivExponentModulo BitwiseAnd BitwiseXor BitwiseOrRshiftLshiftConcatLtLeqGtGeqEqNeqAndOr FieldListFieldFieldExp FieldIdentTableConstructor FunctionBody FunctionArgsArgs ArgsTable ArgsString FunctionCall MethodCallPrefixExpression PrefixVar PrefixFunCallParensExpressionList1ExpressionList ExpressionNilBoolIntegerFloatStringVarargFunDef PrefixExp TableCtor VariableList1VariableVarIdentVarField VarFieldName FunctionNameReturnStatement Statement EmptyStmtAssignFunCallLabelBreakGotoDoWhileRepeatIfForForIn FunAssignLocalFunAssign LocalAssignBlockChunk IdentList1 IdentListIdentTokenTkAndTkBreakTkDoTkElseTkElseifTkEndTkFalseTkFor TkFunctionTkGotoTkIfTkInTkLocalTkNilTkNotTkOrTkRepeatTkReturnTkThenTkTrueTkUntilTkWhileTkPlusTkDashTkMult TkFloatDivTkModulo TkExponentTkLength TkBitwiseAndTkTilde TkBitwiseOrTkLShiftTkRShift TkFloorDivTkEqTkNeqTkLeqTkGeqTkLtTkGtTkAssignTkLParenTkRParenTkLBraceTkRBrace TkLBracket TkRBracketTkLabelTkSemiTkColonTkCommaTkDotTkConcatTkVarargTkQuote TkDoubleQuoteTkIdent TkStringLitTkIntLit TkFloatLit showTokenluaLexerLuaParseExceptionLuaLexExceptionLuaAmbiguousParseException LuaGrammarNodeInfo_nodeLoc _nodeTokensnodeLoc nodeTokensparseLua parseLuaWithluaChunk luaStatement luaExpressionsepBy$fAnnotatedUnop$fAnnotatedBinop$fAnnotatedFieldList$fAnnotatedField$fAnnotatedTableConstructor$fAnnotatedFunctionBody$fAnnotatedFunctionArgs$fAnnotatedFunctionCall$fAnnotatedPrefixExpression$fAnnotatedExpressionList1$fAnnotatedExpressionList$fAnnotatedExpression$fAnnotatedVariableList1$fAnnotatedVariable$fAnnotatedFunctionName$fAnnotatedReturnStatement$fAnnotatedStatement$fAnnotatedBlock$fAnnotatedIdentList1$fAnnotatedIdentList$fAnnotatedIdent $fPrettyUnop $fPrettyBinop $fPrettyField$fPrettyTableConstructor$fPrettyFunctionBody$fPrettyFunctionArgs$fPrettyFunctionCall$fPrettyPrefixExpression$fPrettyExpression$fPrettyVariable$fPrettyFunctionName$fPrettyReturnStatement$fPrettyStatement $fPrettyBlock $fPrettyIdent<$$> luaTokensluaToken luaIdentifier luaStringLit luaIntLit luaFloatLitluaLongBracketStringLitPrefixluaLongBracketStringLitSuffix luaWhitespaceluaBlockCommentPrefixluaBlockCommentSuffixluaLineCommentoneOfandOrbetweenhexDigitdigitisAlpha isLowercase isUppercase charBetweenexactlyNbetweenNupToNbaseGHC.BaseFunctor HasNodeInfonodeInfogrammarmkBlock mkEmptyStmtmkAssign mkFunCallmkLabelmkBreakmkGotomkDomkWhilemkRepeatmkIfmkFormkForIn mkFunAssignmkLocalFunAssign mkLocalAssignmkReturnStatementmkFunctionName mkVarIdent mkVarFieldmkVarFieldNamemkNilmkBool mkIntegermkFloatmkStringmkVarargmkFunDef mkPrefixExp mkTableCtor mkPrefixVarmkPrefixFunCallmkParensmkFunctionCallmkArgs mkArgsTable mkArgsStringmkFunctionBodymkTableConstructor mkFieldExp mkFieldIdentmkField mkFieldList injectLocsepBy1breakcoloncommado'dotlabelelse'elseifendassignfalsefloatLitforfunctiongotoidentif'in'intLitlbracelbracketlocallparennilrbracerbracketrepeatreturn'rparensemi stringLitthen'varargtrueuntilwhile locSymbol locSatisfy$fExceptionLuaParseException$fShowLuaParseException$fHasNodeInfoMaybe$fHasNodeInfoNonEmpty$fHasNodeInfoSeq$fHasNodeInfo[]$fHasNodeInfo(,,,)$fHasNodeInfo(,,)$fHasNodeInfo(,)$fHasNodeInfoast$fHasNodeInfoL$fHasNodeInfoNodeInfo$fMonoidNodeInfo