| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
java space, incl. [native] numbers
Rewrite ConstantDefinition:
Add sub-class CNumber:
- containing integer/float values and their original qualifiers
[long, double, unsigned]
- conversion to java number
ConstantDefinition:
- holds native expression
- optionally holds CNumber representing native expression,
if [only] a number
- can compute equivalent java expression
with result type (JavaExpr)
Add static native number reg-expression
for number detection and parsing.
Add static native number to CNumber conversion methods.
+++
Retrieve full LISP tree and convert to serialized expression
to be utilized for expressions used in enumerates.
Parse enumerates, allowing const native expressions:
- Utilize ConstantDefinition
either for definite CNumber or expression
- Simply add "+1" for new default values,
if previous is an expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regexp-constant and java-parser. (Due to PCPP -> JCPP)
Lack of parsing binary exponent floats is exposed due to using JCPP
and correct constant-definitions.
- JavaParser.g:
- Add support for hexadecimal w/ binary exponent floats
- TAB -> 4 spaces
- ConstantDefinition.java:
- Add RegExp 'fpRegexp', patternDecimalNumber:
decimal number w/ support for hexadecimal w/ binary exponent floats.
- isDecimalNumber(..): Use patternDecimalNumber
instead of try-and-error (NumberFormatException)
- patternCPPOperand: exclude patternDecimalNumber!
- JavaEmitter.java:
- Respect explicit suffix [dD] for double type.
- Drop floating point suffixes [fF]
- Test: Added tests for hexadecimal w/ binary exponent floats
|
|
|
|
| |
Cleanup / Preparation)
|
| |
|
|
|
|
| |
(Expose source location for log/error messages)
|
|
|
|
| |
instead of an NPE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Code regarding 'aliased typedef struct' is tagged in JavaEmitter and HeaderParser:
'NOTE: Struct Name Resolution (JavaEmitter, HeaderParser)'
Prefers containing cstruct typedef pointer
if available _and_ if cstruct is _not_ a typedef!
- Removed: 'HeaderParser.resolveAnonCompound(..)' no more required,
since CompoundType always sets its name!
Commit cf9f28cf249393f42d7d2835775521dfadee6b92
- JavaEmitter.emitStruct:
- Regard above 'aliased typedef struct' NOTE
- JavaEmitter.typeToJavaType:
- Regard above 'aliased typedef struct' NOTE
- ReferencedStructs
- Drop duplicate CompoundType instances of same name.
This can happen due to const/volatile and ASTLocusTag variants.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix IntType 'unsigned'
- Need to handle 'unsigned' for typedef and !typedef,
when exposing 'unsigned' for code emission.
- Consider IntType.typedefUnsigned in hash/equals
- Type: Use copy-ctor instead of Clonable enhancing strong typing.
- add 'Type clone(final ASTLocusTag newLoc)'
- Consider Type.typedefCVAttributes in hash/equals
|
|
|
|
|
| |
Enhances semantic exception in code generation
by adding the AST location of the type or function declaration.
|
|
|
|
|
|
|
| |
parsing / analyzing
New GlueGenException supports ASTLocationTag,
which will be throws in case of semantic and/or parsing errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We shall be able to import 'most' vanilla GL header,
i.e. only change the typedef part using our GlueGen types
- Type Safety:
- GlueGen now detects '#define' and 'enum' redefines
and throw an exception in this case.
This helps detecting wrongly renamed GL extensions into core!
- GlueGen now detects function redefines (overloading)
and throw an exception in this case.
Hence the semantics of duplicate functions has to be equal!
This helps detecting wrongly renamed GL extensions into core!
- Semantic equality for all types is provided
via interface TypeComparator.SemanticEqualityOp, i.e. 'boolean equalSemantics(..)'
implemented by com.jogamp.gluegen.cgram.types.Type.
Semantic equality can be relaxed via config "RelaxedEqualSemanticsTest true",
i.e. ignoring integer size, and const / volatile qualifiers.
- All equality/hash methods of 'com.jogamp.gluegen.cgram.types.*'
are restructured.
- Track and simplify renamed 'symbol', i.e. use a common
sub-interface for all renamed symbols (ConstantDefinition, FunctionSymbol, ..)
- This is provided in a unified manner
via interface com.jogamp.gluegen.cgram.types.AliasedSymbol
and its common implementation AliasedSymbolImpl
- All JavaConfiguration.shouldIgnore* methods operate w/
'AliasedSymbol' trying to match all aliases.
- Support 'struct NAME [ { ... } ]' w/o typedef's
- New GL / CL headers do not use typedef's for anonymous opaque types
- Opaque Type handling
- JavaConfiguration.typeInfo(..), identifying opaque types,
no more back references from target-type -> typedef.
Hence the following is possible now:
typedef void * Opaque01; // Opaque
typedef void * APointerBuffer; // A Buffer
- All Logger instances are no more static
and derive their warning level from the package's root Logger
via Logging.getLogger(..).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C-Enum values for array length
- Parser (HeaderParser.g): Support using C-Enum values for array length specification
- Will throw an exception if enum identifier is unknown or exceeds int-size
- Add StructEmitter supports for compound-arrays
- Add Debug stderr verbose info:
- Struct Emitter prefix 'SE.' - to analyze emitting struct fields (offset+size and accessors)
- Struct Layout prefix 'SL.' - to analyze memory layout (based on MachineDescription.StaticConfig.X86_64_UNIX)
Tested via test1.[ch] BaseClass ..
|
|
e8bc9edd3c39170af038ab23b8cdca9ffd6f2d56): src/antlr (IMHO no need for 'main')
/src/main/antlr/ -> /src/antlr/
|