futhark-0.25.12: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Futhark.Parser.Lexer.Tokens

Description

Definition of the tokens used in the lexer.

Also defines other useful building blocks for constructing tokens.

Synopsis

Documentation

data Token Source #

A lexical token. It does not itself contain position information, so in practice the parser will consume tokens tagged with a source position.

Instances

Instances details
Show Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Eq Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

Methods

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

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

Ord Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

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

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

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

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

tokenC :: a -> ByteString -> a Source #

tokenS :: (Text -> a) -> ByteString -> a Source #

suffZero :: Text -> Text Source #

Suffix a zero if the last character is dot.

tryRead :: Read a => String -> Text -> a Source #