language-c-0.8.2: Analysis and generation of C code

Copyright(c) [1995..1999] Manuel M. T. Chakravarty
(c) 2008 Benedikt Huber (stripped radically)
LicenseBSD-style
Maintainerbenedikt.huber@gmail.com
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell98

Language.C.Data.Node

Description

source position and unqiue name

Synopsis

Documentation

data NodeInfo #

Parsed entity attribute

Instances
Eq NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Data NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NodeInfo -> c NodeInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NodeInfo #

toConstr :: NodeInfo -> Constr #

dataTypeOf :: NodeInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NodeInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NodeInfo) #

gmapT :: (forall b. Data b => b -> b) -> NodeInfo -> NodeInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> NodeInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NodeInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo #

Ord NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Show NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Generic NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Associated Types

type Rep NodeInfo :: Type -> Type #

Methods

from :: NodeInfo -> Rep NodeInfo x #

to :: Rep NodeInfo x -> NodeInfo #

NFData NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Methods

rnf :: NodeInfo -> () #

Pos NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Methods

posOf :: NodeInfo -> Position #

CNode NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Pretty CStrLit # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStrLit -> Doc #

prettyPrec :: Int -> CStrLit -> Doc #

Pretty CConst # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CConst -> Doc #

prettyPrec :: Int -> CConst -> Doc #

Pretty CBuiltin # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CBuiltin -> Doc #

prettyPrec :: Int -> CBuiltin -> Doc #

Pretty CExpr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CExpr -> Doc #

prettyPrec :: Int -> CExpr -> Doc #

Pretty CAttr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAttr -> Doc #

prettyPrec :: Int -> CAttr -> Doc #

Pretty CDesignator # 
Instance details

Defined in Language.C.Pretty

Pretty CInit # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CInit -> Doc #

prettyPrec :: Int -> CInit -> Doc #

Pretty CEnum # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CEnum -> Doc #

prettyPrec :: Int -> CEnum -> Doc #

Pretty CStructUnion # 
Instance details

Defined in Language.C.Pretty

Pretty CAlignSpec # 
Instance details

Defined in Language.C.Pretty

Pretty CFunSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CFunSpec -> Doc #

prettyPrec :: Int -> CFunSpec -> Doc #

Pretty CTypeQual # 
Instance details

Defined in Language.C.Pretty

Pretty CTypeSpec # 
Instance details

Defined in Language.C.Pretty

Pretty CStorageSpec # 
Instance details

Defined in Language.C.Pretty

Pretty CDeclSpec # 
Instance details

Defined in Language.C.Pretty

Pretty CBlockItem # 
Instance details

Defined in Language.C.Pretty

Pretty CAsmOperand # 
Instance details

Defined in Language.C.Pretty

Pretty CAsmStmt # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAsmStmt -> Doc #

prettyPrec :: Int -> CAsmStmt -> Doc #

Pretty CStat # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStat -> Doc #

prettyPrec :: Int -> CStat -> Doc #

Pretty CArrSize # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CArrSize -> Doc #

prettyPrec :: Int -> CArrSize -> Doc #

Pretty CDeclr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDeclr -> Doc #

prettyPrec :: Int -> CDeclr -> Doc #

Pretty CDecl # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDecl -> Doc #

prettyPrec :: Int -> CDecl -> Doc #

Pretty CFunDef # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CFunDef -> Doc #

prettyPrec :: Int -> CFunDef -> Doc #

Pretty CExtDecl # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CExtDecl -> Doc #

prettyPrec :: Int -> CExtDecl -> Doc #

Pretty CTranslUnit # 
Instance details

Defined in Language.C.Pretty

type Rep NodeInfo # 
Instance details

Defined in Language.C.Data.Node

undefNode :: NodeInfo #

create a node with neither name nor positional information

isUndefNode :: NodeInfo -> Bool #

return True if the node carries neither name nor positional information

mkNodeInfoOnlyPos :: Position -> NodeInfo #

| Given only a source position, create a new node attribute

mkNodeInfoPosLen :: Position -> PosLength -> NodeInfo #

Given a source position and the position and length of the last token, create a new node attribute

mkNodeInfo :: Position -> Name -> NodeInfo #

Given a source position and a unique name, create a new attribute identifier

mkNodeInfo' :: Position -> PosLength -> Name -> NodeInfo #

Given a source position, the position and length of the last token and a unique name, create a new attribute identifier. Strict in

internalNode :: NodeInfo #

Deprecated: use undefNode instead

class CNode a where #

a class for convenient access to the attributes of an attributed object

Methods

nodeInfo :: a -> NodeInfo #

Instances
CNode NodeInfo # 
Instance details

Defined in Language.C.Data.Node

CNode Ident # 
Instance details

Defined in Language.C.Data.Ident

Methods

nodeInfo :: Ident -> NodeInfo #

CNode Attr # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: Attr -> NodeInfo #

CNode Enumerator # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode EnumType # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode CompType # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode EnumTypeRef # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode CompTypeRef # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode TypeDefRef # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode TypeDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: TypeDef -> NodeInfo #

CNode MemberDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode ParamDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode FunDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: FunDef -> NodeInfo #

CNode ObjDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: ObjDef -> NodeInfo #

CNode Decl # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: Decl -> NodeInfo #

CNode DeclEvent # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode IdentDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

CNode TagDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

nodeInfo :: TagDef -> NodeInfo #

CNode TagFwdDecl # 
Instance details

Defined in Language.C.Analysis.DefTable

CNode t1 => CNode (CStringLiteral t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CConstant t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CConstant t1 -> NodeInfo #

CNode t1 => CNode (CBuiltinThing t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CExpression t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CExpression t1 -> NodeInfo #

CNode t1 => CNode (CAttribute t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CAttribute t1 -> NodeInfo #

CNode t1 => CNode (CPartDesignator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CInitializer t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CEnumeration t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CStructureUnion t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAlignmentSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CFunctionSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CTypeQualifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CTypeSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CStorageSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CDeclarationSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CCompoundBlockItem t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAssemblyOperand t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAssemblyStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CStatement t1 -> NodeInfo #

CNode t1 => CNode (CDerivedDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CDeclarator t1 -> NodeInfo #

CNode t1 => CNode (CDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CFunctionDef t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CExternalDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CTranslationUnit t1) # 
Instance details

Defined in Language.C.Syntax.AST

(CNode a, CNode b) => CNode (Either a b) # 
Instance details

Defined in Language.C.Data.Node

Methods

nodeInfo :: Either a b -> NodeInfo #

getLastTokenPos :: NodeInfo -> PosLength #

get the position and length of the last token

lengthOfNode :: NodeInfo -> Maybe Int #

get the number of characters an AST node spans

eqByName :: CNode a => a -> a -> Bool #

equality by name