xZj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred)Flipped . p <||> q tries to parse p, but if it fails, parses q.  Unlike the  instance for , backtracking will occur if p fails.  That is, a parser such as string "flange" <||> string "fly" will succeed on  the input "fly":, whereas its Parsec counterpart will unintuitively fail. ! choice ps( tries to apply the parsers in the list ps in order, A until one of them succeeds. Returns the value of the succeeding B parser. Unlike the Parsec version, this one ensures that parsers $ do not consume input if they fail. "OGiven a map of parsers to parsers, attempt each key parser until one succeeds, J then perform the value parser. Return the result of the value parser. #CAttempt all of the passed parsers under the current conditions and D return the value of the parser which makes it furthest into the ( input stream (and updates the parser'%s internals as if that were the only  parser parsed). (longestOf [string "do", string "don't"] $ option x p tries to apply parser p. If p! fails, no input is consumed and x  is returned. % optional p tries to parse p(, but does not fail or consume input of p fails.  This is like , but is easier to type. See &. & optional_ p tries to parse p(, but does not fail or consume input if p fails.  This is like ., but the use of underscore is more idiomatic + for actions whose results are ignored. ' atLeast n p applies the parser p n or more times. ( atMost n p applies the parser p up to n times. ) manyNM n m p applies the parser p n or more times up to m times. *Parse zero+ or more of any mix of the passed parsers. +As *, but ignoring the results. ,many1_ p applies the parser p one or more times, skipping  its result. -many1_ p applies the parser p zero or more times, skipping  its result. .manyTill p end applies parser p zero or more times until  parser end2 succeeds. Returns the list of values returned by p.  The end parse does not consume input, c.f. /. . This parser can be used to scan comments:  " simpleComment = do{ string "//" 3 ; anyChar `manyThru` char '\n'  } *Note that despite the overlapping parsers anyChar and char '\n', # there is never a need to add a : the end parser does not consume  input on failure. /manyThru p end applies parser p zero or more times until  parser end2 succeeds. Returns the list of values returned by p.  The end parse does consume input, c.f. .. . This parser can be used to scan comments:  $ simpleComment = do{ string "<!--" 6 ; anyChar `manyThru` string "-->"  } *Note that despite the overlapping parsers anyChar and string "-->",  there is no need to add a : the end parser does not consume input  on failure. 0 chomp p x will parse p, then throw away a subsequent  parse by x provided it succeeds. ( This combinator will only fail when p fails, not when x does. 1 between2 p q is equivalent to between p p q 2 sepBy p sep parses zero or more occurrences of p , separated  by sep'. Returns a list of values returned by p. ' commaSep p = p `sepBy` (symbol ",") 3 sepBy1 p sep parses one or more occurrences of p , separated  by sep'. Returns a list of values returned by p. 4sepEndBy p sep parses zero or more occurrences of p, # separated and optionally ended by sep, ie. haskell style 2 statements. Returns a list of values returned by p. 8 haskellStatements = haskellStatement `sepEndBy` semi 5sepEndBy1 p sep parses one or more occurrences of p, & separated and optionally ended by sep. Returns a list of values  returned by p. 6 endBy p sep parses zero or more occurrences of p , seperated  and ended by sep'. Returns a list of values returned by p. * cStatements = cStatement `endBy` semi 7 endBy1 p sep parses one or more occurrences of p , seperated  and ended by sep'. Returns a list of values returned by p. 8sepAroundBy p sep parses zero or more occurrences of p, 8 separated and optionally starting with and ended by sep . Returns ! a list of values returned by p. 9sepAroundBy1 p sep parses one or more occurrences of p, 8 separated and optionally starting with and ended by sep . Returns ! a list of values returned by p. : chainl p op x parses zero or more occurrences of p,  separated by op . Returns a value obtained by a left associative - application of all functions returned by op to the values returned  by p#. If there are zero occurrences of p , the value x is  returned. C.f. < ;chainl1 p op x parses one or more occurrences of p,  separated by op Returns a value obtained by a left associative - application of all functions returned by op to the values returned  by p8. This parser can for example be used to eliminate left = recursion which typically occurs in expression grammars.  # expr = term `chainl1` mulop # term = factor `chainl1` addop $ factor = parens expr <|> integer  - mulop = do{ symbol "*"; return (*) } - <|> do{ symbol "/"; return (div) }  + addop = do{ symbol "+"; return (+) } + <|> do{ symbol "-"; return (-) } C.f. = < chainr p op x parses zero or more occurrences of p,  separated by op Returns a value obtained by a right associative - application of all functions returned by op to the values returned  by p!. If there are no occurrences of p , the value x is  returned. C.f. : =chainr1 p op x parses one or more occurrences of p,  separated by op Returns a value obtained by a right associative - application of all functions returned by op to the values returned  by p. C.f. ; > lookAhead p parses p& without consuming any input, even if p fails. ?notFollowedBy p q parses p, but only when q will fail immediately  after parsing p . Parsing q# never consumes input, and if this , combinator fails, no input is consumed. -This combinator can be used to implement the ' longest match' rule. 8 For example, when recognizing keywords (for example let ), we want F to make sure that a keyword is not followed by a legal identifier C character, in which case the keyword is actually an identifier  (for example lets,). We can program this behavior as follows: 5 keywordLet = string "let" `notFollowedBy` alphaNum @Returns  if there is no input left,  if there is. A2Succeed only when at the end of the input stream. BKUses the passed parser, but succeeds only if it consumes all of the input. CPParse using the passed parser, but also return the input that was not consumed. DFlipped . EAAnnotate the return value of the passed parser with the position  just before parsing. FAAnnotate the return value of the passed parser with the position  just after parsing. GAAnnotate the return value of the passed parser with the position 0 just before and after parsing respectively. ) !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG9  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG9 !"#$%& -,'()*+./0 123456789:;<=>?@ABCDEFG) !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG Safe-InferredHSynonym for parsers over the  monad. ISynonym for lexers over the  monad. J+The lexer and parser communicate using the J type. 9Lexemes carry position information as well as a payload. ; Generally, you will want to define a data type for the  payload and use Q to extract particular cases of  payloads for parsing. KA parser: consumer of Js LA lexer: producer of Js M.Connect and run a lexer and parser together. NAs M in the  monad. O)Wrap a normal parser into a parser for a J. @ The passed parser determines the payload. Use this function D at the boundary of the lexer and parser: when a complete lexeme = has been recognized, but parsing has not been performed. AOn failure, the resulting parser does not consume input, even if  the passed parser would. PJDrop lexemes from the input stream whose payloads that satisfy the passed P predicate. This is useful, for example, in whitespace-insensitive languages R to remove extraneous whitespace so it need not clutter the parser definition. :WARNING: use only as the first action in a parsing monad. QKObtain a lexeme from the stream only if it satisfies the passed predicate. CThis is a very important function for building parsers. Generally, & after defining your data type for J payloads, you will implement E several combinators for recognizing each case of your data type. RUnpacks a payload from the J& stream and attempts to transform it. . If the transformation fails (evaluates to ), then this parser fails. SUnpacks a payload from the J6 stream. Only fails at the end of the lexeme stream. T/Succeed only at the end of the lexeme stream. U=Detect whether the parser is at the end of the lexeme stream  without consuming input. HIJKLM3lexer: transform raw input stream into many tokens 0parser: transform token stream into parsed data N3lexer: transform raw input stream into many tokens 0parser: transform token stream into parsed data OPQRSTUHIJKLMNOPQRSTULKJMIHNOPSRQTUHIJKLMNOPQRSTU Safe-InferredIV6Determine how the depth of indentation is calculated. W&Allow any mix of of the passed Chars. ( Calculate depth by assigning a number , to each of character by kind and summing. X)Any of the passed Chars can be used, but . allow only one kind of character in a line. ' Depth is number of those characters. Ystring s* parses a sequence of characters given by s . Returns  the parsed string (i.e. s#). Unlike the Parsec version, this . combinator never consumes input on failure. % adrenalineWord = string "fight" % <|> string "flight" ZEParse a single character, case-insensitive. Normalized to lowercase. [NParse a string, case-insensitive. If this parser fails, it consumes no input.  Normalized to lowercase. \Rule UPALPHA from RFC2616 2.2]Rule LOALPHA from RFC2616 2.2^Rule ALPHA from RFC2616 2.2_Rule DIGIT from RFC2616 2.2`Parse a binary digit ('0' or '1') aRule CTL from RFC2616 2.2b+A single printable ASCII character, as the TEXT rule from RFC2616 2.2 c:A single printable unicode character, a generalization of text. See . dA carriage return (ASCII 13) eA line feed (ASCII 10) fA space (ASCII 32) gA horizonal tab (ASCII 9) hA single quote iA double quote j A colon (:) kA semicolon (;) l A period (.) m A comma (,) n=A backslash-escape: backslash followed by a single character  satisfying the predicate. oParse "yes", "y", or "1"!, case-insensitive. Return True. pParse "no", "n", or "0"", case-insensitive. Return False. qParse o or p, and return whether the answer was yes-ful. r(A carriage return + line feed sequence. s Short for "linear whitespace": one or more spaces or tabs.  Similar to rule LWS- from RFC2616 2.2, but without line folding.t-Parse a single line feed or carriage return. # Does not succeed at end of file. uGRecognize when the parser is at a line break (LF, CR, or end of input) 1 If the break is due to a CR or LF, consume it. v Parse a backslash followed by a t w Parse a backslash followed by a t,  then linear whitespace (s!) and finally another backslash. xParse a u$ followed by whitespace characters. % Return the depth of indentation. ?The acceptable whitespace characters and the method by whch to ( caclulate depth is determined by an  IntentPolicy. -WARNING: Do not use this combinator with the Lex module, it ( will break because Parsec is sissy.  Version of x, suitable for us in lexing parsers built on Lex DThis parser will not detect dedents at the end of input. Therefore, B when you wish to recognize a dedent in your parser, recognize A # as well as your dedent tokens. yKParse one or more characters that satisfy a predicate, but with additional 0 restrictions on the first character parsed. (This is useful for identifiers (such as [a-zA-Z_][a-zA-Z_0-9]*), certain kinds of  numbers (such as  [1-9][0-9]*), and possibly other things.   identifier =  " a-zA-Z0-9_" `many1Not`  "0-9" naturalLiteral =  10 <$>  "0-9" `many1Not` (=='0') z?Parse a sigil character immediately followed by an identifier.  data Sigil = Scalar | Array name = sigilized (zip "$@" [Scalar, Array]) $ y (charClass' " _a-zA-Z0-9") ( "0-9") {*Parse between open and close parenthesis. |.Parse between open and close square brackets ([...]). }+Parse between open and close curly braces ({...}). ~%Parse between open and close angles (<...>). CParse a minus or plus sign and return the appropriate multiplier. Parse "0x", "0o", or "0b"3 case-insensitive and return the appropriate base. , If none of these parse, return base 10. LParse many digits in the passed base and return the corresponding integer. HParse many digits in the passed base and return the appropriate ratio. ?Parse a natural in the passed base and return its reciprocal. Optional sign as , defaults to positive. Parse an optional sign (as ), then a natural number ! of the specified base (as in ). :Parse an integer: optional sign, then a number of digits. 9 Bases 10, 16, 8 and 2 are supported with appropriate  prefixes before the digits. No prefix is base 10.  0x case-insensitive is base 16.  0o case-insensitive is base 8.  0n case-insensitive is base 2. >Parse a rational number: an optional sign, then two sequences H of digits separated by a slash. Return the ratio of the appropriate I sign between the two numbers. Bases 10, 16, 8 and 2 are supported as  in . >Parse a number in scientific notation: an optional sign, then 9 a radix mark, two sequences of digits separated by a l, and B finally an optional exponent, which is an exponent letter, an C optional sign and finally one or more digits in the same base. AOnly bases 10 and 16 are supported, and the base of the exponent A is the same as the base of the significand. In base ten, the  exponent letter is e, and in base 16, it is h. ANote that digits are required on both sides of the (hexa)decimal  point, so neither 0. nor .14 are recognized. AParse a backslash and another character; use the passed table to $ determine the returned character. BCommon characetr escapes in programming language string literals: \0 -> ASCII 00 (nul) \a -> ASCII 07 (alarm/bell) \b -> ASCII 08 (backspace) \e -> ASCII 1B (escape) \f -> ASCII 0C (form feed) \n -> ASCII 0A (line feed) !\r -> ASCII 0D (carriage return)  \t -> ASCII 09 (horizontal tab) \v -> ASCII 0B (vertical tab) \' -> single-quote \" -> double-quote \\ -> backslash -Escape sequences for any unicode code point. ; Represented by a backslash + one or more decimal digits. = Fails when the code point is not representable in unicode. .Escape sequences for bytes (including ASCII). . Represented by a backslash + two hexdigits. EEscape sequences in the Unicode Basic Multilingual Plane (BMP). C.f. . ' Represented by a backslash+lowercase u followed by four hexdigits. /Escape sequences outside the Unicode BMP. C.f. . ' Represented by a backslash+uppercase U followed by five or six ' hexdigits totalling at most 0x10FFFF A unicode escape, either as  or . CParse a single-quoted string with no escape sequences, except that L a single-quote in the string is encoded as two single-quote characters. EThis is as single-quoted strings in SQL and Rc (the shell in Plan9). H It is an excellent encoding for strings because they are so easy to G validate from untrusted input and escape for rendering, whether it ! is done by human or machine. EParse a double-quoted string with common backslash escape sequences.  We use $ with the passed table of contents.  Also, ,  and  are allowed.  Further, the \&4 stands for no character: it literally adds nothing F to the string in which it appears, but it can be useful as in  \127\&0. K Finally, lines can be folded with a backslash-newline-backslash, ignoring  any sA between the newline and the second backslash. This is preferred P over a simple backslash-newline, as it reduces any need to remember how 9 leading whitespace is treated after a line-fold. The escapes parsed by # are preferred to the other escape H sequences. Note that there are no escape sequences for backslash or C double-quote by default (aside from a numerical escape), so you'll * need to include them in the table for . ?Parse a comment beginning with the passed string and ending at  (but not including) a u. AParse a non-nesting comment beginning at the first passed string > and ending with (and including) the second passed string. C.f . Parse a nesting block comment. C.f. . 5Parse a single char when it satisfies the predicate. F Fails when the next input character does not satisfy the predicate. Match any character in a set.  vowel = charClass "aeiou" Range notation is supported.  "halfAlphabet = charClass "a-nA-N" To add a literal '-', to a set, place it at the beginning or end  of the string. CYou may also invert the set by placing a caret at the beginning of  the string.  nonVowel = "^aeiou" To add a literal '^', to a set, place it somewhere other than at ! the beginning of the string. HThe class of printable unicode characters, including linear whitesapce. 4 Accepts: Letter, Number, Symbol, Space, Punctuation/ Quote, Mark, Format, PrivateUse U Does not Accept: LineSeparator, ParagraphSeparator, Control, Surrogate, NotAssigned Accepts characters from , except those which  satisfy the passed predicate. HAccepts a wide variety of unicode characters. This is the largest class L of characters which might be used in a programming language that allows A unicode identifiers, and probably include a little too much. + Accepts: Letter, Mark, Number, Punctuation/Quote, Symbol E Does not Accept: Space, LineSeparator, ParagraphSeparator, Control, 3 Format, Surrogate, PrivateUse, NotAssigned Accepts characters from , except those which  satisfy the passed predicate. 3Parse a digit in the passed base: 2, 8, 10 or 16. 6Interpret a string as an integer in the passed base. 6Interpret a string as a mantissa in the passed base. RVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy1Whether a character is allowed in the identifier Whether the character is  disallowed* as the first character of the identifier z-The sigils and their corresponding semantics An identifier parser {|}~Start the block comment End the block comment Start a comment End a comment N VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~N YZ[\]^_ `abcdefghijklmnopqsturvwVXWxyz{|}~ PVXWYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferredv  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG  Safe-Inferred over the identity monad. .Type for Parsec parsers tracking indentation. (Opaque type tracking indentation state. Create a starting IndentationState: indentation is initially 8 enabled and the indentation depth stack starts with [0]. ;Succeed only when the indentation stack is suitably empty:  is empty or equal to [0]!, or if indentation is disabled. &The most general way to run a parser. "runParserIT p state filePath input  runs parser p on the input list of tokens input, obtained from source  filePath with the initial user state st. Indentation is initially * enabled and the depth stack begins as [0].  The filePath= is only used in error messages and may be the empty string. 2 Returns a computation in the underlying monad m that return either a   ParseError () or a value of type a (). As  , but over the Identity monad.  Shortcut for   Shortcut for  Parse an indent: as x% ensuring the result is greater than E the current indentation level. Pushes the indentation depth stack. Parse an indent: as x! ensuring the result is equal to ! the current indentation level. Parse an indent: as x" ensuring the result is less than C the current indentation level. Pops the indentation depth stack. Q Consumes no input, thus multiple dedents might be parsed at a single position. As , but also consume the . ) The leading whitespace is left intact.  Test if indentation is enabled. &Obtain the current indentation depth. $ Fails if indentation is disabled. 0Run the passed parser with indentation enabled. 1Run the passed parser with indentation disabled. 8Take a list of some linear whitespace tokens and return C a parser that advances over linear whitespace and blank lines. : Also, when indentation is disabled, also advance over us. :You will almost always want to use this combinator before ,   and . to make sure indentation is always detected. D Actual linear whitespace is usually not enough: remember to add 7 parsers for comments as well. Line comments shouldn' t eat the  newline; the  combinator is acceptable. Alternate version of Parsec's getState+ suited for indentation-sensitive parsers. Alternate version of Parsec's  puttState+ suited for indentation-sensitive parsers. Alternate version of Parsec's  modifyState+ suited for indentation-sensitive parsers. !Peek the top of the depth stack. <Pop the top of the depth stack and return the popped depth. $Push to the top of the depth stack. the parser to run Fwhat characters count as leading space and how they should be counted $a list of linear whitespace parsers an initial user state :name of the source file from which the input was gathered  input stream the parser to run Fwhat characters count as leading space and how they should be counted $a list of linear whitespace parsers an initial user state :name of the source file from which the input was gathered  input stream ZVWX$VXW      !"!#!$!%!&'(')*+*,*-*.*/*0*123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ! \!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ! !!!!   luthor-0.0.0Text.Luthor.CombinatorText.Luthor.Syntax Text.LuthorText.Luthor.LexText.Luthor.IndentText.Parsec.Combinator optionMaybeoptionalbaseControl.Applicative<**><**><*>pure Data.Functor<$> Control.MonadvoidGHC.Base<$ parsec-3.1.3countmany1betweenText.Parsec.CharanyCharcharoctDigithexDigitnoneOfoneOfText.Parsec.Primmanytry<|> unexpectedText.Parsec.ErrorerrorPos ParseErrorText.Parsec.Pos sourceColumn sourceLine sourceName SourceNameLineColumn SourcePos<$$><||>choicedispatch longestOfoption optional_atLeastatMostmanyNMmanyOfmanyOf_many1_many_manyTillmanyThruchompbetween2sepBysepBy1sepEndBy sepEndBy1endByendBy1 sepAroundBy sepAroundBy1chainlchainl1chainrchainr1 lookAhead notFollowedBy atEndOfInput endOfInputallInputwithRemainingInputexpect withPositionwithPositionEnd withPositionsLuthorLexLexemeLuthorTLexT runLuthorT runLuthorlexemeignoresatisfy unlexWithunlex endOfLexemesisAtEnd IndentPolicyConvertDontMixstringcharIstringIupAlphaloAlphaalphadigitbinDigitctl asciiTextuniTextcrlfsphtsqdqcolon semicolondotcommabsEscyesnoyesnocrlflwsnewline lineBreakbsnlbsnlwsbs dentationmany1Not sigilizedinParens inBracketsinBracesinAnglesnumSignnumBase numNatural numAfterPointnumDenominator numOptSign numIntegerintegerrational scientific letterEsccEscapes decimalEscasciiEscloUniEschiUniEscuniEscsqStringdqString lineComment blockCommentnestingCommentaChar charClassuniPrint uniPrintMinus uniIdClassuniIdClassMinusxDigitstringToIntegerstringToMantissaParsecIParsecIT IndentState startIndent endIndent runParserIT runParserIrunPITrunPIindentnextlinededentdedent'isIndentEnabledgetIndentDepthwithIndentationwithoutIndentation plusBlanklinegetStateputState modifyStatepeekIndentationpopIndentationpushIndentation AlternativeParsecTghc-prim GHC.TypesTrueFalsetransformers-0.3.0.0Data.Functor.IdentityIdentity Data.MaybeNothing EndOfLexemes_lexShow _lexUpdatePos _lexPayload_lexPos_wrap lexDentation _dentation_upAlpha_loAlpha_alpha_digit _alphaNum _asciiControlxDigits$fIsStringParsecT updateStatesetStateupdateParserStatesetParserStategetParserStatesetInput setPositiongetInput getPosition parseTestparse runParser runParserTrunPrunPT manyAccumskipMany tokenPrimEx tokenPrimtokentokenslabelslabel parserPlus parserZero parserFailmergeErrorReply parserBind parserReturn parsecMapmkPT runParsecTsysUnExpectError unknownErrorParsecConsumedEmptyOkErrorReply stateUserstatePos stateInputStateunconsStream Data.EitherLeftRightIS_policy_depth_enabled_ws_prepForDentation