Problem with Language API JFlex adapter
I'm trying to create language based on JFlex parser using IDEA skeleton,
and using Javascript Flex file as reference. However, the generated
file has 2 errors, both dealing with trying to call zzBufferL[..], when
zzBufferL is a CharSequence.
What's wrong? I changed it to zzBufferL.charAt() for now, but why did
this happen? Did I do something wrong?
Thanks,
-Keith
Please sign in to leave a comment.
Keith Lea wrote:
There's nothing wrong, it's just that the type of zzBufferL cannot be changed by the
skeleton file. The IDEA skeleton wants to use a CharSequence instead of a char[] for
lexing, so this has either to be manually fixed like you did, or you can use the JFlex
that comes with the idea-dev package: It has a command line option "-charat" that uses
zzBufferL.charAt() automatically.
Sascha
Are you sure that this issue don't fixed in IDEA development package shipped JFlex tool version?
I feel sure because I used that to generate the problematic lexer class.
Dmitry Kashin wrote:
As I said, it is fixed by a newly introduced command line option. JFlex' default behavior
is unchanged.
Sascha