Module MLTypes

Types for Markup Language Parsing.

Author: Max Deppert

Version: March 2014

Summary of exported operations:

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

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   

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

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

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

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

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

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

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

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

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

Further infos:
  • partially defined

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

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

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

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

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

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

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

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

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

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

top :: [a] -> a   

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

pop :: [a] -> [a]   

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

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

Further infos:
  • partially defined

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