Module MLTypes

Types for Markup Language Parsing.

Author: Max Deppert

Version: March 2014

Summary of exported operations:

row :: ((Int,Int),Int) -> Int  Deterministic 
col :: ((Int,Int),Int) -> Int  Deterministic 
tbs :: ((Int,Int),Int) -> Int  Deterministic 
wcol :: ((Int,Int),Int) -> Int  Deterministic 
tok :: (Token,((Int,Int),Int)) -> Token  Deterministic 
pos :: (Token,((Int,Int),Int)) -> ((Int,Int),Int)  Deterministic 
tgn :: (Token,((Int,Int),Int)) -> String  Deterministic 
ind :: (Token,((Int,Int),Int)) -> Int  Deterministic 
isTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
isStartTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
isVoidTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
isEndTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
isAlign :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
isPlain :: (Token,((Int,Int),Int)) -> Bool  Deterministic 
push :: a -> [a] -> [a]  Deterministic 
top :: [a] -> a  Deterministic 
pop :: [a] -> [a]  Deterministic 
update :: (a -> a) -> [a] -> [a]  Deterministic 
sym2node :: (Token,((Int,Int),Int)) -> Node  Deterministic 

Exported datatypes:


L

Constructors:

  • X :: L
  • H :: L

WarnID

Constructors:

  • TagNameFirstDigit :: WarnID
  • TagNameNotAlphaNum :: WarnID
  • TagEndsUnexpected :: WarnID
  • UnquotedAttributeEmpty :: WarnID
  • Unquoted :: Char -> WarnID
  • AttributesUnseperated :: WarnID
  • UnexpectedEndTag :: WarnID
  • SingleEndTag :: WarnID

Text

A text element can be a raw text, a Curry expression that evaluates to some text, or a Curry expression that evaluates to some content.

Constructors:

  • Raw :: String -> Text
  • ExpT :: String -> Text
  • ExpC :: String -> Text

TPos

Type synonym: TPos = (SimplePos,Int)


Symbol

Type synonym: Symbol = (Token,TPos)


Attribute

Type synonym: Attribute = (String,[Text])


Stack

Type synonym: Stack a = [a]


ParseStack

Type synonym: ParseStack = Stack (Symbol,[Tree])


Token

Constructors:

  • Break :: Token
  • Tabs :: Int -> Token
  • Blanks :: Int -> Token
  • Data :: [Text] -> Token
  • StartTag :: String -> [Attribute] -> Int -> Token
  • VoidTag :: String -> [Attribute] -> Token
  • EndTag :: String -> Token

Node

Constructors:

  • Content :: [Text] -> Node
  • Element :: String -> [Attribute] -> Node

Tree

Constructors:


Exported operations:

row :: ((Int,Int),Int) -> Int  Deterministic 

col :: ((Int,Int),Int) -> Int  Deterministic 

tbs :: ((Int,Int),Int) -> Int  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

wcol :: ((Int,Int),Int) -> Int  Deterministic 

tok :: (Token,((Int,Int),Int)) -> Token  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

pos :: (Token,((Int,Int),Int)) -> ((Int,Int),Int)  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

tgn :: (Token,((Int,Int),Int)) -> String  Deterministic 

Further infos:
  • partially defined

ind :: (Token,((Int,Int),Int)) -> Int  Deterministic 

Further infos:
  • partially defined
  • solution complete, i.e., able to compute all solutions

isTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

isStartTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

isVoidTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

isEndTag :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

isAlign :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

isPlain :: (Token,((Int,Int),Int)) -> Bool  Deterministic 

push :: a -> [a] -> [a]  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

top :: [a] -> a  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

pop :: [a] -> [a]  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

update :: (a -> a) -> [a] -> [a]  Deterministic 

Further infos:
  • partially defined

sym2node :: (Token,((Int,Int),Int)) -> Node  Deterministic