Download the PHP package ffi/preprocessor without Composer
On this page you can find all versions of the php package ffi/preprocessor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package preprocessor
Simple C-lang Preprocessor
This implementation of a preprocessor based in part on ISO/IEC 9899:TC2.
Requirements
- PHP >= 7.4
Installation
Library is available as composer repository and can be installed using the following command in a root of your project.
Usage
Directives
Supported Directives
- [x]
#include "file.h"
local-first include - [x]
#include <file.h>
global-first include - [x]
#define name
defining directives- [x]
#define name value
object-like macro - [x]
#define name(arg) value
function-like macro - [x]
#define name(arg) xxx##arg
concatenation - [x]
#define name(arg) #arg
stringizing
- [x]
- [x]
#undef name
removing directives - [x]
#ifdef name
"if directive defined" condition - [x]
#ifndef name
"if directive not defined" condition - [x]
#if EXPRESSION
if condition - [x]
#elif EXPRESSION
else if condition - [x]
#else
else condition - [x]
#endif
completion of a condition - [x]
#error message
error message directive - [x]
#warning message
warning message directive - [ ]
#line 66 "filename"
line and file override - [ ]
#pragma XXX
compiler control- [ ]
#pragma once
- [ ]
- [ ]
#assert XXX
compiler assertion- [ ]
#unassert XXX
compiler assertion
- [ ]
- [ ]
#ident XXX
- [ ]
#sccs XXX
- [ ]
Expression Grammar
Comparison Operators
- [x]
A > B
greater than - [x]
A < B
less than - [x]
A == B
equal - [x]
A != B
not equal - [x]
A >= B
greater than or equal - [x]
A <= B
less than or equal
Logical Operators
- [x]
! A
logical NOT - [x]
A && B
conjunction - [x]
A || B
disjunction - [x]
(...)
grouping
Arithmetic Operators
- [x]
A + B
math addition - [x]
A - B
math subtraction - [x]
A * B
math multiplication - [x]
A / B
math division - [x]
A % B
modulo - [ ]
A++
increment- [x]
++A
prefix form
- [x]
- [ ]
A--
decrement- [x]
--A
prefix form
- [x]
- [x]
+A
unary plus - [x]
-A
unary minus - [ ]
&A
unary addr - [ ]
*A
unary pointer
Bitwise Operators
- [x]
~A
bitwise NOT - [x]
A & B
bitwise AND - [x]
A | B
bitwise OR - [x]
A ^ B
bitwise XOR - [x]
A << B
bitwise left shift - [x]
A >> B
bitwise right shift
Other Operators
- [x]
defined(X)
defined macro - [ ]
A ? B : C
ternary - [ ]
sizeof VALUE
sizeof- [ ]
sizeof(TYPE)
sizeof type
- [ ]
Literals
- [x]
true
,false
boolean - [x]
42
decimal integer literal- [x]
42u
,42U
unsigned int - [x]
42l
,42L
long int - [x]
42ul
,42UL
unsigned long int - [x]
42ll
,42LL
long long int - [x]
42ull
,42ULL
unsigned long long int
- [x]
- [x]
042
octal integer literal - [x]
0x42
hexadecimal integer literal - [x]
0b42
binary integer literal - [x]
"string"
string (char array)- [x]
L"string"
string (wide char array) - [x]
"\•"
escape sequences in strings - [ ]
"\•••"
arbitrary octal value in strings - [ ]
"\X••"
arbitrary hexadecimal value in strings
- [x]
- [ ]
'x'
char literal- [ ]
'\•'
escape sequences - [ ]
'\•••'
arbitrary octal value - [ ]
'\X••'
arbitrary hexadecimal value - [ ]
L'x'
wide character literal
- [ ]
- [ ]
42.0
double- [ ]
42f
,42F
float - [ ]
42l
,42L
long double - [ ]
42E
exponential form - [ ]
0.42e23
exponential form
- [ ]
- [ ]
NULL
null macro
Type Casting
- [x]
(char)42
- [x]
(short)42
- [x]
(int)42
- [x]
(long)42
- [x]
(float)42
- [x]
(double)42
- [x]
(bool)42
(Out of ISO/IEC 9899:TC2 specification) - [x]
(string)42
(Out of ISO/IEC 9899:TC2 specification) - [ ]
(void)42
- [ ]
(long type)42
Casting to a long type (long int
,long double
, etc) - [ ]
(const type)42
Casting to a constant type (const char
, etc) - [ ]
(unsigned type)42
Casting to unsigned type (unsigned int
,unsigned long
, etc) - [ ]
(signed type)42
Casting to signed type (signed int
,signed long
, etc) - [ ] Pointers (
void *
, etc) - [ ] References (
unsigned int
,unsigned long
, etc)
Object Like Directive
Function Like Directive
Include Directories
Message Handling
All versions of preprocessor with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4|^8.0
ffi/preprocessor-contracts Version ^1.0
psr/log Version ^1.0|^2.0|^3.0
phplrt/parser Version ^3.2
phplrt/lexer Version ^3.2
symfony/polyfill-php80 Version ^1.27
symfony/polyfill-ctype Version ^1.27
ffi/preprocessor-contracts Version ^1.0
psr/log Version ^1.0|^2.0|^3.0
phplrt/parser Version ^3.2
phplrt/lexer Version ^3.2
symfony/polyfill-php80 Version ^1.27
symfony/polyfill-ctype Version ^1.27
The package ffi/preprocessor contains the following files
Loading the files please wait ....