analysis of popular FFI frameworks and their layout descriptions

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Jan 26 09:55:32 UTC 2018


Sorry - the layout of the text below has been lost in translation :-)

Here's a link to a more legible version...

http://cr.openjdk.java.net/~mcimadamore/panama/layout-grammar.txt

Maurizio
>
> |layout = 1*elementType / functionType descriptor = scalarType / 
> arrayType / containerType / functionType functionType = '(' 
> *elementType ['*'] ')' elementType elementType = *separator 
> (scalarType / arrayType / pointerType / containerType) *separator 
> comment = "#" *octet 1*(CR / LF) whitespace = 1*(SP / HTAB / CR / LF) 
> separator = whitespace / comment arrayType = arraySize elementType 
> pointerType = p [':' descriptor ] scalarType = integerType / realType 
> / miscType / bitFields / sizedType integerType = [endianness] 
> (standardSizeType / 'i') realType = [endianness] ('f' / 'd' / 'e') 
> miscType = 'B' / 'V' / 'c' / 'x' sizedType = [endianness] "=" 
> (standardSizeType | number explicitSizeType | vectorType) 
> standardSizeType = 'o' / 's' / 'l' / 'q' explicitSizeType = 'i' / 'f' 
> vectorType = "=" number 'v' bitFields = integerType ':' 1*bitField 
> bitField = [number] 'b' endianness = '>' / '<' / '@' containerType = 
> [endianness] '[' elementType *(elementType / unionMember) ']' 
> unionMember = "|" elementType |
>
> I hope this helps.
>
> [1] - 
> http://hg.openjdk.java.net/panama/dev/file/8499209102d4/src/java.base/share/classes/jdk/internal/nicl/types/DescriptorParser.java
>
> Maurizio
>
>


More information about the panama-dev mailing list