ogma-language-c-1.10.0: Ogma: Runtime Monitor translator: C Language Frontend

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.C.PrintC

Description

Pretty-printer for Language.

Synopsis

- printTree :: Print a => a -> String
- type Doc = [ShowS] -> [ShowS]
- doc :: ShowS -> Doc
- render :: Doc -> String
- parenth :: Doc -> Doc
- concatS :: [ShowS] -> ShowS
- concatD :: [Doc] -> Doc
- replicateS :: Int -> ShowS -> ShowS
- class Print a where
  - prt :: Int -> a -> Doc
- printString :: String -> Doc
- mkEsc :: Char -> Char -> ShowS
- prPrec :: Int -> Int -> Doc -> Doc

# Documentation

printTree :: Print a => a -> String Source #

The top-level printing method.

type Doc = [ShowS] -> [ShowS] Source #

doc :: ShowS -> Doc Source #

render :: Doc -> String Source #

parenth :: Doc -> Doc Source #

concatS :: [ShowS] -> ShowS Source #

concatD :: [Doc] -> Doc Source #

replicateS :: Int -> ShowS -> ShowS Source #

class Print a where Source #

The printer class does the job.

Methods

prt :: Int -> a -> Doc Source #

#### Instances

Instances details

Print AbstractDeclarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> AbstractDeclarator -> Doc Source #
Print AbstractDeclaratorOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> AbstractDeclaratorOpt -> Doc Source #
Print AddOp Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> AddOp -> Doc Source #
Print ArgumentExpressionListOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ArgumentExpressionListOpt -> Doc Source #
Print AssignmentOperator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> AssignmentOperator -> Doc Source #
Print CastExpression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> CastExpression -> Doc Source #
Print CharacterConstant Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> CharacterConstant -> Doc Source #
Print CompoundStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> CompoundStatement -> Doc Source #
Print Constant Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Constant -> Doc Source #
Print ConstantExpression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ConstantExpression -> Doc Source #
Print ConstantExpressionOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ConstantExpressionOpt -> Doc Source #
Print Declaration Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Declaration -> Doc Source #
Print DeclarationSpecifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DeclarationSpecifier -> Doc Source #
Print DeclarationSpecifiers Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DeclarationSpecifiers -> Doc Source #
Print Declarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Declarator -> Doc Source #
Print DeclaratorOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DeclaratorOpt -> Doc Source #
Print DirectAbstractDeclarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DirectAbstractDeclarator -> Doc Source #
Print DirectAbstractDeclaratorOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DirectAbstractDeclaratorOpt -> Doc Source #
Print DirectDeclarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> DirectDeclarator -> Doc Source #
Print EnumSpecifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> EnumSpecifier -> Doc Source #
Print Enumerator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Enumerator -> Doc Source #
Print EnumeratorList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> EnumeratorList -> Doc Source #
Print EqOp Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> EqOp -> Doc Source #
Print Expression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Expression -> Doc Source #
Print ExpressionOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ExpressionOpt -> Doc Source #
Print ExpressionStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ExpressionStatement -> Doc Source #
Print ExternalDeclaration Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ExternalDeclaration -> Doc Source #
Print FloatingConstant Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> FloatingConstant -> Doc Source #
Print FunctionDefinition Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> FunctionDefinition -> Doc Source #
Print Identifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Identifier -> Doc Source #
Print IdentifierList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> IdentifierList -> Doc Source #
Print IdentifierListOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> IdentifierListOpt -> Doc Source #
Print IdentifierOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> IdentifierOpt -> Doc Source #
Print InitDeclarationListOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> InitDeclarationListOpt -> Doc Source #
Print InitDeclarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> InitDeclarator -> Doc Source #
Print Initializer Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Initializer -> Doc Source #
Print InitializerList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> InitializerList -> Doc Source #
Print IntegerConstant Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> IntegerConstant -> Doc Source #
Print IterationStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> IterationStatement -> Doc Source #
Print JumpStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> JumpStatement -> Doc Source #
Print LabeledStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> LabeledStatement -> Doc Source #
Print MultOp Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> MultOp -> Doc Source #
Print ParameterDeclaration Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ParameterDeclaration -> Doc Source #
Print ParameterList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ParameterList -> Doc Source #
Print ParameterTypeList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ParameterTypeList -> Doc Source #
Print Pointer Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Pointer -> Doc Source #
Print PointerOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> PointerOpt -> Doc Source #
Print PostfixExpression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> PostfixExpression -> Doc Source #
Print PrimaryExpression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> PrimaryExpression -> Doc Source #
Print RelOp Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> RelOp -> Doc Source #
Print SelectionStatement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> SelectionStatement -> Doc Source #
Print ShiftOp Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> ShiftOp -> Doc Source #
Print SpecifierQualifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> SpecifierQualifier -> Doc Source #
Print Statement Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Statement -> Doc Source #
Print StorageClassSpecifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> StorageClassSpecifier -> Doc Source #
Print StructDeclaration Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> StructDeclaration -> Doc Source #
Print StructDeclarator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> StructDeclarator -> Doc Source #
Print StructOrUnion Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> StructOrUnion -> Doc Source #
Print StructOrUnionSpecifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> StructOrUnionSpecifier -> Doc Source #
Print TranslationUnit Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TranslationUnit -> Doc Source #
Print TypeName Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TypeName -> Doc Source #
Print TypeQualifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TypeQualifier -> Doc Source #
Print TypeQualifierList Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TypeQualifierList -> Doc Source #
Print TypeQualifierListOpt Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TypeQualifierListOpt -> Doc Source #
Print TypeSpecifier Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> TypeSpecifier -> Doc Source #
Print UnaryExpression Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> UnaryExpression -> Doc Source #
Print UnaryOperator Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> UnaryOperator -> Doc Source #
Print String Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> String -> Doc Source #
Print Integer Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Integer -> Doc Source #
Print Char Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Char -> Doc Source #
Print Double Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> Double -> Doc Source #
Print [Declaration] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [Declaration] -> Doc Source #
Print [DeclarationSpecifier] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [DeclarationSpecifier] -> Doc Source #
Print [Expression] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [Expression] -> Doc Source #
Print [ExternalDeclaration] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [ExternalDeclaration] -> Doc Source #
Print [InitDeclarator] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [InitDeclarator] -> Doc Source #
Print [SpecifierQualifier] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [SpecifierQualifier] -> Doc Source #
Print [Statement] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [Statement] -> Doc Source #
Print [StructDeclaration] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [StructDeclaration] -> Doc Source #
Print [StructDeclarator] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [StructDeclarator] -> Doc Source #
Print a => Print [a] Source # |
Instance details Defined in Language.C.PrintC Methods prt :: Int -> [a] -> Doc Source #

printString :: String -> Doc Source #

mkEsc :: Char -> Char -> ShowS Source #

prPrec :: Int -> Int -> Doc -> Doc Source #