Symbolic Representation of C Code

The Wolfram Language's core tree-oriented symbolic structure makes it well suited to working with a hierarchical view of C code as Wolfram Language expressions. This supports the use of the Wolfram Language for the creation, manipulation, and optimization of C code. It is used extensively for the Wolfram Language's code generation tools. In addition, you can use SymbolicC for your own code manipulation purposes.

C Formatting

ToCCodeString convert a symbolic C expression into a string of C code

CComment symbolic representation of a comment

CConstant  ▪  CParentheses

C Expressions

CAssign symbolic representation of a C assignment

COperator symbolic representation of an operator

CStandardMathOperator  ▪  CConditional  ▪  CExpression

C Grouping Constructs

CBlock symbolic representation of a block of statements

CProgram symbolic representation of an entire program

CStatement symbolic representation of a statement

C Programming Constructs

CDo symbolic representation of a do/while statement

CFor symbolic representation of a for loop

CIf  ▪  CSwitch  ▪  CDefault  ▪  CWhile

C Type Constructs

CCast symbolic representation of a cast

CDeclare symbolic representation of a variable declaration

CEnum  ▪  CPointerType  ▪  CStruct  ▪  CUnion  ▪  CTypedef  ▪  CSizeOf

C Function Constructs

CFunction symbolic representation of a function

CCall symbolic representation of a call to a function

CReturn symbolic representation of a return from a function

C Flow Control

CBreak symbolic representation of a break statement

CContinue symbolic representation of a continue statement

CGoto  ▪  CLabel

C Struct Access

CMember symbolic representation of access from a struct

CPointerMember symbolic representation of access from a pointer to a struct

C Address and Dereference

CAddress symbolic representation of the address of an object

CDereference symbolic representation of the dereferencing of a pointer

CArray symbolic representation of an array

C Preprocessor Statements

CInclude symbolic representation of a preprocessor include statement

CDefine symbolic representation of a preprocessor define

CError  ▪  CLine  ▪  CPragma  ▪  CPreprocessorElif  ▪  CPreprocessorElse  ▪  CPreprocessorEndif  ▪  CPreprocessorIf  ▪  CPreprocessorIfdef  ▪  CPreprocessorIfndef  ▪  CUndef