Expression Pattern Language (eXPL)

Download and Install eXPL Package

To get started with eXPL, you will need to download and install a Java package which contains the eXPL compilier, sources and examples. Step by step instructions follow.

Step 1 - Confirm software development readiness

See Java Tools table on right for links to download sites and descriptions, including minimum recommended versions. The Java SDK must also be installed on your PC. The suggested download is Java Platform (SDK) 8. If the Java SDK is already installed, then check it is version either 7 or 8 otherwise there may be compatibility problems.

The project is self-contained so all that is needed to examine and run the examples, post installation, is a text editor and a command console with the Java SDK included in the path. However, if you set up a project in a Java IDE, it makes getting started easier. Candidates include Eclipse, NetBeans, JDeveloper and IntelliJ IDEA.

The installation assumes Maven will run from the command line (eg. the command mvn --version should display information about Maven).

If you choose to go with Eclipse, more information can be found at Maven for Eclipse.

Step 2 - Download project to your PC

Download the eXPL project from the online Git repository, which can be performed from a command console. Go to, or create, a suitable workspace location and run:

git clone https://github.com/cybersearch2/eXPL.git

Upon completion, the project will be found in a newly created "eXPL" sub directory, which is referred to on this site as the eXPL "home location". There are two modules, parser, which is the eXPL parser and query engine and tutorial. which contains the code examples for the eXPL Reference.

Step 3 - Maven Build

To build the project and deploy artifacts to the local repository, go to the eXPL home location and run:

mvn clean install

Upon completion, the message "BUILD SUCCESS" should be displayed. If the build failed, then you will need to scroll back and investigate what error messages appeared during the build.

Running Examples

The eXPL project consists of 2 modules:

  • parser module, which compiles and builds the eXPL runtime library
  • tutorial module, which is divided into chapters containing examples linked to the Reference

Java Tools

ToolDescription
javaJava SDK 8 is the current development platform but SDK 7 is compatible
gitGit is a free and open source distributed version control system.
mavenApache Maven is a software project management and comprehension tool. Recommended version 3.5.0 and above
eclipseSuggested Java integrated development - comes with plugins for Git and Maven. Version: Eclipse Neon.

The parser module creates a parser.jar file which must be in the classpath in order to compile and run the examples. The parser.jar file will be found in the target directory of the parser module following a successful build.

The tutorial module examples source code is contained in sub directory src/main/java. It is a good idea to compile the sources yourself so you are free to experiment. However, you will find that Maven also compiles the sources to target/classes

The examples must be launched from the tutorial directory in order for resource files to be located when they run. Here is an example of a command which runs the first example - all to be typed on the same line and having compiled the source to sub directory bin:

java -cp .:bin:../parser/target/parser.jar au/com/cybersearch2/classy_logic/tutorial1/HighCities
Note that the classpath separators shown here "/" (slash) and ":" (colon) are for Linux, while for Windows, they are "\" (back-slash) and ";" (semi-colon).

An easier approach to running tutorial examples is to import eXPL modules into a Java IDE with Maven plugins. Each example can then be run using "Run as Java application...".