Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Build/Antlr

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 www.antlr.org 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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.