Idris2Doc : Text.Lex.Shift

Text.Lex.Shift

(source)

Reexports

importpublic Text.Lex.Manual
importpublic Data.List.Shift

Definitions

shift : Position->Shiftbtsxxssyys->Position
  Shift the position by a number of columns represented by
a `Shift` value. This assumes, that no line break was "shifted".

Totality: total
Visibility: public export
dataShiftRes : Bool->SnocListChar->ListChar->Type
  Result of running a lexer once: The lexer either stops, when
it can no longer consume any characters, or it shifts some characters
from the head of the list of remaining characters to the tail of the
snoclist of already recognised characters.

@ st : the initial snoclist of already recognised characters
@ ts : the initial list of remaining characters

Totality: total
Visibility: public export
Constructors:
Succ : (post : ListChar) ->ShiftbCharprepoststts=>ShiftResbstts
Stop : ShiftFalseCharseerrStartstts-> (0errEnd : ListChar) ->ShiftFalseChareeerrEndseerrStart=>InnerErrorVoid->ShiftResbstts
suffix : (SnocListChar->a) ->ShiftResTrue [<] cs->LexResTruecsea
Totality: total
Visibility: public export
swapOr : ShiftRes (x|| Delay y) stts->ShiftRes (y|| Delay x) stts
Totality: total
Visibility: public export
orSame : ShiftRes (x|| Delay x) stts->ShiftResxstts
Totality: total
Visibility: public export
orTrue : ShiftRes (x|| Delay True) stts->ShiftResTruestts
Totality: total
Visibility: public export
orFalse : ShiftRes (x|| Delay False) stts->ShiftResxstts
Totality: total
Visibility: public export
swapAnd : ShiftRes (x&& Delay y) stts->ShiftRes (y&& Delay x) stts
Totality: total
Visibility: public export
andSame : ShiftRes (x&& Delay x) stts->ShiftResxstts
Totality: total
Visibility: public export
andTrue : ShiftRes (x&& Delay True) stts->ShiftResxstts
Totality: total
Visibility: public export
andFalse : ShiftRes (x&& Delay False) stts->ShiftResFalsestts
Totality: total
Visibility: public export
weaken : ShiftResxstts->ShiftResFalsestts
Totality: total
Visibility: public export
weakens : ShiftResTruestts->ShiftResxstts
Totality: total
Visibility: public export
and1 : ShiftResxstts->ShiftRes (x&&y) stts
Totality: total
Visibility: public export
and2 : ShiftResxstts->ShiftRes (y&& Delay x) stts
Totality: total
Visibility: public export
trans : ShiftResb1sxxs->Shiftb2Charsxxssyys->ShiftRes (b1|| Delay b2) syys
Totality: total
Visibility: public export
(<|>) : ShiftResb1sxxs-> Lazy (ShiftResb2sxxs) ->ShiftRes (b1&& Delay b2) sxxs
Totality: total
Visibility: public export
Fixity Declaration: infixr operator, level 2
0Shifter : Bool->Type
  A `Shifter` is a function that moves items from the head of a list
to the tail of a snoclist.

A lexer is just a fancy wrapper around a `Shifter`, and *running* a
lexer (via function `run`) leads to the underlying `Shifter`
(see `Text.Lex.Core`).

Totality: total
Visibility: public export
0AutoShift : Bool->Type
Totality: total
Visibility: public export
range : InnerErrorVoid->Shiftb1Charruccurgiroorig-> (0rest : ListChar) ->ShiftFalseChartserrestruccur=>ShiftResb2giroorig
Totality: total
Visibility: public export
invalidEscape : Shiftb1Charruccurgiroorig-> (0rest : ListChar) ->ShiftFalseChartserrestruccur=>ShiftResb2giroorig
Totality: total
Visibility: public export
unknownRange : Shiftb1Charruccurgiroorig-> (0rest : ListChar) ->ShiftFalseChartserrestruccur=>ShiftResb2giroorig
Totality: total
Visibility: public export
single : InnerErrorVoid->ShiftbCharruc (c::errEnd) giroorig->ShiftResbresgiroorig
Totality: total
Visibility: public export
unknown : ShiftbCharruc (c::errEnd) giroorig->ShiftResbresgiroorig
Totality: total
Visibility: public export
failCharClass : CharClass->ShiftbCharruc (c::errEnd) giroorig->ShiftResbresgiroorig
Totality: total
Visibility: public export
failDigit : DigitType->ShiftbCharruc (c::errEnd) giroorig->ShiftResbresgiroorig
Totality: total
Visibility: public export
eoiAt : Shiftb1Charruc [] giroorig->ShiftResb2giroorig
Totality: total
Visibility: public export
eoi : ShifterFalse
  Shifter that recognises the empty String

Totality: total
Visibility: public export
fail : ShifterTrue
  Shifter that always fails

Totality: total
Visibility: public export
one : (Char->Bool) ->AutoShiftTrue
  A shifter that moves exactly one value, if
it fulfills the given predicate.

Totality: total
Visibility: public export
takeWhile : (Char->Bool) ->AutoShiftFalse
  A shifter that moves items while the given predicate returns
`True`

Totality: total
Visibility: public export
takeWhile1 : (Char->Bool) ->AutoShiftTrue
  A strict version of `takeWhile`, which moves at least one item.

Totality: total
Visibility: public export
takeUntil : (Char->Bool) ->AutoShiftFalse
  A shifter that moves items while the give predicate returns
`False`

Totality: total
Visibility: public export
takeUntil1 : (Char->Bool) ->AutoShiftTrue
  A strict version of `takeUntil`, which moves at least one item.

Totality: total
Visibility: public export
digits : AutoShiftFalse
  A shifter that moves digits.

Totality: total
Visibility: public export
digits1 : AutoShiftTrue
  A strict version of `digits`.

Totality: total
Visibility: public export
int : AutoShiftTrue
  A shifter that moves an integer prefix

Totality: total
Visibility: public export
intPlus : AutoShiftTrue
  Like `int` but also allows an optional leading `'+'` character.

Totality: total
Visibility: public export
number : ShifterTrue
  A shifter for recognizing JSON numbers

Totality: total
Visibility: public export
double : TokTrueeDouble
Totality: total
Visibility: public export
take : (n : Nat) -> {auto0_ : IsSuccn} ->AutoShiftTrue
Totality: total
Visibility: public export
tail : AutoShiftTrue
Totality: total
Visibility: public export
exact : (ts : ListChar) -> {auto0_ : NonEmptyts} ->AutoShiftTrue
Totality: total
Visibility: public export
string : ShifterTrue
Totality: total
Visibility: public export