- Timestamp:
- 2011-02-12T20:30:01+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r3862 r3893 10 10 import java.util.Collection; 11 11 import java.util.List; 12 import java.util.Map.Entry; 12 13 13 14 import javax.swing.event.ChangeEvent; … … 31 32 import org.openstreetmap.josm.gui.DefaultNameFormatter; 32 33 import org.openstreetmap.josm.gui.NavigatableComponent; 34 import org.openstreetmap.josm.gui.mappaint.Cascade; 33 35 import org.openstreetmap.josm.gui.mappaint.ElemStyle; 34 36 import org.openstreetmap.josm.gui.mappaint.ElemStyles; … … 288 290 s.apply(mc, osm, scale, null, false); 289 291 txtMappaint.append("\nRange:"+mc.range); 290 for ( String key : mc.keySet()) {291 txtMappaint.append("\n "+ key+": \n"+mc.get(key));292 for (Entry<String, Cascade> e : mc.getLayers()) { 293 txtMappaint.append("\n "+e.getKey()+": \n"+e.getValue()); 292 294 } 293 295 } else { -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r3882 r3893 16 16 public class Cascade implements Cloneable { 17 17 18 public static final Cascade EMPTY_CASCADE = new Cascade( false);18 public static final Cascade EMPTY_CASCADE = new Cascade(); 19 19 20 20 protected Map<String, Object> prop = new HashMap<String, Object>(); 21 22 /**23 * constructor24 * @param isModifier Everything that is not on the default layer is assumed to25 * be a modifier. Can be overridden in style definition.26 */27 public Cascade(boolean isModifier) {28 if (isModifier) {29 put("modifier", true);30 }31 }32 33 private Cascade() {34 }35 21 36 22 public <T> T get(String key, T def, Class<T> klass) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r3865 r3893 219 219 } 220 220 221 for (Entry<String, Cascade> e : mc. entrySet()) {221 for (Entry<String, Cascade> e : mc.getLayers()) { 222 222 if ("*".equals(e.getKey())) 223 223 continue; -
trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java
r3860 r3893 3 3 4 4 import org.openstreetmap.josm.data.osm.OsmPrimitive; 5 import org.openstreetmap.josm.gui.mappaint.Cascade;6 import org.openstreetmap.josm.gui.mappaint.MultiCascade;7 import org.openstreetmap.josm.gui.mappaint.StyleSource;8 5 9 6 public class Environment { … … 21 18 } 22 19 23 public Cascade getCascade() {24 return mc.getCascade(layer);25 }26 20 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r3889 r3893 19 19 20 20 public static LineElemStyle createSimpleLineStyle(Color color) { 21 Cascade c = new Cascade(false); 21 MultiCascade mc = new MultiCascade(); 22 Cascade c = mc.getOrCreateCascade("default"); 22 23 c.put("width", -1f); 23 24 c.put("color", color != null ? color : PaintColors.UNTAGGED.get()); 24 MultiCascade mc = new MultiCascade();25 mc.put("default", c);26 25 return createLine(new Environment(null, mc, "default", null)); 27 26 } … … 60 59 61 60 private static LineElemStyle createImpl(Environment env, boolean casing) { 62 Cascade c = env. getCascade();61 Cascade c = env.mc.getCascade(env.layer); 63 62 Cascade c_def = env.mc.getCascade("default"); 64 63 -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r3886 r3893 37 37 38 38 private static ElemStyles styles = new ElemStyles(); 39 private static Collection<String> iconDirs;40 39 41 40 public static ElemStyles getStyles() … … 62 61 public static ImageIcon getIcon(IconReference ref, boolean sanitize) 63 62 { 64 String styleName = ref.source.getPrefName(); 63 String namespace = ref.source.getPrefName(); 64 ImageIcon i = ImageProvider.getIfAvailable(getIconSourceDirs(ref.source), "mappaint."+namespace, null, ref.iconName, ref.source.zipIcons, sanitize); 65 if(i == null) 66 { 67 System.out.println("Mappaint style \""+namespace+"\" icon \"" + ref.iconName + "\" not found."); 68 return null; 69 } 70 return i; 71 } 72 73 /** 74 * No icon with the given name was found, show a dummy icon instead 75 * @return the icon misc/no_icon.png, in descending priority: 76 * - relative to source file 77 * - from user icon paths 78 * - josm's default icon 79 * can be null if the defaults are turned off by user 80 */ 81 public static ImageIcon getNoIcon_Icon(StyleSource source, boolean sanitize) { 82 return ImageProvider.getIfAvailable(getIconSourceDirs(source), "mappaint."+source.getPrefName(), null, "misc/no_icon.png", source.zipIcons, sanitize); 83 } 84 85 private static List<String> getIconSourceDirs(StyleSource source) { 65 86 List<String> dirs = new LinkedList<String>(); 66 for(String fileset : iconDirs) 87 88 String sourceDir = source.getLocalSourceDir(); 89 if (sourceDir != null) { 90 dirs.add(sourceDir); 91 } 92 93 Collection<String> prefIconDirs = Main.pref.getCollection("mappaint.icon.sources"); 94 for(String fileset : prefIconDirs) 67 95 { 68 96 String[] a; … … 74 102 75 103 /* non-prefixed path is generic path, always take it */ 76 if(a[0].length() == 0 || s tyleName.equals(a[0])) {104 if(a[0].length() == 0 || source.getPrefName().equals(a[0])) { 77 105 dirs.add(a[1]); 78 106 } 79 107 } 80 String sourceDir = ref.source.getLocalSourceDir(); 81 if (sourceDir != null) { 82 dirs.add(sourceDir); 83 } 84 ImageIcon i = ImageProvider.getIfAvailable(dirs, "mappaint."+styleName, null, ref.iconName, ref.source.zipIcons, sanitize); 85 if(i == null) 86 { 87 System.out.println("Mappaint style \""+styleName+"\" icon \"" + ref.iconName + "\" not found."); 88 i = ImageProvider.getIfAvailable(dirs, "mappaint."+styleName, null, "misc/no_icon.png"); 89 } 90 return i; 108 109 if (Main.pref.getBoolean("mappaint.icon.enable-defaults", true)) { 110 /* don't prefix icon path, as it should be generic */ 111 dirs.add("resource://images/styles/standard/"); 112 dirs.add("resource://images/styles/"); 113 } 114 115 return dirs; 91 116 } 92 117 93 118 public static void readFromPreferences() { 94 119 styles.clear(); 95 iconDirs = Main.pref.getCollection("mappaint.icon.sources", Collections.<String>emptySet());96 if(Main.pref.getBoolean("mappaint.icon.enable-defaults", true))97 {98 LinkedList<String> f = new LinkedList<String>(iconDirs);99 /* don't prefix icon path, as it should be generic */100 f.add("resource://images/styles/standard/");101 f.add("resource://images/styles/");102 iconDirs = f;103 }104 120 105 121 Collection<? extends SourceEntry> sourceEntries = MapPaintPrefMigration.INSTANCE.get(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java
r3882 r3893 2 2 package org.openstreetmap.josm.gui.mappaint; 3 3 4 import java.util.Collection; 4 5 import java.util.HashMap; 6 import java.util.Map; 7 import java.util.Map.Entry; 5 8 6 9 /** 7 * Several cascades, e.g. one for the main Line and one for each overlay.8 * The range is (0,Inf ) at first and it shrinks in the process when10 * Several layers / cascades, e.g. one for the main Line and one for each overlay. 11 * The range is (0,Infinity) at first and it shrinks in the process when 9 12 * StyleSources apply zoom level dependent properties. 10 13 */ 11 public class MultiCascade extends HashMap<String, Cascade> { 14 public class MultiCascade { 15 16 private Map<String, Cascade> layers; 12 17 public Range range; 13 18 14 19 public MultiCascade() { 15 super();20 layers = new HashMap<String, Cascade>(); 16 21 range = new Range(); 17 22 } 18 23 19 24 /** 20 * Return the cascade for the given layer key. If it does not exist, 21 * return a new cascade, but do not keep it. 25 * Return the cascade with the given name. If it doesn't exist, create 26 * a new layer with that name and return it. The new layer will be 27 * a clone of the "*" layer, if it exists. 22 28 */ 23 public Cascade get Cascade(String layer) {29 public Cascade getOrCreateCascade(String layer) { 24 30 if (layer == null) 25 31 throw new IllegalArgumentException(); 26 Cascade c = get(layer);32 Cascade c = layers.get(layer); 27 33 if (c == null) { 28 c = new Cascade(!layer.equals("default")); 34 if (layers.containsKey("*")) { 35 c = layers.get("*").clone(); 36 } else { 37 c = new Cascade(); 38 // Everything that is not on the default layer is assumed to 39 // be a modifier. Can be overridden in style definition. 40 if (!layer.equals("default")) { 41 c.put("modifier", true); 42 } 43 } 44 layers.put(layer, c); 29 45 } 30 46 return c; 31 47 } 32 48 49 /** 50 * Read-only version of getOrCreateCascade. For convenience, it returns an 51 * empty cascade for non-existing layers. However this empty (read-only) cascade 52 * is not added to this MultiCascade object. 53 */ 54 public Cascade getCascade(String layer) { 55 if (layer == null) { 56 layer = "default"; 57 } 58 Cascade c = layers.get(layer); 59 if (c == null) { 60 c = new Cascade(); 61 if (!layer.equals("default")) { 62 c.put("modifier", true); 63 } 64 } 65 return c; 66 } 67 68 public Collection<Entry<String, Cascade>> getLayers() { 69 return layers.entrySet(); 70 } 71 72 public boolean hasLayer(String layer) { 73 return layers.containsKey(layer); 74 } 33 75 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
r3888 r3893 124 124 public static final NodeElemStyle SIMPLE_NODE_ELEMSTYLE; 125 125 static { 126 Cascade c = new Cascade( false);126 Cascade c = new Cascade(); 127 127 c.put("text", "auto"); 128 128 SIMPLE_NODE_ELEMSTYLE = create(c, true); … … 149 149 if (iconRef != null) { 150 150 icon = MapPaintStyles.getIcon(iconRef, false); 151 if (icon == null) { 152 icon = MapPaintStyles.getNoIcon_Icon(iconRef.source, false); 153 } 151 154 iconAlpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.icon-image-alpha", 255)))); 152 155 Integer pAlpha = Utils.color_float2int(c.get("icon-opacity", null, float.class)); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r3888 r3893 9 9 10 10 import org.openstreetmap.josm.data.osm.Node; 11 import org.openstreetmap.josm.data.osm.OsmUtils; 11 12 import org.openstreetmap.josm.data.osm.Relation; 12 13 import org.openstreetmap.josm.data.osm.Way; … … 98 99 private String k; 99 100 private boolean not; 101 private boolean yes; 100 102 101 public KeyCondition(String k, boolean not ) {103 public KeyCondition(String k, boolean not, boolean yes) { 102 104 this.k = k; 103 105 this.not = not; 106 this.yes = yes; 104 107 } 105 108 106 109 @Override 107 110 public boolean applies(Environment e) { 108 return e.osm.hasKey(k) ^ not; 111 if (yes) 112 return OsmUtils.isTrue(e.osm.get(k)) ^ not; 113 else 114 return e.osm.hasKey(k) ^ not; 109 115 } 110 116 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Expression.java
r3880 r3893 122 122 Cascade c; 123 123 if (layer == null) { 124 c = env. getCascade();124 c = env.mc.getCascade(env.layer); 125 125 } else { 126 126 c = env.mc.getCascade(layer); … … 136 136 Cascade c; 137 137 if (layer == null) { 138 c = env.getCascade(); 138 // env.layer is null if expression is evaluated 139 // in ExpressionCondition, but MultiCascade.getCascade 140 // handles this 141 c = env.mc.getCascade(env.layer); 139 142 } else { 140 143 c = env.mc.getCascade(layer); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
r3876 r3893 45 45 } 46 46 } 47 env. getCascade().putOrClear(key, value);47 env.mc.getOrCreateCascade(env.layer).putOrClear(key, value); 48 48 } 49 49 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r3882 r3893 58 58 System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 59 59 e.printStackTrace(); 60 logError( e);60 logError(new ParseException(e.getMessage())); // allow e to be garbage collected, it links to the entire token stream 61 61 } 62 62 } … … 124 124 } 125 125 126 Cascade c = mc.get(sub);127 if (c == null) {128 if (mc.containsKey("*")) {129 c = mc.get("*").clone();130 } else {131 c = new Cascade(!sub.equals("default"));132 }133 mc.put(sub, c);134 }135 136 126 if (sub.equals("*")) { 137 for (Entry<String, Cascade> entry : mc. entrySet()) {127 for (Entry<String, Cascade> entry : mc.getLayers()) { 138 128 env.layer = entry.getKey(); 129 if (Utils.equal(env.layer, "*")) { 130 continue; 131 } 139 132 for (Instruction i : r.declaration) { 140 133 i.execute(env); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.java
r3888 r3893 393 393 final public Condition simple_key_condition() throws ParseException { 394 394 boolean not = false; 395 boolean yes = false; 395 396 String key; 396 397 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { … … 404 405 } 405 406 key = string_or_ident(); 406 {if (true) return new Condition.KeyCondition(key, not);} 407 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 408 case QUESTION: 409 jj_consume_token(QUESTION); 410 yes = true; 411 break; 412 default: 413 jj_la1[19] = jj_gen; 414 ; 415 } 416 {if (true) return new Condition.KeyCondition(key, not, yes);} 407 417 throw new Error("Missing return statement in function"); 408 418 } … … 442 452 break; 443 453 default: 444 jj_la1[ 19] = jj_gen;454 jj_la1[20] = jj_gen; 445 455 jj_consume_token(-1); 446 456 throw new ParseException(); … … 472 482 break; 473 483 default: 474 jj_la1[2 0] = jj_gen;484 jj_la1[21] = jj_gen; 475 485 jj_consume_token(-1); 476 486 throw new ParseException(); … … 500 510 break; 501 511 default: 502 jj_la1[2 1] = jj_gen;512 jj_la1[22] = jj_gen; 503 513 jj_consume_token(-1); 504 514 throw new ParseException(); … … 508 518 break; 509 519 default: 510 jj_la1[2 2] = jj_gen;520 jj_la1[23] = jj_gen; 511 521 jj_consume_token(-1); 512 522 throw new ParseException(); … … 524 534 break; 525 535 default: 526 jj_la1[2 3] = jj_gen;536 jj_la1[24] = jj_gen; 527 537 ; 528 538 } … … 544 554 break; 545 555 default: 546 jj_la1[2 4] = jj_gen;556 jj_la1[25] = jj_gen; 547 557 jj_consume_token(-1); 548 558 throw new ParseException(); … … 566 576 break; 567 577 default: 568 jj_la1[2 5] = jj_gen;578 jj_la1[26] = jj_gen; 569 579 break label_6; 570 580 } … … 587 597 break; 588 598 default: 589 jj_la1[2 6] = jj_gen;599 jj_la1[27] = jj_gen; 590 600 jj_consume_token(-1); 591 601 throw new ParseException(); … … 604 614 break; 605 615 default: 606 jj_la1[2 7] = jj_gen;616 jj_la1[28] = jj_gen; 607 617 jj_consume_token(-1); 608 618 throw new ParseException(); … … 678 688 break; 679 689 default: 680 jj_la1[2 8] = jj_gen;690 jj_la1[29] = jj_gen; 681 691 break label_7; 682 692 } … … 697 707 break; 698 708 default: 699 jj_la1[ 29] = jj_gen;709 jj_la1[30] = jj_gen; 700 710 break label_8; 701 711 } … … 716 726 break; 717 727 default: 718 jj_la1[3 0] = jj_gen;728 jj_la1[31] = jj_gen; 719 729 break label_9; 720 730 } … … 735 745 break; 736 746 default: 737 jj_la1[3 1] = jj_gen;747 jj_la1[32] = jj_gen; 738 748 break label_10; 739 749 } … … 771 781 break; 772 782 default: 773 jj_la1[3 2] = jj_gen;783 jj_la1[33] = jj_gen; 774 784 ; 775 785 } … … 820 830 break; 821 831 default: 822 jj_la1[3 3] = jj_gen;832 jj_la1[34] = jj_gen; 823 833 jj_consume_token(-1); 824 834 throw new ParseException(); … … 826 836 break; 827 837 default: 828 jj_la1[3 4] = jj_gen;838 jj_la1[35] = jj_gen; 829 839 ; 830 840 } 831 841 break; 832 842 default: 833 jj_la1[3 5] = jj_gen;843 jj_la1[36] = jj_gen; 834 844 jj_consume_token(-1); 835 845 throw new ParseException(); … … 868 878 break; 869 879 default: 870 jj_la1[3 6] = jj_gen;880 jj_la1[37] = jj_gen; 871 881 jj_consume_token(-1); 872 882 throw new ParseException(); … … 905 915 break; 906 916 default: 907 jj_la1[3 7] = jj_gen;917 jj_la1[38] = jj_gen; 908 918 break label_11; 909 919 } … … 915 925 break; 916 926 default: 917 jj_la1[3 8] = jj_gen;927 jj_la1[39] = jj_gen; 918 928 ; 919 929 } … … 954 964 break; 955 965 default: 956 jj_la1[ 39] = jj_gen;966 jj_la1[40] = jj_gen; 957 967 jj_consume_token(-1); 958 968 throw new ParseException(); … … 962 972 963 973 void error_skipto(int kind) throws ParseException { 974 if (token.kind == EOF) 975 throw new ParseException("Reached end of file while parsing"); 964 976 ParseException e = generateParseException(); 965 977 System.err.println("Skipping to the next rule, because of an error:"); 966 978 System.err.println(e); 967 979 if (sheet != null) { 968 sheet.logError( e);980 sheet.logError(new ParseException(e.getMessage())); 969 981 } 970 982 Token t; … … 984 996 while (true) { 985 997 t = getNextToken(); 998 if ((t.kind == S || t.kind == STRING || t.kind == UNEXPECTED_CHAR) && 999 t.image.contains("\n")) { 1000 ParseException e = new ParseException(String.format("Warning: end of line while reading an unquoted string at line %s column %s.", t.beginLine, t.beginColumn)); 1001 System.err.println(e); 1002 if (sheet != null) { 1003 sheet.logError(e); 1004 } 1005 } 986 1006 if (t.kind == SEMICOLON || t.kind == EOF) 987 1007 break; … … 1028 1048 } 1029 1049 1030 private boolean jj_3R_17() { 1031 if (jj_scan_token(IDENT)) return true; 1032 if (jj_3R_15()) return true; 1033 if (jj_scan_token(LPAR)) return true; 1034 if (jj_3R_15()) return true; 1035 Token xsp; 1036 xsp = jj_scanpos; 1037 if (jj_3R_70()) jj_scanpos = xsp; 1038 if (jj_scan_token(RPAR)) return true; 1039 return false; 1040 } 1041 1042 private boolean jj_3R_29() { 1043 if (jj_3R_45()) return true; 1044 return false; 1045 } 1046 1047 private boolean jj_3R_24() { 1050 private boolean jj_3R_30() { 1051 if (jj_3R_46()) return true; 1052 return false; 1053 } 1054 1055 private boolean jj_3R_25() { 1048 1056 Token xsp; 1049 1057 xsp = jj_scanpos; 1050 1058 if (jj_scan_token(9)) { 1051 1059 jj_scanpos = xsp; 1052 if (jj_3R_4 2()) return true;1060 if (jj_3R_43()) return true; 1053 1061 } 1054 1062 return false; … … 1059 1067 while (true) { 1060 1068 xsp = jj_scanpos; 1061 if (jj_3R_2 4()) { jj_scanpos = xsp; break; }1062 } 1063 return false; 1064 } 1065 1066 private boolean jj_3R_5 1() {1069 if (jj_3R_25()) { jj_scanpos = xsp; break; } 1070 } 1071 return false; 1072 } 1073 1074 private boolean jj_3R_52() { 1067 1075 if (jj_scan_token(LPAR)) return true; 1068 1076 if (jj_3R_15()) return true; … … 1072 1080 } 1073 1081 1074 private boolean jj_3R_50() { 1075 if (jj_3R_65()) return true; 1076 return false; 1077 } 1078 1079 private boolean jj_3R_41() { 1082 private boolean jj_3R_51() { 1083 if (jj_3R_66()) return true; 1084 return false; 1085 } 1086 1087 private boolean jj_3R_44() { 1088 Token xsp; 1089 xsp = jj_scanpos; 1090 if (jj_3_5()) { 1091 jj_scanpos = xsp; 1092 if (jj_3R_51()) { 1093 jj_scanpos = xsp; 1094 if (jj_3R_52()) return true; 1095 } 1096 } 1097 return false; 1098 } 1099 1100 private boolean jj_3R_42() { 1080 1101 Token xsp; 1081 1102 xsp = jj_scanpos; … … 1084 1105 } 1085 1106 1086 private boolean jj_3R_49() {1087 if (jj_3R_22()) return true;1088 return false;1089 }1090 1091 private boolean jj_3R_43() {1092 Token xsp;1093 xsp = jj_scanpos;1094 if (jj_3_5()) {1095 jj_scanpos = xsp;1096 if (jj_3R_50()) {1097 jj_scanpos = xsp;1098 if (jj_3R_51()) return true;1099 }1100 }1101 return false;1102 }1103 1104 1107 private boolean jj_3_5() { 1105 1108 if (jj_3R_17()) return true; … … 1107 1110 } 1108 1111 1112 private boolean jj_3R_50() { 1113 if (jj_3R_23()) return true; 1114 return false; 1115 } 1116 1117 private boolean jj_3R_64() { 1118 if (jj_scan_token(QUESTION)) return true; 1119 if (jj_3R_15()) return true; 1120 if (jj_3R_44()) return true; 1121 if (jj_3R_15()) return true; 1122 if (jj_scan_token(COLON)) return true; 1123 if (jj_3R_15()) return true; 1124 if (jj_3R_44()) return true; 1125 if (jj_3R_15()) return true; 1126 return false; 1127 } 1128 1109 1129 private boolean jj_3R_63() { 1110 if (jj_scan_token(QUESTION)) return true;1111 if (jj_3R_15()) return true;1112 if (jj_3R_43()) return true;1113 if (jj_3R_15()) return true;1114 if (jj_scan_token(COLON)) return true;1115 if (jj_3R_15()) return true;1116 if (jj_3R_43()) return true;1117 if (jj_3R_15()) return true;1118 return false;1119 }1120 1121 private boolean jj_3R_62() {1122 1130 if (jj_scan_token(PIPE)) return true; 1123 1131 if (jj_scan_token(PIPE)) return true; 1124 1132 if (jj_3R_15()) return true; 1125 if (jj_3R_4 3()) return true;1126 if (jj_3R_15()) return true; 1127 return false; 1128 } 1129 1130 private boolean jj_3R_ 39() {1133 if (jj_3R_44()) return true; 1134 if (jj_3R_15()) return true; 1135 return false; 1136 } 1137 1138 private boolean jj_3R_40() { 1131 1139 if (jj_scan_token(LESS)) return true; 1132 1140 return false; 1133 1141 } 1134 1142 1135 private boolean jj_3R_6 1() {1143 private boolean jj_3R_62() { 1136 1144 if (jj_scan_token(AMPERSAND)) return true; 1137 1145 if (jj_scan_token(AMPERSAND)) return true; 1138 1146 if (jj_3R_15()) return true; 1139 if (jj_3R_43()) return true; 1147 if (jj_3R_44()) return true; 1148 if (jj_3R_15()) return true; 1149 return false; 1150 } 1151 1152 private boolean jj_3R_39() { 1153 if (jj_scan_token(LESS_EQUAL)) return true; 1154 return false; 1155 } 1156 1157 private boolean jj_3R_61() { 1158 if (jj_scan_token(LESS)) return true; 1159 if (jj_3R_15()) return true; 1160 if (jj_3R_44()) return true; 1140 1161 if (jj_3R_15()) return true; 1141 1162 return false; … … 1143 1164 1144 1165 private boolean jj_3R_38() { 1145 if (jj_scan_token( LESS_EQUAL)) return true;1166 if (jj_scan_token(GREATER)) return true; 1146 1167 return false; 1147 1168 } 1148 1169 1149 1170 private boolean jj_3R_60() { 1150 if (jj_scan_token(LESS)) return true;1151 if (jj_3R_15()) return true;1152 if (jj_3R_43()) return true;1153 if (jj_3R_15()) return true;1154 return false;1155 }1156 1157 private boolean jj_3R_37() {1158 if (jj_scan_token(GREATER)) return true;1159 return false;1160 }1161 1162 private boolean jj_3R_64() {1163 if (jj_scan_token(REGEX)) return true;1164 return false;1165 }1166 1167 private boolean jj_3R_59() {1168 1171 if (jj_scan_token(EQUAL)) return true; 1169 1172 Token xsp; … … 1171 1174 if (jj_scan_token(22)) jj_scanpos = xsp; 1172 1175 if (jj_3R_15()) return true; 1173 if (jj_3R_43()) return true; 1176 if (jj_3R_44()) return true; 1177 if (jj_3R_15()) return true; 1178 return false; 1179 } 1180 1181 private boolean jj_3R_37() { 1182 if (jj_scan_token(GREATER_EQUAL)) return true; 1183 return false; 1184 } 1185 1186 private boolean jj_3R_65() { 1187 if (jj_scan_token(REGEX)) return true; 1188 return false; 1189 } 1190 1191 private boolean jj_3R_59() { 1192 if (jj_scan_token(GREATER)) return true; 1193 if (jj_3R_15()) return true; 1194 if (jj_3R_44()) return true; 1195 if (jj_3R_15()) return true; 1196 return false; 1197 } 1198 1199 private boolean jj_3R_58() { 1200 if (jj_scan_token(LESS_EQUAL)) return true; 1201 if (jj_3R_15()) return true; 1202 if (jj_3R_44()) return true; 1174 1203 if (jj_3R_15()) return true; 1175 1204 return false; … … 1177 1206 1178 1207 private boolean jj_3R_36() { 1179 if (jj_scan_token(GREATER_EQUAL)) return true;1180 return false;1181 }1182 1183 private boolean jj_3R_58() {1184 if (jj_scan_token(GREATER)) return true;1185 if (jj_3R_15()) return true;1186 if (jj_3R_43()) return true;1187 if (jj_3R_15()) return true;1188 return false;1189 }1190 1191 private boolean jj_3R_57() {1192 if (jj_scan_token(LESS_EQUAL)) return true;1193 if (jj_3R_15()) return true;1194 if (jj_3R_43()) return true;1195 if (jj_3R_15()) return true;1196 return false;1197 }1198 1199 private boolean jj_3R_35() {1200 1208 if (jj_scan_token(STAR)) return true; 1201 1209 if (jj_scan_token(EQUAL)) return true; … … 1204 1212 } 1205 1213 1206 private boolean jj_3R_ 69() {1214 private boolean jj_3R_70() { 1207 1215 if (jj_scan_token(SLASH)) return true; 1208 1216 if (jj_3R_15()) return true; 1209 if (jj_3R_4 3()) return true;1210 if (jj_3R_15()) return true; 1211 return false; 1212 } 1213 1214 private boolean jj_3R_5 6() {1217 if (jj_3R_44()) return true; 1218 if (jj_3R_15()) return true; 1219 return false; 1220 } 1221 1222 private boolean jj_3R_57() { 1215 1223 if (jj_scan_token(GREATER_EQUAL)) return true; 1216 1224 if (jj_3R_15()) return true; 1217 if (jj_3R_4 3()) return true;1218 if (jj_3R_15()) return true; 1219 return false; 1220 } 1221 1222 private boolean jj_3R_4 7() {1225 if (jj_3R_44()) return true; 1226 if (jj_3R_15()) return true; 1227 return false; 1228 } 1229 1230 private boolean jj_3R_48() { 1223 1231 if (jj_3R_19()) return true; 1224 1232 return false; 1225 1233 } 1226 1234 1227 private boolean jj_3R_19() { 1228 Token xsp; 1229 xsp = jj_scanpos; 1230 if (jj_3R_28()) { 1231 jj_scanpos = xsp; 1232 if (jj_3R_29()) return true; 1233 } 1234 return false; 1235 } 1236 1237 private boolean jj_3R_28() { 1238 if (jj_scan_token(IDENT)) return true; 1239 return false; 1240 } 1241 1242 private boolean jj_3R_34() { 1235 private boolean jj_3R_35() { 1243 1236 if (jj_scan_token(DOLLAR)) return true; 1244 1237 if (jj_scan_token(EQUAL)) return true; … … 1247 1240 } 1248 1241 1242 private boolean jj_3R_69() { 1243 if (jj_scan_token(MINUS)) return true; 1244 if (jj_3R_15()) return true; 1245 if (jj_3R_44()) return true; 1246 if (jj_3R_15()) return true; 1247 return false; 1248 } 1249 1250 private boolean jj_3R_56() { 1251 Token xsp; 1252 if (jj_3R_70()) return true; 1253 while (true) { 1254 xsp = jj_scanpos; 1255 if (jj_3R_70()) { jj_scanpos = xsp; break; } 1256 } 1257 return false; 1258 } 1259 1260 private boolean jj_3R_47() { 1261 if (jj_scan_token(TILDE)) return true; 1262 if (jj_3R_65()) return true; 1263 return false; 1264 } 1265 1266 private boolean jj_3R_19() { 1267 Token xsp; 1268 xsp = jj_scanpos; 1269 if (jj_3R_29()) { 1270 jj_scanpos = xsp; 1271 if (jj_3R_30()) return true; 1272 } 1273 return false; 1274 } 1275 1276 private boolean jj_3R_29() { 1277 if (jj_scan_token(IDENT)) return true; 1278 return false; 1279 } 1280 1281 private boolean jj_3R_22() { 1282 Token xsp; 1283 xsp = jj_scanpos; 1284 if (jj_3R_37()) { 1285 jj_scanpos = xsp; 1286 if (jj_3R_38()) { 1287 jj_scanpos = xsp; 1288 if (jj_3R_39()) { 1289 jj_scanpos = xsp; 1290 if (jj_3R_40()) return true; 1291 } 1292 } 1293 } 1294 if (jj_3R_41()) return true; 1295 return false; 1296 } 1297 1298 private boolean jj_3R_34() { 1299 if (jj_scan_token(CARET)) return true; 1300 if (jj_scan_token(EQUAL)) return true; 1301 if (jj_3R_19()) return true; 1302 return false; 1303 } 1304 1249 1305 private boolean jj_3R_68() { 1250 if (jj_scan_token( MINUS)) return true;1251 if (jj_3R_15()) return true; 1252 if (jj_3R_4 3()) return true;1306 if (jj_scan_token(STAR)) return true; 1307 if (jj_3R_15()) return true; 1308 if (jj_3R_44()) return true; 1253 1309 if (jj_3R_15()) return true; 1254 1310 return false; … … 1265 1321 } 1266 1322 1267 private boolean jj_3R_ 46() {1323 private boolean jj_3R_33() { 1268 1324 if (jj_scan_token(TILDE)) return true; 1269 if (jj_3R_64()) return true;1270 return false;1271 }1272 1273 private boolean jj_3R_21() {1274 Token xsp;1275 xsp = jj_scanpos;1276 if (jj_3R_36()) {1277 jj_scanpos = xsp;1278 if (jj_3R_37()) {1279 jj_scanpos = xsp;1280 if (jj_3R_38()) {1281 jj_scanpos = xsp;1282 if (jj_3R_39()) return true;1283 }1284 }1285 }1286 if (jj_3R_40()) return true;1287 return false;1288 }1289 1290 private boolean jj_3R_33() {1291 if (jj_scan_token(CARET)) return true;1292 1325 if (jj_scan_token(EQUAL)) return true; 1293 1326 if (jj_3R_19()) return true; … … 1296 1329 1297 1330 private boolean jj_3R_67() { 1298 if (jj_scan_token( STAR)) return true;1299 if (jj_3R_15()) return true; 1300 if (jj_3R_4 3()) return true;1331 if (jj_scan_token(PLUS)) return true; 1332 if (jj_3R_15()) return true; 1333 if (jj_3R_44()) return true; 1301 1334 if (jj_3R_15()) return true; 1302 1335 return false; … … 1313 1346 } 1314 1347 1315 private boolean jj_3R_32() {1316 if (jj_scan_token(TILDE)) return true;1317 if (jj_scan_token(EQUAL)) return true;1318 if (jj_3R_19()) return true;1319 return false;1320 }1321 1322 private boolean jj_3R_66() {1323 if (jj_scan_token(PLUS)) return true;1324 if (jj_3R_15()) return true;1325 if (jj_3R_43()) return true;1326 if (jj_3R_15()) return true;1327 return false;1328 }1329 1330 1348 private boolean jj_3R_53() { 1331 1349 Token xsp; … … 1338 1356 } 1339 1357 1340 private boolean jj_3R_52() { 1341 Token xsp; 1342 if (jj_3R_66()) return true; 1343 while (true) { 1344 xsp = jj_scanpos; 1345 if (jj_3R_66()) { jj_scanpos = xsp; break; } 1346 } 1347 return false; 1348 } 1349 1350 private boolean jj_3R_44() { 1358 private boolean jj_3R_45() { 1351 1359 Token xsp; 1352 1360 xsp = jj_scanpos; 1353 if (jj_3R_52()) {1354 jj_scanpos = xsp;1355 1361 if (jj_3R_53()) { 1356 1362 jj_scanpos = xsp; … … 1373 1379 if (jj_3R_62()) { 1374 1380 jj_scanpos = xsp; 1375 if (jj_3R_63()) return true; 1376 } 1377 } 1378 } 1379 } 1380 } 1381 } 1382 } 1383 } 1384 } 1385 } 1386 } 1387 return false; 1388 } 1389 1390 private boolean jj_3R_45() { 1381 if (jj_3R_63()) { 1382 jj_scanpos = xsp; 1383 if (jj_3R_64()) return true; 1384 } 1385 } 1386 } 1387 } 1388 } 1389 } 1390 } 1391 } 1392 } 1393 } 1394 } 1395 return false; 1396 } 1397 1398 private boolean jj_3R_46() { 1391 1399 if (jj_scan_token(STRING)) return true; 1392 1400 return false; 1393 1401 } 1394 1402 1403 private boolean jj_3R_32() { 1404 if (jj_scan_token(EQUAL)) return true; 1405 Token xsp; 1406 xsp = jj_scanpos; 1407 if (jj_3R_47()) { 1408 jj_scanpos = xsp; 1409 if (jj_3R_48()) return true; 1410 } 1411 return false; 1412 } 1413 1395 1414 private boolean jj_3R_31() { 1396 if (jj_scan_token(EQUAL)) return true;1397 Token xsp;1398 xsp = jj_scanpos;1399 if (jj_3R_46()) {1400 jj_scanpos = xsp;1401 if (jj_3R_47()) return true;1402 }1403 return false;1404 }1405 1406 private boolean jj_3R_30() {1407 1415 if (jj_scan_token(EXCLAMATION)) return true; 1408 1416 if (jj_scan_token(EQUAL)) return true; … … 1411 1419 } 1412 1420 1413 private boolean jj_3R_4 8() {1421 private boolean jj_3R_49() { 1414 1422 if (jj_scan_token(MINUS)) return true; 1415 if (jj_3R_2 2()) return true;1416 return false; 1417 } 1418 1419 private boolean jj_3R_4 0() {1423 if (jj_3R_23()) return true; 1424 return false; 1425 } 1426 1427 private boolean jj_3R_41() { 1420 1428 Token xsp; 1421 1429 xsp = jj_scanpos; 1422 if (jj_3R_48()) { 1423 jj_scanpos = xsp; 1424 if (jj_3R_49()) return true; 1430 if (jj_3R_49()) { 1431 jj_scanpos = xsp; 1432 if (jj_3R_50()) return true; 1433 } 1434 return false; 1435 } 1436 1437 private boolean jj_3R_28() { 1438 if (jj_3R_44()) return true; 1439 if (jj_3R_15()) return true; 1440 Token xsp; 1441 xsp = jj_scanpos; 1442 if (jj_3R_45()) jj_scanpos = xsp; 1443 return false; 1444 } 1445 1446 private boolean jj_3R_21() { 1447 Token xsp; 1448 xsp = jj_scanpos; 1449 if (jj_3R_31()) { 1450 jj_scanpos = xsp; 1451 if (jj_3R_32()) { 1452 jj_scanpos = xsp; 1453 if (jj_3R_33()) { 1454 jj_scanpos = xsp; 1455 if (jj_3R_34()) { 1456 jj_scanpos = xsp; 1457 if (jj_3R_35()) { 1458 jj_scanpos = xsp; 1459 if (jj_3R_36()) return true; 1460 } 1461 } 1462 } 1463 } 1425 1464 } 1426 1465 return false; … … 1428 1467 1429 1468 private boolean jj_3R_27() { 1430 if (jj_3R_43()) return true; 1431 if (jj_3R_15()) return true; 1432 Token xsp; 1433 xsp = jj_scanpos; 1434 if (jj_3R_44()) jj_scanpos = xsp; 1435 return false; 1436 } 1437 1438 private boolean jj_3R_20() { 1439 Token xsp; 1440 xsp = jj_scanpos; 1441 if (jj_3R_30()) { 1442 jj_scanpos = xsp; 1443 if (jj_3R_31()) { 1444 jj_scanpos = xsp; 1445 if (jj_3R_32()) { 1446 jj_scanpos = xsp; 1447 if (jj_3R_33()) { 1448 jj_scanpos = xsp; 1449 if (jj_3R_34()) { 1450 jj_scanpos = xsp; 1451 if (jj_3R_35()) return true; 1452 } 1453 } 1454 } 1455 } 1456 } 1469 if (jj_scan_token(MINUS)) return true; 1470 if (jj_3R_15()) return true; 1471 if (jj_3R_44()) return true; 1472 if (jj_3R_15()) return true; 1457 1473 return false; 1458 1474 } 1459 1475 1460 1476 private boolean jj_3R_26() { 1461 if (jj_scan_token( MINUS)) return true;1462 if (jj_3R_15()) return true; 1463 if (jj_3R_4 3()) return true;1464 if (jj_3R_15()) return true; 1465 return false; 1466 } 1467 1468 private boolean jj_3R_2 2() {1477 if (jj_scan_token(EXCLAMATION)) return true; 1478 if (jj_3R_15()) return true; 1479 if (jj_3R_44()) return true; 1480 if (jj_3R_15()) return true; 1481 return false; 1482 } 1483 1484 private boolean jj_3R_23() { 1469 1485 Token xsp; 1470 1486 xsp = jj_scanpos; … … 1476 1492 } 1477 1493 1478 private boolean jj_3R_25() {1479 if (jj_scan_token(EXCLAMATION)) return true;1480 if (jj_3R_15()) return true;1481 if (jj_3R_43()) return true;1482 if (jj_3R_15()) return true;1483 return false;1484 }1485 1486 1494 private boolean jj_3R_16() { 1487 1495 Token xsp; 1488 1496 xsp = jj_scanpos; 1489 if (jj_3R_25()) {1490 jj_scanpos = xsp;1491 1497 if (jj_3R_26()) { 1492 1498 jj_scanpos = xsp; 1493 if (jj_3R_27()) return true; 1499 if (jj_3R_27()) { 1500 jj_scanpos = xsp; 1501 if (jj_3R_28()) return true; 1494 1502 } 1495 1503 } … … 1512 1520 Token xsp; 1513 1521 xsp = jj_scanpos; 1514 if (jj_3R_20()) { 1515 jj_scanpos = xsp; 1516 if (jj_3R_21()) return true; 1517 } 1522 if (jj_3R_21()) { 1523 jj_scanpos = xsp; 1524 if (jj_3R_22()) return true; 1525 } 1526 return false; 1527 } 1528 1529 private boolean jj_3R_75() { 1530 if (jj_scan_token(HEXCOLOR)) return true; 1518 1531 return false; 1519 1532 } 1520 1533 1521 1534 private boolean jj_3R_74() { 1522 if (jj_scan_token(HEXCOLOR)) return true; 1523 return false; 1524 } 1525 1526 private boolean jj_3R_73() { 1527 if (jj_3R_22()) return true; 1535 if (jj_3R_23()) return true; 1528 1536 return false; 1529 1537 } … … 1541 1549 } 1542 1550 1551 private boolean jj_3R_73() { 1552 if (jj_scan_token(PLUS)) return true; 1553 if (jj_3R_23()) return true; 1554 return false; 1555 } 1556 1543 1557 private boolean jj_3R_72() { 1544 if (jj_scan_token(PLUS)) return true;1545 if (jj_3R_22()) return true;1546 return false;1547 }1548 1549 private boolean jj_3R_71() {1550 1558 if (jj_3R_19()) return true; 1551 1559 return false; 1552 1560 } 1553 1561 1554 private boolean jj_3R_6 5() {1562 private boolean jj_3R_66() { 1555 1563 Token xsp; 1556 1564 xsp = jj_scanpos; 1557 if (jj_3R_71()) {1558 jj_scanpos = xsp;1559 1565 if (jj_3R_72()) { 1560 1566 jj_scanpos = xsp; 1561 1567 if (jj_3R_73()) { 1562 1568 jj_scanpos = xsp; 1563 if (jj_3R_74()) return true; 1564 } 1565 } 1566 } 1569 if (jj_3R_74()) { 1570 jj_scanpos = xsp; 1571 if (jj_3R_75()) return true; 1572 } 1573 } 1574 } 1575 return false; 1576 } 1577 1578 private boolean jj_3R_20() { 1579 if (jj_scan_token(QUESTION)) return true; 1567 1580 return false; 1568 1581 } … … 1578 1591 if (jj_3R_18()) jj_scanpos = xsp; 1579 1592 if (jj_3R_19()) return true; 1580 return false; 1581 } 1582 1583 private boolean jj_3R_23() { 1593 xsp = jj_scanpos; 1594 if (jj_3R_20()) jj_scanpos = xsp; 1595 return false; 1596 } 1597 1598 private boolean jj_3R_24() { 1584 1599 if (jj_scan_token(COMMA)) return true; 1585 if (jj_3R_4 1()) return true;1586 if (jj_3R_2 2()) return true;1587 return false; 1588 } 1589 1590 private boolean jj_3R_7 5() {1600 if (jj_3R_42()) return true; 1601 if (jj_3R_23()) return true; 1602 return false; 1603 } 1604 1605 private boolean jj_3R_76() { 1591 1606 if (jj_scan_token(COMMA)) return true; 1592 1607 if (jj_3R_15()) return true; … … 1595 1610 } 1596 1611 1597 private boolean jj_3R_14() { 1598 if (jj_3R_22()) return true; 1599 Token xsp; 1600 if (jj_3R_23()) return true; 1612 private boolean jj_3R_71() { 1613 if (jj_3R_16()) return true; 1614 Token xsp; 1601 1615 while (true) { 1602 1616 xsp = jj_scanpos; 1603 if (jj_3R_23()) { jj_scanpos = xsp; break; } 1604 } 1605 return false; 1606 } 1607 1608 private boolean jj_3R_70() { 1609 if (jj_3R_16()) return true; 1610 Token xsp; 1617 if (jj_3R_76()) { jj_scanpos = xsp; break; } 1618 } 1619 return false; 1620 } 1621 1622 private boolean jj_3R_14() { 1623 if (jj_3R_23()) return true; 1624 Token xsp; 1625 if (jj_3R_24()) return true; 1611 1626 while (true) { 1612 1627 xsp = jj_scanpos; 1613 if (jj_3R_ 75()) { jj_scanpos = xsp; break; }1628 if (jj_3R_24()) { jj_scanpos = xsp; break; } 1614 1629 } 1615 1630 return false; … … 1622 1637 } 1623 1638 1624 private boolean jj_3R_4 2() {1639 private boolean jj_3R_43() { 1625 1640 if (jj_scan_token(COMMENT_START)) return true; 1626 1641 if (jj_scan_token(COMMENT_END)) return true; … … 1631 1646 if (jj_3R_12()) return true; 1632 1647 if (jj_scan_token(RSQUARE)) return true; 1648 return false; 1649 } 1650 1651 private boolean jj_3R_17() { 1652 if (jj_scan_token(IDENT)) return true; 1653 if (jj_3R_15()) return true; 1654 if (jj_scan_token(LPAR)) return true; 1655 if (jj_3R_15()) return true; 1656 Token xsp; 1657 xsp = jj_scanpos; 1658 if (jj_3R_71()) jj_scanpos = xsp; 1659 if (jj_scan_token(RPAR)) return true; 1633 1660 return false; 1634 1661 } … … 1645 1672 private int jj_la; 1646 1673 private int jj_gen; 1647 final private int[] jj_la1 = new int[4 0];1674 final private int[] jj_la1 = new int[41]; 1648 1675 static private int[] jj_la1_0; 1649 1676 static private int[] jj_la1_1; … … 1653 1680 } 1654 1681 private static void jj_la1_init_0() { 1655 jj_la1_0 = new int[] {0xc,0xc,0x12,0x200,0x200,0x200,0x10000000,0x402,0x10000000,0x402,0x40000000,0x2804000,0x2804000,0x4000000,0x4,0x0,0x4,0x8081011e,0x800000,0x 1000012,0x1c00400,0x3c0000,0x1fc0400,0x800000,0x402,0x2,0x8002000,0x8002000,0x80000000,0x400,0x0,0x800,0x400000,0xa07c0c00,0xa07c0c00,0x8081011e,0x8001011e,0x10000000,0x8081011e,0x8000011e,};1682 jj_la1_0 = new int[] {0xc,0xc,0x12,0x200,0x200,0x200,0x10000000,0x402,0x10000000,0x402,0x40000000,0x2804000,0x2804000,0x4000000,0x4,0x0,0x4,0x8081011e,0x800000,0x0,0x1000012,0x1c00400,0x3c0000,0x1fc0400,0x800000,0x402,0x2,0x8002000,0x8002000,0x80000000,0x400,0x0,0x800,0x400000,0xa07c0c00,0xa07c0c00,0x8081011e,0x8001011e,0x10000000,0x8081011e,0x8000011e,}; 1656 1683 } 1657 1684 private static void jj_la1_init_1() { 1658 jj_la1_1 = new int[] {0x0,0x1,0x0,0x0,0x20,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x1,0x0,0x 0,0x18,0x0,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x7,0x7,0x1,0x0,0x0,0x1,0x0,};1685 jj_la1_1 = new int[] {0x0,0x1,0x0,0x0,0x20,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x1,0x0,0x4,0x0,0x18,0x0,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x7,0x7,0x1,0x0,0x0,0x1,0x0,}; 1659 1686 } 1660 1687 final private JJCalls[] jj_2_rtns = new JJCalls[5]; … … 1673 1700 jj_ntk = -1; 1674 1701 jj_gen = 0; 1675 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1702 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1676 1703 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1677 1704 } … … 1688 1715 jj_ntk = -1; 1689 1716 jj_gen = 0; 1690 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1717 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1691 1718 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1692 1719 } … … 1699 1726 jj_ntk = -1; 1700 1727 jj_gen = 0; 1701 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1728 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1702 1729 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1703 1730 } … … 1710 1737 jj_ntk = -1; 1711 1738 jj_gen = 0; 1712 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1739 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1713 1740 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1714 1741 } … … 1720 1747 jj_ntk = -1; 1721 1748 jj_gen = 0; 1722 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1749 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1723 1750 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1724 1751 } … … 1730 1757 jj_ntk = -1; 1731 1758 jj_gen = 0; 1732 for (int i = 0; i < 4 0; i++) jj_la1[i] = -1;1759 for (int i = 0; i < 41; i++) jj_la1[i] = -1; 1733 1760 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); 1734 1761 } … … 1847 1874 jj_kind = -1; 1848 1875 } 1849 for (int i = 0; i < 4 0; i++) {1876 for (int i = 0; i < 41; i++) { 1850 1877 if (jj_la1[i] == jj_gen) { 1851 1878 for (int j = 0; j < 32; j++) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj
r3888 r3893 290 290 { 291 291 boolean not = false; 292 boolean yes = false; 292 293 String key; 293 294 } … … 295 296 ( <EXCLAMATION> { not = true; } )? 296 297 key=string_or_ident() 297 { return new Condition.KeyCondition(key, not); } 298 ( <QUESTION> { yes = true; } )? 299 { return new Condition.KeyCondition(key, not, yes); } 298 300 } 299 301 … … 504 506 JAVACODE 505 507 void error_skipto(int kind) { 508 if (token.kind == EOF) 509 throw new ParseException("Reached end of file while parsing"); 506 510 ParseException e = generateParseException(); 507 511 System.err.println("Skipping to the next rule, because of an error:"); 508 512 System.err.println(e); 509 513 if (sheet != null) { 510 sheet.logError( e);514 sheet.logError(new ParseException(e.getMessage())); 511 515 } 512 516 Token t; … … 527 531 while (true) { 528 532 t = getNextToken(); 533 if ((t.kind == S || t.kind == STRING || t.kind == UNEXPECTED_CHAR) && 534 t.image.contains("\n")) { 535 ParseException e = new ParseException(String.format("Warning: end of line while reading an unquoted string at line %s column %s.", t.beginLine, t.beginColumn)); 536 System.err.println(e); 537 if (sheet != null) { 538 sheet.logError(e); 539 } 540 } 529 541 if (t.kind == SEMICOLON || t.kind == EOF) 530 542 break; -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r3882 r3893 278 278 @Override 279 279 public void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed) { 280 Cascade def = mc.get("default"); 281 if (def == null) { 282 def = new Cascade(false); 283 mc.put("default", def); 284 } 280 Cascade def = mc.getOrCreateCascade("default"); 285 281 boolean useMinMaxScale = Main.pref.getBoolean("mappaint.zoomLevelDisplay", false); 286 282 … … 319 315 int numOver = 0, numUnder = 0; 320 316 321 while (mc. containsKey(String.format("over_%d", ++numOver))) {}322 while (mc. containsKey(String.format("under_%d", ++numUnder))) {}317 while (mc.hasLayer(String.format("over_%d", ++numOver))) {} 318 while (mc.hasLayer(String.format("under_%d", ++numUnder))) {} 323 319 324 320 for (LinemodPrototype mod : p.linemods) { … … 326 322 if (mod.over) { 327 323 String layer = String.format("over_%d", numOver); 328 c = mc.get(layer); 329 if (c == null) { 330 c = new Cascade(true); 331 mc.put(layer, c); 332 } 324 c = mc.getOrCreateCascade(layer); 333 325 c.put("object-z-index", new Float(numOver)); 334 326 ++numOver; 335 327 } else { 336 328 String layer = String.format("under_%d", numUnder); 337 c = mc.get(layer); 338 if (c == null) { 339 c = new Cascade(true); 340 mc.put(layer, c); 341 } 329 c = mc.getOrCreateCascade(layer); 342 330 c.put("object-z-index", new Float(-numUnder)); 343 331 ++numUnder;
Note:
See TracChangeset
for help on using the changeset viewer.