Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rare package/className clash in jnaerator #182

Closed
cjritola opened this issue Sep 16, 2011 · 6 comments
Closed

Rare package/className clash in jnaerator #182

cjritola opened this issue Sep 16, 2011 · 6 comments

Comments

@cjritola
Copy link

JNAerator showstops when it produces a .java file whose class/interface contains an embedded class or interface with the same name as the .java file's package name:

Compiling JNAerated files...
----------
1. ERROR in file:///fuse/FuseLibrary.java (at line 25)
    public static final String JNA_LIBRARY_NAME = LibraryExtractor.getLibraryPath("fuse", true, fuse.FuseLibrary.class);
                                                                                                ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved to a type
----------
2. ERROR in file:///fuse/FuseLibrary.java (at line 26)
    public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(fuse.FuseLibrary.JNA_LIBRARY_NAME, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);
                                                                                 ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved
----------
3. ERROR in file:///fuse/FuseLibrary.java (at line 27)
    public static final FuseLibrary INSTANCE = (FuseLibrary)Native.loadLibrary(fuse.FuseLibrary.JNA_LIBRARY_NAME, fuse.FuseLibrary.class, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);
                                                                               ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved
----------
4. ERROR in file:///fuse/FuseLibrary.java (at line 27)
    public static final FuseLibrary INSTANCE = (FuseLibrary)Native.loadLibrary(fuse.FuseLibrary.JNA_LIBRARY_NAME, fuse.FuseLibrary.class, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);

The cause of this belies in a name clash between the package named 'fuse' and an interface inside the FuseLibrary interface which is also named 'fuse.' Context here:

package fuse;
import com.ochafik.lang.jnaerator.runtime.LibraryExtractor;
////////// S N I P /////////////////////
import java.nio.LongBuffer;
/**
 * JNA Wrapper for library fuse
* This file was autogenerated by JNAerator,
* a tool written by Olivier Chafik that uses a few opensource projects..
* For help, please visit NativeLibs4Java , Rococoa, or JNA. */ public interface FuseLibrary extends Library { public static final String JNA_LIBRARY_NAME = LibraryExtractor.getLibraryPath("fuse", true, fuse.FuseLibrary.class); ///////////// S N I P /////////////// /// Undefined type public static interface fuse { };// uh oh!

....The compiler apparently is not smart enough to realize that although the fuse interface does not contain the desired member, the 'fuse.' prefix may be referring to the package instead. Rather it accepts failure. Removing the 'fuse.' prefix in 'fuse.FuseLibrary.class' makes it happy. A detection and handling of such a situation would be nice, pending it is worth the effort in fixing.

Similar situation involving auto-generated code:
http://stackoverflow.com/questions/654308/java-naming-clash-between-method-variable-and-package-names

@cjritola
Copy link
Author

Related-ish:
#138

@ochafik
Copy link
Member

ochafik commented Sep 16, 2011

Hi cjritola,

Thanks a lot for your report !
I believe this was already fixed in the latest 0.9.9-SNAPSHOT version.
Could you please try and confirm ? Here's the direct link :
http://nativelibs4java.sourceforge.net/maven/com/jnaerator/jnaerator/0.9.9-SNAPSHOT/jnaerator-0.9.9-SNAPSHOT-shaded.jar

Cheers

@cjritola
Copy link
Author

Thanks for the prompt reply!
Persists. ):

Steps:
After downloading and untaring the following:

http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.6/fuse-2.8.6.tar.gz/download

jnaerator is called within

fuse-2.8.6/include/

The config.jnaerator in that directory is:

-library fuse
fuse.h
-I/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include/ 
-jar java-fuse.jar
-D_FILE_OFFSET_BITS=64

ls -l of /usr/bin/jnaerator is:

/usr/bin/jnaerator -> /home/[redacted]/Desktop/jnaerator-0.9.9-SNAPSHOT-shaded.jar

Appended -v flag to config.jnaerator and executed (this is all my buffer could hold):

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 1:2 missing IDENTIFIER at [@2,2:2=']',<60>,1:2]
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
line 0:-1 Failed to match any alternative with token [@-1,0:0='',<-1>,0:-1]
     File: null:0
    Input: 
     Rule: 1656:1: castExpr returns [Expression expr] : ( '(' tr= mutableTypeRef ')' (inner= castExpr | '(' expression ( ',' expression )+ ')' ) | e= unaryExpr );
    Stack: []

Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Now parsing 147 text blocks
Normalizing parsed code...
Writing raw parsed sources to '_jnaerator.rawParsed.cpp'
Writing normalized parsed sources to '_jnaerator.normalizedParsed.cpp'
Generating libraries...
Compiling JNAerated files...
----------
1. ERROR in file:///fuse/FuseLibrary.java (at line 25)
    public static final String JNA_LIBRARY_NAME = LibraryExtractor.getLibraryPath("fuse", true, fuse.FuseLibrary.class);
                                                                                                ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved to a type
----------
2. ERROR in file:///fuse/FuseLibrary.java (at line 26)
    public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(fuse.FuseLibrary.JNA_LIBRARY_NAME, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);
                                                                                 ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved
----------
3. ERROR in file:///fuse/FuseLibrary.java (at line 27)
    public static final FuseLibrary INSTANCE = (FuseLibrary)Native.loadLibrary(fuse.FuseLibrary.JNA_LIBRARY_NAME, fuse.FuseLibrary.class, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);
                                                                               ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved
----------
4. ERROR in file:///fuse/FuseLibrary.java (at line 27)
    public static final FuseLibrary INSTANCE = (FuseLibrary)Native.loadLibrary(fuse.FuseLibrary.JNA_LIBRARY_NAME, fuse.FuseLibrary.class, com.ochafik.lang.jnaerator.runtime.MangledFunctionMapper.DEFAULT_OPTIONS);
                                                                                                                  ^^^^^^^^^^^^^^^^
fuse.FuseLibrary cannot be resolved to a type
----------
4 problems (4 errors)Copying runtime classes...
Generating java-fuse.jar
JNAeration completed !

FuseLibrary.java is in the .jar but it is not compiled to .class.

I was able to tweak it in Eclipse and re-jar it to something which might work. The parameter names and javadoc disappeared so everything is arg0, arg1 and Pointers appear where String would be expected. It's going to be a little rough but still a lot better than hand-coding. (:

JNAerator worked almost flawlessly with JACK, btw.

@ochafik
Copy link
Member

ochafik commented Sep 18, 2011

Hi cjritola,

Thanks a lot for the detailed feedback, I'm now able to reproduce the issue with the latest snapshot :-)
There's something to fix in JNAerator's AST (pretty) Printer class, I'm trying to figure out how to do it...
In the meanwhile, you can try using BridJ instead of JNA (-runtime BridJ), it's more type-safe and should be faster in many cases.

Cheers

ochafik added a commit that referenced this issue Sep 18, 2011
…y class references with the package inside itself (can be confused with inner classes which name are the same as the package, see issue #182).
ochafik added a commit that referenced this issue Sep 19, 2011
@ochafik
Copy link
Member

ochafik commented Sep 19, 2011

Hi cjritola,

I believe this is now fixed in the latest 0.9.9-SNAPSHOT version... could you please try and confirm ?
Thanks,

Cheers

@cjritola
Copy link
Author

Confirmed!

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants