ogma-language-smv-1.7.0: Ogma: Runtime Monitor translator: SMV Language Frontend
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.SMV.LexSMV

Synopsis

Documentation

data AlexAddr Source #

Constructors

AlexA# Addr# 

data AlexAcc user Source #

tok :: (String -> Tok) -> Posn -> String -> Token Source #

Create a token with position.

data Tok Source #

Token without position.

Constructors

TK !TokSymbol

Reserved word or symbol.

TL !String

String literal.

TI !String

Integer literal.

TV !String

Identifier.

TD !String

Float literal.

TC !String

Character literal.

Instances

Instances details
Show Tok Source # 
Instance details

Defined in Language.SMV.LexSMV

Eq Tok Source # 
Instance details

Defined in Language.SMV.LexSMV

Methods

(==) :: Tok -> Tok -> Bool Source #

(/=) :: Tok -> Tok -> Bool Source #

Ord Tok Source # 
Instance details

Defined in Language.SMV.LexSMV

Methods

compare :: Tok -> Tok -> Ordering Source #

(<) :: Tok -> Tok -> Bool Source #

(<=) :: Tok -> Tok -> Bool Source #

(>) :: Tok -> Tok -> Bool Source #

(>=) :: Tok -> Tok -> Bool Source #

max :: Tok -> Tok -> Tok Source #

min :: Tok -> Tok -> Tok Source #

pattern TS :: String -> Int -> Tok Source #

Smart constructor for Tok for the sake of backwards compatibility.

data TokSymbol Source #

Keyword or symbol tokens have a unique ID.

Constructors

TokSymbol 

Fields

Instances

Instances details
Show TokSymbol Source # 
Instance details

Defined in Language.SMV.LexSMV

Eq TokSymbol Source #

Keyword/symbol equality is determined by the unique ID.

Instance details

Defined in Language.SMV.LexSMV

Ord TokSymbol Source #

Keyword/symbol ordering is determined by the unique ID.

Instance details

Defined in Language.SMV.LexSMV

data Token Source #

Token with position.

Constructors

PT Posn Tok 
Err Posn 

Instances

Instances details
Show Token Source # 
Instance details

Defined in Language.SMV.LexSMV

Eq Token Source # 
Instance details

Defined in Language.SMV.LexSMV

Methods

(==) :: Token -> Token -> Bool Source #

(/=) :: Token -> Token -> Bool Source #

Ord Token Source # 
Instance details

Defined in Language.SMV.LexSMV

printPosn :: Posn -> String Source #

Pretty print a position.

tokenPos :: [Token] -> String Source #

Pretty print the position of the first token in the list.

tokenPosn :: Token -> Posn Source #

Get the position of a token.

tokenLineCol :: Token -> (Int, Int) Source #

Get line and column of a token.

posLineCol :: Posn -> (Int, Int) Source #

Get line and column of a position.

mkPosToken :: Token -> ((Int, Int), String) Source #

Convert a token into "position token" form.

tokenText :: Token -> String Source #

Convert a token to its text.

prToken :: Token -> String Source #

Convert a token to a string.

data BTree Source #

Finite map from text to token organized as binary search tree.

Constructors

N

Nil (leaf).

B String Tok BTree BTree

Binary node.

Instances

Instances details
Show BTree Source # 
Instance details

Defined in Language.SMV.LexSMV

eitherResIdent :: (String -> Tok) -> String -> Tok Source #

Convert potential keyword into token or use fallback conversion.

resWords :: BTree Source #

The keywords and symbols of the language organized as binary search tree.

unescapeInitTail :: String -> String Source #

Unquote string literal.

data Posn Source #

Constructors

Pn !Int !Int !Int 

Instances

Instances details
Show Posn Source # 
Instance details

Defined in Language.SMV.LexSMV

Eq Posn Source # 
Instance details

Defined in Language.SMV.LexSMV

Methods

(==) :: Posn -> Posn -> Bool Source #

(/=) :: Posn -> Posn -> Bool Source #

Ord Posn Source # 
Instance details

Defined in Language.SMV.LexSMV

utf8Encode :: Char -> [Word8] Source #

Encode a Haskell String to a list of Word8 values, in UTF8 format.