Skip to content

An extension to JTcl that implements all the functionality F5 added to the Tcl language

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
license.terms
Notifications You must be signed in to change notification settings

landro/jtcl-irule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is an extension to JTcl that implements all the functionality F5 added to the Tcl language.

Download binary

Instead of building this project yourself, you can download the binary from Release v 0.9

Building

Fetch the source of JTcl using mercurial and replace the maven-jar-plugin config with the following in order to generate the test jar

 <plugin>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.2</version>
    <executions>
      <execution>
        <id>default-jar</id>
        <phase>package</phase>
        <goals>
          <goal>jar</goal>
        </goals>
        <configuration>
          <archive>
            <manifest>
              <mainClass>tcl.lang.Shell</mainClass>
            </manifest>
            <manifestEntries />
          </archive>
        </configuration>
      </execution>
      <execution>
        <goals>
          <goal>test-jar</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

If you're using Mac Os X and don't have mercurial installed, I recommend using the Source Tree app from the app store. It has excellent support for both git and mercurial. The next step, is to build and install the artifacts into your local maven repository using

mvn clean install -DskipTests

WARNING! you have to use JDK version 1.6. You can achieve this by setting JAVA_HOME appropriately.

Next, fetch the source code of this project, and align the jtcl.version property in _pom.xml_in with the JTcl version. Then, build the project using:

mvn clean package

This will generate a jar file named jtcl-irule.jar in the target directory. This jar file has to be added to the classpath of the JTcl shell script in order to override som of the functionality found in JTcl. Place it in front of the other jar file - it will take precedence. See TesTcl installation instructions for details.

What has been implemented so far

All the special iRule operators have now been implemented!

Original JTcl source code was modified in order to support the following iRule operators:

iRule only operators

  • starts_with Tests if one string starts with another string
  • ends_with Tests if one string ends with another string
  • contains Tests if one string contains another string
  • matches_glob Implement glob style matching within a comparison
  • matches_regex Tests if one string matches a regular expression

iRule aliases to standard Tcl operators

  • equals Tests if one string equals another string (eq operator)
  • and Performs a logical "and" comparison between two values (&& operator)
  • or Performs a logical "or" comparison between two values (|| operator)
  • not Performs a logical "not" on a value (! operator)

The only files that have been modified are:

  • Expr.java
  • expr.test

License

Both jtcl-irule and JTcl are released under a BSD-style license.

About

An extension to JTcl that implements all the functionality F5 added to the Tcl language

Resources

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
license.terms

Stars

Watchers

Forks

Packages

No packages published

Languages