language-c-quote-0.8.0: C/CUDA/OpenCL/Objective-C quasiquoting library.

Copyright(c) Harvard University 2006-2011 (c) Geoffrey Mainland 2011-2013 (c) Manuel M T Chakravarty 2013 : (c) Drexel University 2013
LicenseBSD-style
Maintainermainland@cs.drexel.edu
Safe HaskellNone
LanguageHaskell98

Language.C.Syntax

Description

 

Synopsis

Documentation

data Id

Constructors

Id String !SrcLoc 
AntiId String !SrcLoc 

Instances

data Sign

Constructors

Tsigned !SrcLoc 
Tunsigned !SrcLoc 

data ArraySize

There are two types of declarators in C, regular declarators and abstract declarators. The former is for declaring variables, function parameters, typedefs, etc. and the latter for abstract types---typedef int ({*}foo)(void) vs. tt int ({*})(void). The difference between the two is just whether or not an identifier is attached to the declarator. We therefore only define one Decl type and use it for both cases.

data Field

Constructors

Field (Maybe Id) (Maybe Decl) (Maybe Exp) !SrcLoc 

data Attr

Constructors

Attr Id [Exp] !SrcLoc 

data ObjCMethodProto

Constructors

ObjCMethodProto Bool (Maybe Type) [Attr] [ObjCParam] Bool [Attr] !SrcLoc

Invariant: First parameter must at least either have a selector or an identifier; all other parameters must have an identifier.

data Signed

Constructors

Signed 
Unsigned 

data BinOp

Constructors

Add 
Sub 
Mul 
Div 
Mod 
Eq 
Ne 
Lt 
Gt 
Le 
Ge 
Land 
Lor 
And 
Or 
Xor 
Lsh 
Rsh 

data UnOp

Constructors

AddrOf 
Deref 
Positive 
Negate 
Not 
Lnot 

ctypedef :: Id -> Decl -> [Attr] -> Typedef