-- | `DomainParser` is a parser for modern domain names as seen in practice. -- | See `DomainParserRFC1035` for a domain parser restricted to RFC1035 recommandations. module GenericParser.DomainParser where import Prelude (bind, not, pure, ($), (&&), (*>), (<<<), (<>), (>), (-)) import Control.Alt ((<|>)) import Control.Lazy (defer) import Data.Array as A import Data.Either (Either(..)) import Data.Maybe (Maybe(..), maybe) import Data.String as S import Data.String.CodeUnits as CU -- Import all common functions between RFC1035 and modern domain parsing. import GenericParser.DomainParser.Common (DomainError(..), eof, ldh_str, let_dig, let_dig_hyp, max_domain_length, max_label_length, Size) import GenericParser.Parser (Parser(..) , success, failureError , current_position , alphanum, char, letter, many1, parse, string , try, tryMaybe) -- | From RFC 1035: