Primitive lexical scanners based on the CombinatorP
library
List of Import References :
See BOOL
See Char
See CombinatorP
See DENOTATION
See Either
See Int
See LexScanPosition
See Nat
See Option
See PrettyPrinter
See Real
See Seq
See String
See Void
SIGNATURE LexScanPrim[error]
$Date: 2012-10-02 14:17:54 +0200 (Tue, 02 Oct 2012) $ ($Revision: 838 $)
SORT error IMPORT LexScanPosition ONLY position IMPORT CombinatorP COMPLETELY IMPORT Char ONLY char Nat ONLY nat String ONLY string Void ONLY void
A lexical scanner is a parser is a parser with an input sequence of type char.
Advance the position of the scanner by given number of rows/columns (advancing rows resets column to first column).
FUN advanceRow: LAZY[parser[void,char,position,error]] FUN advanceCol: LAZY[parser[void,char,position,error]] FUN advanceRow: nat -> LAZY[parser[void,char,position,error]] FUN advanceCol: nat -> LAZY[parser[void,char,position,error]]
Scan a literal string or character and advance the columns by the number of characters recognized.
FUN litString: string -> LAZY[parser[void,char,position,error]] FUN litChar: char -> LAZY[parser[void,char,position,error]]
Scan a newline, blank, or tab and advance position accordingly.
FUN newline: LAZY[parser[void,char,position,error]] FUN blank: LAZY[parser[void,char,position,error]] FUN tab: LAZY[parser[void,char,position,error]]
next node: LexScanPosition,
prev node: LexScanPosition,
up to node: Subsystem Lexical Scanning