Skip to main content
Jump to: navigation, search


Changing ANTLR Generated code in EclipseLink

EclipseLink uses ANTLR v3 as the backbone of it's JPQL compiler. Information on ANTLR can be found at and you should go there for all non-eclipselink-specific instructions. Here are some additional things you have to know to work with our grammar

  1. We have renamed the antlr runtime to fit in one of our internal packages. In a pre-osgi world, this allows us to avoid worrying about what versions of antlr are used by other applications
  2. Our grammar file can be found in our eclipselink.core project under: org\eclipse\persistence\internal\jpa\parsing\jpql\antlr
  3. To use the grammar file
    1. Run the ANTLR tool against it in the same way as any other ANTLR project
    2. Run the renamer on the result. Rename the package org.antlr.runtime to org.eclipse.persistence.internal.libraries.antlr.runtime
    3. Use the renamed files

Back to the top