Idris2Doc : Text.ILex.Stack

Text.ILex.Stack

(source)

Definitions

recordStack : Type->Type->Bits32->Type->Type
  A general-purpose mutable parser stack that can be used in many common
situation, such as when needing just a lexer or wanting to parse
a single value of a simple type.

For concrete usage examples, see ilex-json and ilex-toml, which both
make use of this type as their mutable parser state.

If you are writing a parser for something complex such as a programming
language, you're probably going to need quite a few custom fields, so
feel free to come up with your own.

Totality: total
Visibility: public export
Constructor: 
S : (bufSize_ : Nat) ->ByteString->IBufferbufSize_->Nat->Nat->Refq (LTENatbufSize_) ->Refq (LTENatbufSize_) ->Refq (SnocListBytePos) ->Refqa->Refq (Indexr) ->Refq (SnocListString) ->Refq (Maybe (BBErre)) ->Stackearq

Projections:
.bufSize_ : Stackearq->Nat
.curOffset_ : Stackearq->Nat
.cur_ : ({rec:0} : Stackearq) ->IBuffer (bufSize_{rec:0})
.error_ : Stackearq->Refq (Maybe (BBErre))
.from_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))
.positions_ : Stackearq->Refq (SnocListBytePos)
.prevOffset_ : Stackearq->Nat
.prev_ : Stackearq->ByteString
.stack_ : Stackearq->Refqa
.state_ : Stackearq->Refq (Indexr)
.strings_ : Stackearq->Refq (SnocListString)
.till_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))

Hints:
HasBBErr (Stackear) e
HasBytes (Stackear)
HasStack (Stackear) a
HasStringLits (Stackear)
.bufSize_ : Stackearq->Nat
Totality: total
Visibility: public export
bufSize_ : Stackearq->Nat
Totality: total
Visibility: public export
.prev_ : Stackearq->ByteString
Totality: total
Visibility: public export
prev_ : Stackearq->ByteString
Totality: total
Visibility: public export
.cur_ : ({rec:0} : Stackearq) ->IBuffer (bufSize_{rec:0})
Totality: total
Visibility: public export
cur_ : ({rec:0} : Stackearq) ->IBuffer (bufSize_{rec:0})
Totality: total
Visibility: public export
.prevOffset_ : Stackearq->Nat
Totality: total
Visibility: public export
prevOffset_ : Stackearq->Nat
Totality: total
Visibility: public export
.curOffset_ : Stackearq->Nat
Totality: total
Visibility: public export
curOffset_ : Stackearq->Nat
Totality: total
Visibility: public export
.from_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))
Totality: total
Visibility: public export
from_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))
Totality: total
Visibility: public export
.till_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))
Totality: total
Visibility: public export
till_ : ({rec:0} : Stackearq) ->Refq (LTENat (bufSize_{rec:0}))
Totality: total
Visibility: public export
.positions_ : Stackearq->Refq (SnocListBytePos)
Totality: total
Visibility: public export
positions_ : Stackearq->Refq (SnocListBytePos)
Totality: total
Visibility: public export
.stack_ : Stackearq->Refqa
Totality: total
Visibility: public export
stack_ : Stackearq->Refqa
Totality: total
Visibility: public export
.state_ : Stackearq->Refq (Indexr)
Totality: total
Visibility: public export
state_ : Stackearq->Refq (Indexr)
Totality: total
Visibility: public export
.strings_ : Stackearq->Refq (SnocListString)
Totality: total
Visibility: public export
strings_ : Stackearq->Refq (SnocListString)
Totality: total
Visibility: public export
.error_ : Stackearq->Refq (Maybe (BBErre))
Totality: total
Visibility: public export
error_ : Stackearq->Refq (Maybe (BBErre))
Totality: total
Visibility: public export
init : {auto0_ : 0<r} ->a-> (n : Nat) ->IBuffern->F1q (Stackearq)
  Initializes a new parser stack.

Totality: total
Visibility: export
0Tok : Type->Type
Totality: total
Visibility: public export
0Toks : Type->Type
Totality: total
Visibility: public export
0Skot : Type->Type
Totality: total
Visibility: public export
0L1 : Type->Type->Type->Type
Totality: total
Visibility: public export
0Lexer : Type->Type->Type
Totality: total
Visibility: public export
pushBounded : HasBytess=>HasStacks (Skota) =>RExpTrue-> {auto0_ : 0<r} ->sq=>a->F1q (Indexr)
Totality: total
Visibility: export
tok : HasBytess=>HasStacks (Skota) =>RExpTrue-> {auto0_ : 0<r} ->a-> (RExpTrue, Stepqrs)
Totality: total
Visibility: export
byteTok : HasBytess=>HasStacks (Skota) =>RExpTrue-> {auto0_ : 0<r} -> (ByteString->a) -> (RExpTrue, Stepqrs)
Totality: total
Visibility: export
stringTok : HasBytess=>HasStacks (Skota) =>RExpTrue-> {auto0_ : 0<r} -> (String->a) -> (RExpTrue, Stepqrs)
Totality: total
Visibility: export
lexEOI : {auto0_ : 0<r} ->HasStacks (SnocLista) =>HasBBErrse=>HasBytess=>Indexr->sq->F1q (Either (BBErre) (Lista))
Totality: total
Visibility: export
lexer : {auto0_ : 0<r} ->Stepsqr (Stacke (Skota) r) ->L1qea
Totality: total
Visibility: export
dataToken : Type->Type->Type
  Description of lexicographic tokens

Totality: total
Visibility: public export
Constructors:
Ignore : Tokenea
  Marks a terminal state that does not produce a token.
This can be used for comments or whitespace that should be
ignored.
Const : a->Tokenea
  A constant token that allows us to emit a value directly.
Txt : (String->Eitherea) ->Tokenea
  A token that needs to be parsed from its corresponding bytestring.
Bytes : (ByteString->Eitherea) ->Tokenea
  A token that needs to be parsed from its corresponding bytestring.
const : a->Tokenea
Totality: total
Visibility: export
txt : (String->a) ->Tokenea
Totality: total
Visibility: export
bytes : (ByteString->a) ->Tokenea
Totality: total
Visibility: export
0PVal1 : Type->Type->Type->Type
Totality: total
Visibility: public export
value : Maybea->TokenMap (Tokenea) ->PVal1qea
  Parser for simple values based on regular expressions.

Totality: total
Visibility: export