Index: applications/editors/josm/plugins/OpeningHoursEditor/build.xml
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 30121)
+++ applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 30122)
@@ -15,5 +15,5 @@
     <import file="../build-common.xml"/>
 	
-    <property name="javacc.home" location="../../core/tools"/>
+    <property name="javacc.home" location="../00_core_tools"/>
 	<property name="parser.dir" location="${plugin.src.dir}/org/openstreetmap/josm/plugins/ohe/parser"/>
 	
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java	(revision 30121)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java	(revision 30122)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.plugins.ohe.parser.ParseException;
 import org.openstreetmap.josm.plugins.ohe.parser.SyntaxException;
+import org.openstreetmap.josm.plugins.ohe.parser.TokenMgrError;
 import org.openstreetmap.josm.tools.GBC;
 
@@ -99,5 +100,5 @@
         toolsPanel.add(Box.createGlue(), GBC.std().fill(GBC.HORIZONTAL));
         toolsPanel.add(actualPostionLabel, GBC.eop());
-
+        
         editorPanel = new OheEditor(this);
 
@@ -132,6 +133,8 @@
                 time = OpeningTimeUtils.convert(compiler.startCompile());
             } catch (Throwable t) {
+                Main.warn(t);
+                
                 int tColumns[] = null;
-                String info = null;
+                String info = t.getMessage();
 
                 if (t instanceof ParseException) {
@@ -141,27 +144,41 @@
                     SyntaxException syntaxError = (SyntaxException) t;
                     tColumns = new int[] { syntaxError.getStartColumn(), syntaxError.getEndColumn() };
-                    info = syntaxError.getMessage();
-                } else {
-                    info = t.getMessage();
-                    Main.warn(t);
+                } else if (t instanceof TokenMgrError) {
+                    try {
+                        // With JavaCC 6 Message is: "Lexical error at line 1, column 20.  Encountered: "P" (80), after : ""
+                        int idx = info.indexOf("column ");
+                        if (idx > -1) {
+                            int col = Integer.parseInt(info.substring(idx+"column ".length(), info.indexOf('.', idx)));
+                            tColumns = new int[] { col - 1, col + 1 };
+                        }
+                    } catch (IndexOutOfBoundsException e) {
+                        Main.warn(e);
+                    } catch (NumberFormatException e) {
+                        Main.warn(e);
+                    }
                 }
 
                 // shows a Information Dialog, where the Error occurred
-                if (tColumns != null) {
-                    int first = Math.max(0, tColumns[0]);
-                    int last = Math.min(value.length(), tColumns[1]);
-                    String begin = value.substring(0, first);
-                    String middle = value.substring(first, last);
-                    String end = value.substring(last);
-                    valueField.setCaretPosition(first);
-                    // TODO focus on the valueField
-                    String message = "<html>" + tr("There is something wrong in the value near:") + "<br>" + begin
-                            + "<span style='background-color:red;'>" + middle + "</span>" + end;
-                    if (info != null)
-                        message += "<br>" + tr("Info: {0}", tr(info));
-                    message += "<br>" + tr("Correct the value manually and than press Enter.");
-                    message += "</html>";
-                    JOptionPane.showMessageDialog(this, message, tr("Error in timeformat"),
-                            JOptionPane.INFORMATION_MESSAGE);
+                if (tColumns != null || info != null) {
+                    String message = "<html>";
+                    if (tColumns != null) {
+                        int first = Math.max(0, tColumns[0]);
+                        int last = Math.min(value.length(), tColumns[1]);
+                        String begin = value.substring(0, first);
+                        String middle = value.substring(first, last);
+                        String end = value.substring(last);
+                        valueField.setCaretPosition(first);
+                        // TODO focus on the valueField
+                        message += tr("There is something wrong in the value near:") + "<br>" + begin
+                                + "<span style='background-color:red;'>" + middle + "</span>" + end;
+                    }
+                    if (info != null) {
+                        if (tColumns != null) {
+                            message += "<br>";
+                        }
+                        message += tr("Info: {0}", tr(info));
+                    }
+                    message += "<br>" + tr("Correct the value manually and than press Enter.") + "</html>";
+                    JOptionPane.showMessageDialog(this, message, tr("Error in timeformat"), JOptionPane.INFORMATION_MESSAGE);
                 }
 
