Index: applications/editors/josm/plugins/OpeningHoursEditor/build.xml
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 30111)
+++ applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 30112)
@@ -5,220 +5,46 @@
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="6162"/>
-    <!--
-      ************************************************
-      ** should not be necessary to change the following properties
-     -->
-    <property name="josm" location="../../core/dist/josm-custom.jar"/>
-    <property name="plugin.build.dir" value="build"/>
-    <property name="plugin.src.dir" value="src"/>
-    <!-- this is the directory where the plugin jar is copied to -->
-    <property name="plugin.dist.dir" value="../../dist"/>
-    <property name="ant.build.javac.target" value="1.6"/>
-    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
-    <!--
+	
+    <property name="plugin.author" value="Falko Thomale"/>
+    <property name="plugin.class" value="org.openstreetmap.josm.plugins.ohe.OhePlugin"/>
+    <property name="plugin.description" value="extended options for editing opening_hours"/>
+    <property name="plugin.icon" value="images/opening_hours.png"/>
+    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpeningHoursEditor"/>
+
+    <!-- ** include targets that all plugins have in common ** -->
+    <import file="../build-common.xml"/>
+	
+    <property name="javacc.home" location="../../core/tools"/>
+	<property name="parser.dir" location="${plugin.src.dir}/org/openstreetmap/josm/plugins/ohe/parser"/>
+	
+    <target name="javacc" depends="init" unless="javacc.notRequired">
+        <exec append="false" executable="java" failifexecutionfails="true">
+            <arg value="-cp"/>
+            <arg value="${javacc.home}/javacc.jar"/>
+            <arg value="javacc"/>
+            <arg value="-JDK_VERSION=1.6"/>
+            <arg value="-GRAMMAR_ENCODING=UTF-8"/>
+            <arg value="-UNICODE_INPUT"/>
+            <arg value="-OUTPUT_DIRECTORY=${parser.dir}"/>
+            <arg value="${parser.dir}/OpeningTimeCompiler.jj"/>
+        </exec>
+    </target>
+
+	<!--
     **********************************************************
-    ** javacc-otc - compiles OpeningTimeCompiler
-    **
-    ** can be changed see http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-moz.htm#tth_sEc2.5
+    ** compile - compiles the source tree
     **********************************************************
     -->
-    <target name="javacc-otc">
-        <echo message="compiling OpeningTimeCompiler with javacc ... "/>
-        <exec executable="javacc" dir="src/org/openstreetmap/josm/plugins/ohe/parser/">
-            <arg value="OpeningTimeCompiler.jj"/>
-        </exec>
-    </target>
-    <!--
-    **********************************************************
-    ** init - initializes the build
-    **********************************************************
-    -->
-    <target name="init">
-        <mkdir dir="${plugin.build.dir}"/>
-    </target>
-    <!--
-    **********************************************************
-    ** compile - complies the source tree
-    **********************************************************
-    -->
-    <target name="compile" depends="init">
-        <echo message="compiling sources for  ${plugin.jar} ... "/>
-        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
+    <target name="compile" depends="init, javacc">
+        <echo message="compiling sources for ${plugin.jar} ... "/>
+        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8">
+            <classpath>
+                <pathelement path="${plugin.build.dir}"/>
+                <pathelement location="${josm}"/>
+            </classpath>
             <compilerarg value="-Xlint:deprecation"/>
             <compilerarg value="-Xlint:unchecked"/>
         </javac>
     </target>
-    <!--
-    **********************************************************
-    ** dist - creates the plugin jar
-    **********************************************************
-    -->
-    <target name="dist" depends="compile,revision">
-        <echo message="creating ${ant.project.name}.jar ... "/>
-        <copy todir="${plugin.build.dir}/images">
-            <fileset dir="images"/>
-        </copy>
-        <copy todir="${plugin.build.dir}/data">
-            <fileset dir="data"/>
-        </copy>
-        <copy todir="${plugin.build.dir}">
-            <fileset dir=".">
-                <include name="README"/>
-                <include name="LICENSE"/>
-            </fileset>
-        </copy>
-        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
-            <!--
-        ************************************************
-        ** configure these properties. Most of them will be copied to the plugins
-        ** manifest file. Property values will also show up in the list available
-        ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
-        **
-        ************************************************
-    -->
-            <manifest>
-                <attribute name="Author" value="Falko Thomale"/>
-                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.ohe.OhePlugin"/>
-                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
-                <attribute name="Plugin-Description" value="extended options for editing opening_hours"/>
-                <attribute name="Plugin-Icon" value="images/opening_hours.png"/>
-                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpeningHoursEditor"/>
-                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
-                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
-            </manifest>
-        </jar>
-    </target>
-    <!--
-    **********************************************************
-    ** revision - extracts the current revision number for the
-    **    file build.number and stores it in the XML property
-    **    version.*
-    **********************************************************
-    -->
-    <target name="revision">
-        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="info"/>
-            <arg value="--xml"/>
-            <arg value="."/>
-        </exec>
-        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
-        <delete file="REVISION"/>
-    </target>
-    <!--
-    **********************************************************
-    ** clean - clean up the build environment
-    **********************************************************
-    -->
-    <target name="clean">
-        <delete dir="${plugin.build.dir}"/>
-        <delete file="${plugin.jar}"/>
-    </target>
-    <!--
-    **********************************************************
-    ** install - install the plugin in your local JOSM installation
-    **********************************************************
-    -->
-    <target name="install" depends="dist">
-        <property environment="env"/>
-        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
-            <and>
-                <os family="windows"/>
-            </and>
-        </condition>
-        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
-    </target>
-    <!--
-    ************************** Publishing the plugin *********************************** 
-    -->
-    <!--
-        ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
-        ** property ${coreversion.info.entry.revision}
-        **
-        -->
-    <target name="core-info">
-        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="info"/>
-            <arg value="--xml"/>
-            <arg value="../../core"/>
-        </exec>
-        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
-        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
-        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
-        <delete file="core.info.xml"/>
-    </target>
-    <!--
-        ** commits the source tree for this plugin
-        -->
-    <target name="commit-current">
-        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="commit"/>
-            <arg value="-m '${commit.message}'"/>
-            <arg value="."/>
-        </exec>
-    </target>
-    <!--
-        ** updates (svn up) the source tree for this plugin
-        -->
-    <target name="update-current">
-        <echo>Updating plugin source ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="up"/>
-            <arg value="."/>
-        </exec>
-        <echo>Updating ${plugin.jar} ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="up"/>
-            <arg value="../dist/${plugin.jar}"/>
-        </exec>
-    </target>
-    <!--
-        ** commits the plugin.jar 
-        -->
-    <target name="commit-dist">
-        <echo>
-    ***** Properties of published ${plugin.jar} *****
-    Commit message    : '${commit.message}'                    
-    Plugin-Mainversion: ${plugin.main.version}
-    JOSM build version: ${coreversion.info.entry.revision}
-    Plugin-Version    : ${version.entry.commit.revision}
-    ***** / Properties of published ${plugin.jar} *****                    
-                        
-    Now commiting ${plugin.jar} ...
-    </echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="-m '${commit.message}'"/>
-            <arg value="commit"/>
-            <arg value="${plugin.jar}"/>
-        </exec>
-    </target>
-    <!-- ** make sure svn is present as a command line tool ** -->
-    <target name="ensure-svn-present">
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
-            <env key="LANG" value="C"/>
-            <arg value="--version"/>
-        </exec>
-        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
-            <!-- return code not set at all? Most likely svn isn't installed -->
-            <condition>
-                <not>
-                    <isset property="svn.exit.code"/>
-                </not>
-            </condition>
-        </fail>
-        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
-            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
-            <condition>
-                <isfailure code="${svn.exit.code}"/>
-            </condition>
-        </fail>
-    </target>
-    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
-    </target>
+
 </project>
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.java	(revision 30111)
+++ 	(revision )
@@ -1,435 +1,0 @@
-/* Generated By:JavaCC: Do not edit this line. OpeningTimeCompiler.java */
-package org.openstreetmap.josm.plugins.ohe.parser;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Vector;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DaySpan;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DaytimeSpan;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DateTime;
-
-public class OpeningTimeCompiler implements OpeningTimeCompilerConstants {
-  public static final String[] WEEKDAYS = new String[] {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"};
-
-  public OpeningTimeCompiler(String time)
-  {
-    this(new ByteArrayInputStream(time.getBytes()), null);
-  }
-
-// returns a list of times
-  final public ArrayList<DateTime> startCompile() throws ParseException, ParseException, SyntaxException {
-  Vector<Token> usedTokens = new Vector<Token>();
-  ArrayList<DateTime> time = new ArrayList<DateTime>();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DIGIT:
-    case WEEKDAY:
-    case OFF:
-      time = timespanlist(usedTokens);
-      break;
-    case 5:
-      jj_consume_token(5);
-      break;
-    default:
-      jj_la1[0] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    jj_consume_token(0);
-    if (time.size() == 0) {
-                ArrayList<DaySpan> daySpans = new ArrayList<DaySpan>();
-        daySpans.add(new DaySpan(0,6));
-                ArrayList<DaytimeSpan> timeSpans = new ArrayList<DaytimeSpan>();
-        timeSpans.add(new DaytimeSpan(0, 24 * 60));
-        time.add(new DateTime(daySpans, timeSpans));
-        }
-
-    {if (true) return time;}
-    throw new Error("Missing return statement in function");
-  }
-
-//
-  final public ArrayList<DateTime> timespanlist(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  ArrayList<DateTime> list = new ArrayList<DateTime>();
-  DateTime first = null;
-  ArrayList<DateTime> second = null;
-    first = timespan(usedTokens);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 6:
-      jj_consume_token(6);
-      second = timespanlist(usedTokens);
-      break;
-    default:
-      jj_la1[1] = jj_gen;
-      ;
-    }
-    list.add(first);
-    if(second != null)
-        list.addAll(second);
-    {if (true) return list;}
-    throw new Error("Missing return statement in function");
-  }
-
-//
-  final public DateTime timespan(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  ArrayList<DaySpan> dayspanlist = new ArrayList<DaySpan>();
-  dayspanlist.add(new DaySpan(0, 6)); // if no days are given the timespan is applied to day 0-6
-  ArrayList<DaytimeSpan> daytimespanlist = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case WEEKDAY:
-      dayspanlist = dayspanlist(usedTokens);
-      jj_consume_token(7);
-      break;
-    default:
-      jj_la1[2] = jj_gen;
-      ;
-    }
-    daytimespanlist = daytimespanlist(usedTokens);
-    {if (true) return new DateTime(dayspanlist, daytimespanlist);}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns a list of daytimes as ArrayList<int[2]>
-  final public ArrayList<DaytimeSpan> daytimespanlist(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  ArrayList<DaytimeSpan> list = new ArrayList<DaytimeSpan>();
-  DaytimeSpan first;
-  ArrayList<DaytimeSpan> second = new ArrayList<DaytimeSpan>();
-    first = daytimespan(usedTokens);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 8:
-      jj_consume_token(8);
-      second = daytimespanlist(usedTokens);
-      break;
-    default:
-      jj_la1[3] = jj_gen;
-      ;
-    }
-    list.add(first);
-    if(second != null)
-        list.addAll(second);
-    {if (true) return list;}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns the minutes from 00:00 of a daytimespan as integer[2]
-// int[0] == int[1] means it is just one daytime
-// int[0] == int[1] == -1 means off
-//           int[1] == 24*60+1 means openend
-  final public DaytimeSpan daytimespan(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  int start, end =-1;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case OFF:
-      start = off(usedTokens);
-      break;
-    case DIGIT:
-      start = daytime(usedTokens);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case PLUS:
-        end = openend(usedTokens);
-        break;
-      default:
-        jj_la1[5] = jj_gen;
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 9:
-          jj_consume_token(9);
-          end = daytime(usedTokens);
-          break;
-        default:
-          jj_la1[4] = jj_gen;
-          ;
-        }
-      }
-      break;
-    default:
-      jj_la1[6] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    if (end < 0)
-        end = start;
-    else if(end < start)
-        {if (true) throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);}
-
-    {if (true) return new DaytimeSpan(start, end);}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns the minutes from 00:00 as integer
-  final public int daytime(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  Token th0, th1, tm0, tm1;
-    th1 = jj_consume_token(DIGIT);
-    th0 = jj_consume_token(DIGIT);
-    jj_consume_token(10);
-    tm1 = jj_consume_token(DIGIT);
-    tm0 = jj_consume_token(DIGIT);
-    usedTokens.add(th1);
-    usedTokens.add(th0);
-    usedTokens.add(tm1);
-    usedTokens.add(tm0);
-    int hour = Integer.parseInt(th1.image) * 10 + Integer.parseInt(th0.image);
-    int minute = Integer.parseInt(tm1.image) * 10 + Integer.parseInt(tm0.image);
-
-    if (hour > 24)
-        {if (true) throw new SyntaxException(null, th1.beginColumn - 1, th0.endColumn + 1);}
-    if (minute >= 60 || (hour == 24 && minute != 0))
-        {if (true) throw new SyntaxException(null, tm1.beginColumn - 1, tm0.endColumn + 1);}
-
-    {if (true) return hour * 60 + minute;}
-    throw new Error("Missing return statement in function");
-  }
-
-//
-  final public int openend(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  Token plus;
-    plus = jj_consume_token(PLUS);
-    usedTokens.add(plus);
-    {if (true) return 24 * 60 + 1;}
-    throw new Error("Missing return statement in function");
-  }
-
-//
-  final public int off(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  Token off;
-    off = jj_consume_token(OFF);
-    usedTokens.add(off);
-    {if (true) return -1;}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns a list of days as ArrayList<int[2]>
-  final public ArrayList<DaySpan> dayspanlist(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  ArrayList<DaySpan> list = new ArrayList<DaySpan>();
-  DaySpan first;
-  ArrayList<DaySpan> second = null;
-    first = dayspan(usedTokens);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 8:
-      jj_consume_token(8);
-      second = dayspanlist(usedTokens);
-      break;
-    default:
-      jj_la1[7] = jj_gen;
-      ;
-    }
-    if (second == null) {
-      //second dayspanlist is empty, only the first is returned
-      list.add(first);
-    } else {
-      if (first.endDay + 1 == second.get(0).startDay) {
-        //the second dayspanlist and the first are coherent, both are joined and returned
-        list.addAll(second);
-        list.set(0, new DaySpan(first.startDay, second.get(0).endDay));
-      } else {
-        //the first and the second dayspans are not coherent, both are added to the returnStatement
-        list.add(first);
-        list.addAll(second);
-      }
-    }
-    {if (true) return list;}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns the span of two days as int[2]
-// int[0] == int[1] means it is just one day
-  final public DaySpan dayspan(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  int start, end = -1;
-    start = day(usedTokens);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 9:
-      jj_consume_token(9);
-      end = day(usedTokens);
-      break;
-    default:
-      jj_la1[8] = jj_gen;
-      ;
-    }
-    if(end < 0)
-        end = start;
-    else if(end < start)
-        {if (true) throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);}
-
-    {if (true) return new DaySpan(start, end);}
-    throw new Error("Missing return statement in function");
-  }
-
-// returns the weekday as integer
-  final public int day(Vector<Token> usedTokens) throws ParseException, ParseException, SyntaxException {
-  Token t;
-    t = jj_consume_token(WEEKDAY);
-    usedTokens.add(t);
-    for (int i = 0; i < WEEKDAYS.length; ++i)
-      if (WEEKDAYS[i].equals(t.image))
-        {if (true) return i;}
-
-    {if (true) throw new SyntaxException(null, t.beginColumn - 1, t.endColumn + 1);}
-    throw new Error("Missing return statement in function");
-  }
-
-  /** Generated Token Manager. */
-  public OpeningTimeCompilerTokenManager token_source;
-  SimpleCharStream jj_input_stream;
-  /** Current token. */
-  public Token token;
-  /** Next token. */
-  public Token jj_nt;
-  private int jj_ntk;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[9];
-  static private int[] jj_la1_0;
-  static {
-      jj_la1_init_0();
-   }
-   private static void jj_la1_init_0() {
-      jj_la1_0 = new int[] {0x36,0x40,0x4,0x100,0x200,0x8,0x12,0x100,0x200,};
-   }
-
-  /** Constructor with InputStream. */
-  public OpeningTimeCompiler(java.io.InputStream stream) {
-     this(stream, null);
-  }
-  /** Constructor with InputStream and supplied encoding */
-  public OpeningTimeCompiler(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source = new OpeningTimeCompilerTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  /** Reinitialise. */
-  public void ReInit(java.io.InputStream stream) {
-     ReInit(stream, null);
-  }
-  /** Reinitialise. */
-  public void ReInit(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  /** Constructor. */
-  public OpeningTimeCompiler(java.io.Reader stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new OpeningTimeCompilerTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  /** Reinitialise. */
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  /** Constructor with generated Token Manager. */
-  public OpeningTimeCompiler(OpeningTimeCompilerTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  /** Reinitialise. */
-  public void ReInit(OpeningTimeCompilerTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
-  }
-
-  private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-
-/** Get the next Token. */
-  final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-/** Get the specific Token. */
-  final public Token getToken(int index) {
-    Token t = token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
-  }
-
-  private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
-  }
-
-  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-
-  /** Generate ParseException. */
-  public ParseException generateParseException() {
-    jj_expentries.clear();
-    boolean[] la1tokens = new boolean[11];
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 9; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 11; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.add(jj_expentry);
-      }
-    }
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.get(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  /** Enable tracing. */
-  final public void enable_tracing() {
-  }
-
-  /** Disable tracing. */
-  final public void disable_tracing() {
-  }
-
-}
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.jj
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.jj	(revision 30111)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.jj	(revision 30112)
@@ -9,12 +9,12 @@
 timespan ::= [ dayspanlist " " ] daytimespanlist
 
-daytimespanlist ::=	daytimespan [ "," daytimespanlist ]
+daytimespanlist ::= daytimespan [ "," daytimespanlist ]
 daytimespan ::= off | ( daytime ( openend |  [ "-" daytime ]) )
-daytime ::=	(DIGIT DIGIT ":" DIGIT DIGIT )
+daytime ::= (DIGIT DIGIT ":" DIGIT DIGIT )
 openend ::= PLUS
 off ::= OFF
 
-dayspanlist ::=	dayspan [ "," dayspanlist ]
-dayspan ::=	WEEKDAY [ "-" WEEKDAY ]
+dayspanlist ::= dayspan [ "," dayspanlist ]
+dayspan ::= WEEKDAY [ "-" WEEKDAY ]
 */
 
@@ -77,11 +77,11 @@
   {
     if (time.size() == 0) {
-  		ArrayList<DaySpan> daySpans = new ArrayList<DaySpan>();
-    	daySpans.add(new DaySpan(0,6));
-  		ArrayList<DaytimeSpan> timeSpans = new ArrayList<DaytimeSpan>();
-    	timeSpans.add(new DaytimeSpan(0, 24 * 60));
-    	time.add(new DateTime(daySpans, timeSpans));
-	}
-    	
+          ArrayList<DaySpan> daySpans = new ArrayList<DaySpan>();
+        daySpans.add(new DaySpan(0,6));
+          ArrayList<DaytimeSpan> timeSpans = new ArrayList<DaytimeSpan>();
+        timeSpans.add(new DaytimeSpan(0, 24 * 60));
+        time.add(new DateTime(daySpans, timeSpans));
+    }
+        
     return time;
   }
@@ -99,5 +99,5 @@
     list.add(first);
     if(second != null)
-    	list.addAll(second);
+        list.addAll(second);
     return list;
   }
@@ -128,5 +128,5 @@
     list.add(first);
     if(second != null)
-    	list.addAll(second);
+        list.addAll(second);
     return list;
   }
@@ -144,7 +144,7 @@
   {
     if (end < 0)
-    	end = start;
+        end = start;
     else if(end < start)
-    	throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);
+        throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);
     
     return new DaytimeSpan(start, end);
@@ -167,7 +167,7 @@
 
     if (hour > 24)
-    	throw new SyntaxException(null, th1.beginColumn - 1, th0.endColumn + 1);
+        throw new SyntaxException(null, th1.beginColumn - 1, th0.endColumn + 1);
     if (minute >= 60 || (hour == 24 && minute != 0))
-    	throw new SyntaxException(null, tm1.beginColumn - 1, tm0.endColumn + 1);
+        throw new SyntaxException(null, tm1.beginColumn - 1, tm0.endColumn + 1);
 
     return hour * 60 + minute;
@@ -235,7 +235,7 @@
   {
     if(end < 0)
-    	end = start;
+        end = start;
     else if(end < start)
-    	throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);
+        throw new SyntaxException(null, usedTokens.lastElement().beginColumn - 1, usedTokens.lastElement().endColumn + 1);
     
     return new DaySpan(start, end);
@@ -253,6 +253,6 @@
     for (int i = 0; i < WEEKDAYS.length; ++i)
       if (WEEKDAYS[i].equals(t.image))
-    	return i;
-    	
+        return i;
+        
     throw new SyntaxException(null, t.beginColumn - 1, t.endColumn + 1);
   }
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompilerConstants.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompilerConstants.java	(revision 30111)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/* Generated By:JavaCC: Do not edit this line. OpeningTimeCompilerConstants.java */
-package org.openstreetmap.josm.plugins.ohe.parser;
-
-
-/**
- * Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
- */
-public interface OpeningTimeCompilerConstants {
-
-  /** End of File. */
-  int EOF = 0;
-  /** RegularExpression Id. */
-  int DIGIT = 1;
-  /** RegularExpression Id. */
-  int WEEKDAY = 2;
-  /** RegularExpression Id. */
-  int PLUS = 3;
-  /** RegularExpression Id. */
-  int OFF = 4;
-
-  /** Lexical state. */
-  int DEFAULT = 0;
-
-  /** Literal token values. */
-  String[] tokenImage = {
-    "<EOF>",
-    "<DIGIT>",
-    "<WEEKDAY>",
-    "\"+\"",
-    "\"off\"",
-    "\"24/7\"",
-    "\"; \"",
-    "\" \"",
-    "\",\"",
-    "\"-\"",
-    "\":\"",
-  };
-
-}
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompilerTokenManager.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompilerTokenManager.java	(revision 30111)
+++ 	(revision )
@@ -1,436 +1,0 @@
-/* Generated By:JavaCC: Do not edit this line. OpeningTimeCompilerTokenManager.java */
-package org.openstreetmap.josm.plugins.ohe.parser;
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Vector;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DaySpan;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DaytimeSpan;
-import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils.DateTime;
-
-/** Token Manager. */
-public class OpeningTimeCompilerTokenManager implements OpeningTimeCompilerConstants
-{
-
-  /** Debug output. */
-  public  java.io.PrintStream debugStream = System.out;
-  /** Set debug output. */
-  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
-   switch (pos)
-   {
-      case 0:
-         if ((active0 & 0x20L) != 0L)
-         {
-            jjmatchedKind = 1;
-            return -1;
-         }
-         return -1;
-      case 1:
-         if ((active0 & 0x20L) != 0L)
-         {
-            if (jjmatchedPos == 0)
-            {
-               jjmatchedKind = 1;
-               jjmatchedPos = 0;
-            }
-            return -1;
-         }
-         return -1;
-      case 2:
-         if ((active0 & 0x20L) != 0L)
-         {
-            if (jjmatchedPos == 0)
-            {
-               jjmatchedKind = 1;
-               jjmatchedPos = 0;
-            }
-            return -1;
-         }
-         return -1;
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
-   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 32:
-         return jjStopAtPos(0, 7);
-      case 43:
-         return jjStopAtPos(0, 3);
-      case 44:
-         return jjStopAtPos(0, 8);
-      case 45:
-         return jjStopAtPos(0, 9);
-      case 50:
-         return jjMoveStringLiteralDfa1_0(0x20L);
-      case 58:
-         return jjStopAtPos(0, 10);
-      case 59:
-         return jjMoveStringLiteralDfa1_0(0x40L);
-      case 111:
-         return jjMoveStringLiteralDfa1_0(0x10L);
-      default :
-         return jjMoveNfa_0(0, 0);
-   }
-}
-private int jjMoveStringLiteralDfa1_0(long active0)
-{
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(0, active0);
-      return 1;
-   }
-   switch(curChar)
-   {
-      case 32:
-         if ((active0 & 0x40L) != 0L)
-            return jjStopAtPos(1, 6);
-         break;
-      case 52:
-         return jjMoveStringLiteralDfa2_0(active0, 0x20L);
-      case 102:
-         return jjMoveStringLiteralDfa2_0(active0, 0x10L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(0, active0);
-}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(0, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(1, active0);
-      return 2;
-   }
-   switch(curChar)
-   {
-      case 47:
-         return jjMoveStringLiteralDfa3_0(active0, 0x20L);
-      case 102:
-         if ((active0 & 0x10L) != 0L)
-            return jjStopAtPos(2, 4);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(1, active0);
-}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(1, old0);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(2, active0);
-      return 3;
-   }
-   switch(curChar)
-   {
-      case 55:
-         if ((active0 & 0x20L) != 0L)
-            return jjStopAtPos(3, 5);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(2, active0);
-}
-private int jjMoveNfa_0(int startState, int curPos)
-{
-   int startsAt = 0;
-   jjnewStateCnt = 12;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     kind = 1;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (curChar == 83)
-                     jjCheckNAddTwoStates(11, 8);
-                  else if (curChar == 84)
-                     jjCheckNAddTwoStates(8, 9);
-                  else if (curChar == 70)
-                     jjstateSet[jjnewStateCnt++] = 5;
-                  else if (curChar == 87)
-                     jjstateSet[jjnewStateCnt++] = 3;
-                  else if (curChar == 77)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (curChar == 111)
-                     kind = 2;
-                  break;
-               case 2:
-                  if (curChar == 77)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 3:
-                  if (curChar == 101)
-                     kind = 2;
-                  break;
-               case 4:
-                  if (curChar == 87)
-                     jjstateSet[jjnewStateCnt++] = 3;
-                  break;
-               case 5:
-                  if (curChar == 114)
-                     kind = 2;
-                  break;
-               case 6:
-                  if (curChar == 70)
-                     jjstateSet[jjnewStateCnt++] = 5;
-                  break;
-               case 7:
-                  if (curChar == 84)
-                     jjCheckNAddTwoStates(8, 9);
-                  break;
-               case 8:
-                  if (curChar == 117)
-                     kind = 2;
-                  break;
-               case 9:
-                  if (curChar == 104)
-                     kind = 2;
-                  break;
-               case 10:
-                  if (curChar == 83)
-                     jjCheckNAddTwoStates(11, 8);
-                  break;
-               case 11:
-                  if (curChar == 97)
-                     kind = 2;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 12 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-static final int[] jjnextStates = {
-};
-
-/** Token literal values. */
-public static final String[] jjstrLiteralImages = {
-"", null, null, "\53", "\157\146\146", "\62\64\57\67", "\73\40", "\40", "\54",
-"\55", "\72", };
-
-/** Lexer state names. */
-public static final String[] lexStateNames = {
-   "DEFAULT",
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[12];
-private final int[] jjstateSet = new int[24];
-protected char curChar;
-/** Constructor. */
-public OpeningTimeCompilerTokenManager(SimpleCharStream stream){
-   if (SimpleCharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-
-/** Constructor. */
-public OpeningTimeCompilerTokenManager(SimpleCharStream stream, int lexState){
-   this(stream);
-   SwitchTo(lexState);
-}
-
-/** Reinitialise parser. */
-public void ReInit(SimpleCharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 12; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(SimpleCharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 1 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
-   final Token t;
-   final String curTokenImage;
-   final int beginLine;
-   final int endLine;
-   final int beginColumn;
-   final int endColumn;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   curTokenImage = (im == null) ? input_stream.GetImage() : im;
-   beginLine = input_stream.getBeginLine();
-   beginColumn = input_stream.getBeginColumn();
-   endLine = input_stream.getEndLine();
-   endColumn = input_stream.getEndColumn();
-   t = Token.newToken(jjmatchedKind, curTokenImage);
-
-   t.beginLine = beginLine;
-   t.endLine = endLine;
-   t.beginColumn = beginColumn;
-   t.endColumn = endColumn;
-
-   return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-/** Get the next Token. */
-public Token getNextToken()
-{
-  Token matchedToken;
-  int curPos = 0;
-
-  EOFLoop :
-  for (;;)
-  {
-   try
-   {
-      curChar = input_stream.BeginToken();
-   }
-   catch(java.io.IOException e)
-   {
-      jjmatchedKind = 0;
-      matchedToken = jjFillToken();
-      return matchedToken;
-   }
-
-   jjmatchedKind = 0x7fffffff;
-   jjmatchedPos = 0;
-   curPos = jjMoveStringLiteralDfa0_0();
-   if (jjmatchedKind != 0x7fffffff)
-   {
-      if (jjmatchedPos + 1 < curPos)
-         input_stream.backup(curPos - jjmatchedPos - 1);
-         matchedToken = jjFillToken();
-         return matchedToken;
-   }
-   int error_line = input_stream.getEndLine();
-   int error_column = input_stream.getEndColumn();
-   String error_after = null;
-   boolean EOFSeen = false;
-   try { input_stream.readChar(); input_stream.backup(1); }
-   catch (java.io.IOException e1) {
-      EOFSeen = true;
-      error_after = curPos <= 1 ? "" : input_stream.GetImage();
-      if (curChar == '\n' || curChar == '\r') {
-         error_line++;
-         error_column = 0;
-      }
-      else
-         error_column++;
-   }
-   if (!EOFSeen) {
-      input_stream.backup(1);
-      error_after = curPos <= 1 ? "" : input_stream.GetImage();
-   }
-   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
-  }
-}
-
-private void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-
-}
