crucible-syntax-0.4.1: A syntax for reading and writing Crucible control-flow graphs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.Syntax.Atoms

Description

Atoms used by the Crucible CFG concrete syntax.

Synopsis

The atom datatype

data Atomic Source #

The atoms of the language

Constructors

Kw !Keyword

Keywords are all the built-in operators and expression formers

Lbl !LabelName

Labels, but not the trailing colon

At !AtomName

Atom names (which look like Scheme symbols)

Rg !RegName

Registers, whose names have a leading single $

Gl !GlobalName

Global variables, whose names have a leading double $$

Fn !FunName

Function names, minus the leading @

Int !Integer

Literal integers

Rat !Rational

Literal rational numbers

Bool !Bool

Literal Booleans

StrLit !Text

Literal strings

Instances

Instances details
Show Atomic Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

IsAtom Atomic Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

showAtom :: Atomic -> Text Source #

Eq Atomic Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

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

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

Ord Atomic Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

atom :: Parser Atomic Source #

Parse an atom

Individual atoms

newtype AtomName Source #

The name of an atom (non-keyword identifier)

Constructors

AtomName Text 

Instances

Instances details
Show AtomName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Eq AtomName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Ord AtomName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Pretty AtomName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

pretty :: AtomName -> Doc ann #

prettyList :: [AtomName] -> Doc ann #

newtype LabelName Source #

The name of a label (identifier followed by colon)

Constructors

LabelName Text 

Instances

Instances details
Show LabelName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Eq LabelName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Ord LabelName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Pretty LabelName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

pretty :: LabelName -> Doc ann #

prettyList :: [LabelName] -> Doc ann #

newtype RegName Source #

The name of a register (dollar sign followed by identifier)

Constructors

RegName Text 

Instances

Instances details
Show RegName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Eq RegName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

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

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

Ord RegName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Pretty RegName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

pretty :: RegName -> Doc ann #

prettyList :: [RegName] -> Doc ann #

newtype FunName Source #

The name of a function (at-sign followed by identifier)

Constructors

FunName Text 

Instances

Instances details
Show FunName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Eq FunName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

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

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

Ord FunName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Pretty FunName Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

pretty :: FunName -> Doc ann #

prettyList :: [FunName] -> Doc ann #

newtype GlobalName Source #

The name of a global variable (two dollar signs followed by identifier)

Constructors

GlobalName Text 

data Keyword Source #

Individual language keywords (reserved identifiers)

Instances

Instances details
Show Keyword Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Eq Keyword Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms

Methods

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

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

Ord Keyword Source # 
Instance details

Defined in Lang.Crucible.Syntax.Atoms