Changeset 3971 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-03-09T23:12:36+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.java
r3967 r3971 961 961 FunctionExpression fn; 962 962 Object lit; 963 if (jj_2_7( 2)) {964 // both function and identifier start with an identifier 963 if (jj_2_7(3)) { 964 // both function and identifier start with an identifier (+ optional whitespace) 965 965 fn = function(); 966 966 {if (true) return fn;} … … 1171 1171 } 1172 1172 1173 private boolean jj_3R_4 0() {1173 private boolean jj_3R_41() { 1174 1174 if (jj_scan_token(CARET)) return true; 1175 1175 if (jj_scan_token(EQUAL)) return true; … … 1177 1177 } 1178 1178 1179 private boolean jj_3R_ 39() {1179 private boolean jj_3R_40() { 1180 1180 if (jj_scan_token(TILDE)) return true; 1181 1181 if (jj_scan_token(EQUAL)) return true; … … 1190 1190 } 1191 1191 1192 private boolean jj_3R_5 8() {1192 private boolean jj_3R_59() { 1193 1193 if (jj_3R_28()) return true; 1194 1194 return false; 1195 1195 } 1196 1196 1197 private boolean jj_3R_39() { 1198 if (jj_scan_token(EQUAL)) return true; 1199 return false; 1200 } 1201 1197 1202 private boolean jj_3R_38() { 1198 if (jj_scan_token(EQUAL)) return true;1199 return false;1200 }1201 1202 private boolean jj_3R_37() {1203 1203 if (jj_scan_token(EXCLAMATION)) return true; 1204 1204 if (jj_scan_token(EQUAL)) return true; … … 1206 1206 } 1207 1207 1208 private boolean jj_3R_3 6() {1208 private boolean jj_3R_37() { 1209 1209 if (jj_scan_token(REGEX)) return true; 1210 1210 return false; … … 1214 1214 Token xsp; 1215 1215 xsp = jj_scanpos; 1216 if (jj_3R_37()) {1217 jj_scanpos = xsp;1218 1216 if (jj_3R_38()) { 1219 1217 jj_scanpos = xsp; … … 1224 1222 if (jj_3R_41()) { 1225 1223 jj_scanpos = xsp; 1226 if (jj_3R_42()) return true; 1224 if (jj_3R_42()) { 1225 jj_scanpos = xsp; 1226 if (jj_3R_43()) return true; 1227 1227 } 1228 1228 } … … 1234 1234 if (jj_3_3()) { 1235 1235 jj_scanpos = xsp; 1236 if (jj_3R_4 3()) {1237 jj_scanpos = xsp; 1238 if (jj_3R_4 4()) return true;1239 } 1240 } 1241 return false; 1242 } 1243 1244 private boolean jj_3R_5 5() {1236 if (jj_3R_44()) { 1237 jj_scanpos = xsp; 1238 if (jj_3R_45()) return true; 1239 } 1240 } 1241 return false; 1242 } 1243 1244 private boolean jj_3R_56() { 1245 1245 if (jj_scan_token(COLON)) return true; 1246 1246 if (jj_scan_token(IDENT)) return true; … … 1248 1248 } 1249 1249 1250 private boolean jj_3R_5 6() {1250 private boolean jj_3R_57() { 1251 1251 Token xsp; 1252 1252 xsp = jj_scanpos; 1253 if (jj_3R_7 3()) {1254 jj_scanpos = xsp; 1255 if (jj_3R_7 4()) return true;1256 } 1257 return false; 1258 } 1259 1260 private boolean jj_3R_7 3() {1253 if (jj_3R_74()) { 1254 jj_scanpos = xsp; 1255 if (jj_3R_75()) return true; 1256 } 1257 return false; 1258 } 1259 1260 private boolean jj_3R_74() { 1261 1261 if (jj_scan_token(IDENT)) return true; 1262 1262 return false; … … 1267 1267 if (jj_scan_token(TILDE)) return true; 1268 1268 if (jj_3R_14()) return true; 1269 if (jj_3R_3 6()) return true;1269 if (jj_3R_37()) return true; 1270 1270 return false; 1271 1271 } … … 1277 1277 1278 1278 private boolean jj_3R_27() { 1279 if (jj_3R_5 0()) return true;1279 if (jj_3R_51()) return true; 1280 1280 return false; 1281 1281 } … … 1308 1308 1309 1309 private boolean jj_3R_82() { 1310 if (jj_3R_5 4()) return true;1310 if (jj_3R_55()) return true; 1311 1311 return false; 1312 1312 } … … 1317 1317 } 1318 1318 1319 private boolean jj_3R_7 5() {1319 private boolean jj_3R_76() { 1320 1320 Token xsp; 1321 1321 xsp = jj_scanpos; … … 1336 1336 } 1337 1337 1338 private boolean jj_3R_5 4() {1338 private boolean jj_3R_55() { 1339 1339 if (jj_scan_token(STRING)) return true; 1340 1340 return false; … … 1346 1346 } 1347 1347 1348 private boolean jj_3R_ 49() {1348 private boolean jj_3R_50() { 1349 1349 Token xsp; 1350 1350 xsp = jj_scanpos; 1351 if (jj_3R_5 7()) {1352 jj_scanpos = xsp; 1353 if (jj_3R_5 8()) return true;1354 } 1355 return false; 1356 } 1357 1358 private boolean jj_3R_5 7() {1351 if (jj_3R_58()) { 1352 jj_scanpos = xsp; 1353 if (jj_3R_59()) return true; 1354 } 1355 return false; 1356 } 1357 1358 private boolean jj_3R_58() { 1359 1359 if (jj_scan_token(MINUS)) return true; 1360 1360 if (jj_3R_28()) return true; … … 1384 1384 } 1385 1385 1386 private boolean jj_3R_ 80() {1386 private boolean jj_3R_34() { 1387 1387 if (jj_3R_19()) return true; 1388 1388 Token xsp; … … 1404 1404 } 1405 1405 1406 private boolean jj_3R_3 5() {1406 private boolean jj_3R_36() { 1407 1407 if (jj_scan_token(IDENT)) return true; 1408 1408 Token xsp; 1409 1409 while (true) { 1410 1410 xsp = jj_scanpos; 1411 if (jj_3R_5 5()) { jj_scanpos = xsp; break; }1412 } 1413 return false; 1414 } 1415 1416 private boolean jj_3R_3 4() {1417 if (jj_3R_5 4()) return true;1411 if (jj_3R_56()) { jj_scanpos = xsp; break; } 1412 } 1413 return false; 1414 } 1415 1416 private boolean jj_3R_35() { 1417 if (jj_3R_55()) return true; 1418 1418 return false; 1419 1419 } … … 1422 1422 Token xsp; 1423 1423 xsp = jj_scanpos; 1424 if (jj_3R_3 4()) {1425 jj_scanpos = xsp; 1426 if (jj_3R_3 5()) return true;1424 if (jj_3R_35()) { 1425 jj_scanpos = xsp; 1426 if (jj_3R_36()) return true; 1427 1427 } 1428 1428 return false; … … 1436 1436 Token xsp; 1437 1437 xsp = jj_scanpos; 1438 if (jj_3R_ 80()) jj_scanpos = xsp;1438 if (jj_3R_34()) jj_scanpos = xsp; 1439 1439 if (jj_scan_token(RPAR)) return true; 1440 1440 return false; … … 1457 1457 private boolean jj_3R_26() { 1458 1458 if (jj_scan_token(MINUS)) return true; 1459 if (jj_3R_5 0()) return true;1459 if (jj_3R_51()) return true; 1460 1460 return false; 1461 1461 } … … 1471 1471 } 1472 1472 1473 private boolean jj_3R_6 0() {1473 private boolean jj_3R_61() { 1474 1474 if (jj_scan_token(LPAR)) return true; 1475 1475 if (jj_3R_18()) return true; … … 1479 1479 } 1480 1480 1481 private boolean jj_3R_ 59() {1482 if (jj_3R_7 5()) return true;1483 return false; 1484 } 1485 1486 private boolean jj_3R_5 0() {1481 private boolean jj_3R_60() { 1482 if (jj_3R_76()) return true; 1483 return false; 1484 } 1485 1486 private boolean jj_3R_51() { 1487 1487 if (jj_scan_token(UINT)) return true; 1488 1488 return false; … … 1494 1494 } 1495 1495 1496 private boolean jj_3R_5 2() {1496 private boolean jj_3R_53() { 1497 1497 Token xsp; 1498 1498 xsp = jj_scanpos; 1499 1499 if (jj_3_7()) { 1500 1500 jj_scanpos = xsp; 1501 if (jj_3R_59()) { 1502 jj_scanpos = xsp; 1503 if (jj_3R_60()) return true; 1504 } 1505 } 1501 if (jj_3R_60()) { 1502 jj_scanpos = xsp; 1503 if (jj_3R_61()) return true; 1504 } 1505 } 1506 return false; 1507 } 1508 1509 private boolean jj_3R_73() { 1510 if (jj_scan_token(QUESTION)) return true; 1511 if (jj_3R_18()) return true; 1512 if (jj_3R_53()) return true; 1513 if (jj_3R_18()) return true; 1514 if (jj_scan_token(COLON)) return true; 1515 if (jj_3R_18()) return true; 1516 if (jj_3R_53()) return true; 1517 if (jj_3R_18()) return true; 1506 1518 return false; 1507 1519 } 1508 1520 1509 1521 private boolean jj_3R_72() { 1510 if (jj_scan_token(QUESTION)) return true;1511 if (jj_3R_18()) return true;1512 if (jj_3R_52()) return true;1513 if (jj_3R_18()) return true;1514 if (jj_scan_token(COLON)) return true;1515 if (jj_3R_18()) return true;1516 if (jj_3R_52()) return true;1517 if (jj_3R_18()) return true;1518 return false;1519 }1520 1521 private boolean jj_3R_71() {1522 1522 if (jj_scan_token(PIPE)) return true; 1523 1523 if (jj_scan_token(PIPE)) return true; 1524 1524 if (jj_3R_18()) return true; 1525 if (jj_3R_5 2()) return true;1526 if (jj_3R_18()) return true; 1527 return false; 1528 } 1529 1530 private boolean jj_3R_7 0() {1525 if (jj_3R_53()) return true; 1526 if (jj_3R_18()) return true; 1527 return false; 1528 } 1529 1530 private boolean jj_3R_71() { 1531 1531 if (jj_scan_token(AMPERSAND)) return true; 1532 1532 if (jj_scan_token(AMPERSAND)) return true; 1533 1533 if (jj_3R_18()) return true; 1534 if (jj_3R_52()) return true; 1534 if (jj_3R_53()) return true; 1535 if (jj_3R_18()) return true; 1536 return false; 1537 } 1538 1539 private boolean jj_3R_70() { 1540 if (jj_scan_token(LESS)) return true; 1541 if (jj_3R_18()) return true; 1542 if (jj_3R_53()) return true; 1535 1543 if (jj_3R_18()) return true; 1536 1544 return false; … … 1538 1546 1539 1547 private boolean jj_3R_69() { 1540 if (jj_scan_token(LESS)) return true;1541 if (jj_3R_18()) return true;1542 if (jj_3R_52()) return true;1543 if (jj_3R_18()) return true;1544 return false;1545 }1546 1547 private boolean jj_3R_68() {1548 1548 if (jj_scan_token(EQUAL)) return true; 1549 1549 Token xsp; … … 1551 1551 if (jj_scan_token(22)) jj_scanpos = xsp; 1552 1552 if (jj_3R_18()) return true; 1553 if (jj_3R_52()) return true; 1553 if (jj_3R_53()) return true; 1554 if (jj_3R_18()) return true; 1555 return false; 1556 } 1557 1558 private boolean jj_3R_68() { 1559 if (jj_scan_token(GREATER)) return true; 1560 if (jj_3R_18()) return true; 1561 if (jj_3R_53()) return true; 1554 1562 if (jj_3R_18()) return true; 1555 1563 return false; … … 1557 1565 1558 1566 private boolean jj_3R_67() { 1559 if (jj_scan_token(GREATER)) return true; 1560 if (jj_3R_18()) return true; 1561 if (jj_3R_52()) return true; 1567 if (jj_scan_token(LESS_EQUAL)) return true; 1568 if (jj_3R_18()) return true; 1569 if (jj_3R_53()) return true; 1570 if (jj_3R_18()) return true; 1571 return false; 1572 } 1573 1574 private boolean jj_3R_80() { 1575 if (jj_scan_token(SLASH)) return true; 1576 if (jj_3R_18()) return true; 1577 if (jj_3R_53()) return true; 1562 1578 if (jj_3R_18()) return true; 1563 1579 return false; … … 1565 1581 1566 1582 private boolean jj_3R_66() { 1567 if (jj_scan_token( LESS_EQUAL)) return true;1568 if (jj_3R_18()) return true; 1569 if (jj_3R_5 2()) return true;1583 if (jj_scan_token(GREATER_EQUAL)) return true; 1584 if (jj_3R_18()) return true; 1585 if (jj_3R_53()) return true; 1570 1586 if (jj_3R_18()) return true; 1571 1587 return false; … … 1573 1589 1574 1590 private boolean jj_3R_79() { 1575 if (jj_scan_token( SLASH)) return true;1576 if (jj_3R_18()) return true; 1577 if (jj_3R_5 2()) return true;1591 if (jj_scan_token(MINUS)) return true; 1592 if (jj_3R_18()) return true; 1593 if (jj_3R_53()) return true; 1578 1594 if (jj_3R_18()) return true; 1579 1595 return false; … … 1581 1597 1582 1598 private boolean jj_3R_65() { 1583 if (jj_scan_token(GREATER_EQUAL)) return true; 1584 if (jj_3R_18()) return true; 1585 if (jj_3R_52()) return true; 1586 if (jj_3R_18()) return true; 1599 Token xsp; 1600 if (jj_3R_80()) return true; 1601 while (true) { 1602 xsp = jj_scanpos; 1603 if (jj_3R_80()) { jj_scanpos = xsp; break; } 1604 } 1587 1605 return false; 1588 1606 } 1589 1607 1590 1608 private boolean jj_3R_78() { 1591 if (jj_scan_token( MINUS)) return true;1592 if (jj_3R_18()) return true; 1593 if (jj_3R_5 2()) return true;1609 if (jj_scan_token(STAR)) return true; 1610 if (jj_3R_18()) return true; 1611 if (jj_3R_53()) return true; 1594 1612 if (jj_3R_18()) return true; 1595 1613 return false; … … 1607 1625 1608 1626 private boolean jj_3R_77() { 1609 if (jj_scan_token( STAR)) return true;1610 if (jj_3R_18()) return true; 1611 if (jj_3R_5 2()) return true;1627 if (jj_scan_token(PLUS)) return true; 1628 if (jj_3R_18()) return true; 1629 if (jj_3R_53()) return true; 1612 1630 if (jj_3R_18()) return true; 1613 1631 return false; … … 1624 1642 } 1625 1643 1626 private boolean jj_3R_76() { 1627 if (jj_scan_token(PLUS)) return true; 1628 if (jj_3R_18()) return true; 1629 if (jj_3R_52()) return true; 1630 if (jj_3R_18()) return true; 1644 private boolean jj_3R_54() { 1645 Token xsp; 1646 xsp = jj_scanpos; 1647 if (jj_3R_62()) { 1648 jj_scanpos = xsp; 1649 if (jj_3R_63()) { 1650 jj_scanpos = xsp; 1651 if (jj_3R_64()) { 1652 jj_scanpos = xsp; 1653 if (jj_3R_65()) { 1654 jj_scanpos = xsp; 1655 if (jj_3R_66()) { 1656 jj_scanpos = xsp; 1657 if (jj_3R_67()) { 1658 jj_scanpos = xsp; 1659 if (jj_3R_68()) { 1660 jj_scanpos = xsp; 1661 if (jj_3R_69()) { 1662 jj_scanpos = xsp; 1663 if (jj_3R_70()) { 1664 jj_scanpos = xsp; 1665 if (jj_3R_71()) { 1666 jj_scanpos = xsp; 1667 if (jj_3R_72()) { 1668 jj_scanpos = xsp; 1669 if (jj_3R_73()) return true; 1670 } 1671 } 1672 } 1673 } 1674 } 1675 } 1676 } 1677 } 1678 } 1679 } 1680 } 1631 1681 return false; 1632 1682 } … … 1642 1692 } 1643 1693 1644 private boolean jj_3R_53() { 1694 private boolean jj_3R_33() { 1695 if (jj_3R_53()) return true; 1696 if (jj_3R_18()) return true; 1645 1697 Token xsp; 1646 1698 xsp = jj_scanpos; 1647 if (jj_3R_61()) { 1648 jj_scanpos = xsp; 1649 if (jj_3R_62()) { 1650 jj_scanpos = xsp; 1651 if (jj_3R_63()) { 1652 jj_scanpos = xsp; 1653 if (jj_3R_64()) { 1654 jj_scanpos = xsp; 1655 if (jj_3R_65()) { 1656 jj_scanpos = xsp; 1657 if (jj_3R_66()) { 1658 jj_scanpos = xsp; 1659 if (jj_3R_67()) { 1660 jj_scanpos = xsp; 1661 if (jj_3R_68()) { 1662 jj_scanpos = xsp; 1663 if (jj_3R_69()) { 1664 jj_scanpos = xsp; 1665 if (jj_3R_70()) { 1666 jj_scanpos = xsp; 1667 if (jj_3R_71()) { 1668 jj_scanpos = xsp; 1669 if (jj_3R_72()) return true; 1670 } 1671 } 1672 } 1673 } 1674 } 1675 } 1676 } 1677 } 1678 } 1679 } 1680 } 1681 return false; 1682 } 1683 1684 private boolean jj_3R_61() { 1685 Token xsp; 1686 if (jj_3R_76()) return true; 1687 while (true) { 1688 xsp = jj_scanpos; 1689 if (jj_3R_76()) { jj_scanpos = xsp; break; } 1690 } 1691 return false; 1692 } 1693 1694 private boolean jj_3R_33() { 1695 if (jj_3R_52()) return true; 1696 if (jj_3R_18()) return true; 1697 Token xsp; 1698 xsp = jj_scanpos; 1699 if (jj_3R_53()) jj_scanpos = xsp; 1699 if (jj_3R_54()) jj_scanpos = xsp; 1700 1700 return false; 1701 1701 } … … 1704 1704 if (jj_scan_token(MINUS)) return true; 1705 1705 if (jj_3R_18()) return true; 1706 if (jj_3R_5 2()) return true;1706 if (jj_3R_53()) return true; 1707 1707 if (jj_3R_18()) return true; 1708 1708 return false; … … 1712 1712 if (jj_scan_token(EXCLAMATION)) return true; 1713 1713 if (jj_3R_18()) return true; 1714 if (jj_3R_5 2()) return true;1714 if (jj_3R_53()) return true; 1715 1715 if (jj_3R_18()) return true; 1716 1716 return false; … … 1760 1760 } 1761 1761 1762 private boolean jj_3R_49() { 1763 if (jj_scan_token(LESS)) return true; 1764 return false; 1765 } 1766 1762 1767 private boolean jj_3R_48() { 1763 if (jj_scan_token(LESS)) return true;1764 return false;1765 }1766 1767 private boolean jj_3R_47() {1768 1768 if (jj_scan_token(LESS_EQUAL)) return true; 1769 1769 return false; … … 1781 1781 } 1782 1782 1783 private boolean jj_3R_47() { 1784 if (jj_scan_token(GREATER)) return true; 1785 return false; 1786 } 1787 1788 private boolean jj_3R_45() { 1789 if (jj_3R_57()) return true; 1790 return false; 1791 } 1792 1783 1793 private boolean jj_3R_46() { 1784 if (jj_scan_token(GREATER)) return true;1785 return false;1786 }1787 1788 private boolean jj_3R_44() {1789 if (jj_3R_56()) return true;1790 return false;1791 }1792 1793 private boolean jj_3R_45() {1794 1794 if (jj_scan_token(GREATER_EQUAL)) return true; 1795 1795 return false; 1796 1796 } 1797 1797 1798 private boolean jj_3R_5 1() {1798 private boolean jj_3R_52() { 1799 1799 if (jj_scan_token(COMMENT_START)) return true; 1800 1800 if (jj_scan_token(COMMENT_END)) return true; … … 1802 1802 } 1803 1803 1804 private boolean jj_3R_4 3() {1805 if (jj_3R_ 49()) return true;1806 return false; 1807 } 1808 1809 private boolean jj_3R_7 4() {1810 if (jj_3R_5 4()) return true;1804 private boolean jj_3R_44() { 1805 if (jj_3R_50()) return true; 1806 return false; 1807 } 1808 1809 private boolean jj_3R_75() { 1810 if (jj_3R_55()) return true; 1811 1811 return false; 1812 1812 } … … 1817 1817 if (jj_scan_token(9)) { 1818 1818 jj_scanpos = xsp; 1819 if (jj_3R_5 1()) return true;1819 if (jj_3R_52()) return true; 1820 1820 } 1821 1821 return false; … … 1825 1825 Token xsp; 1826 1826 xsp = jj_scanpos; 1827 if (jj_3R_45()) {1828 jj_scanpos = xsp;1829 1827 if (jj_3R_46()) { 1830 1828 jj_scanpos = xsp; 1831 1829 if (jj_3R_47()) { 1832 1830 jj_scanpos = xsp; 1833 if (jj_3R_48()) return true; 1831 if (jj_3R_48()) { 1832 jj_scanpos = xsp; 1833 if (jj_3R_49()) return true; 1834 1834 } 1835 1835 } 1836 1836 } 1837 1837 if (jj_3R_14()) return true; 1838 if (jj_3R_ 49()) return true;1838 if (jj_3R_50()) return true; 1839 1839 return false; 1840 1840 } … … 1854 1854 } 1855 1855 1856 private boolean jj_3R_4 2() {1856 private boolean jj_3R_43() { 1857 1857 if (jj_scan_token(STAR)) return true; 1858 1858 if (jj_scan_token(EQUAL)) return true; … … 1860 1860 } 1861 1861 1862 private boolean jj_3R_4 1() {1862 private boolean jj_3R_42() { 1863 1863 if (jj_scan_token(DOLLAR)) return true; 1864 1864 if (jj_scan_token(EQUAL)) return true; -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj
r3967 r3971 496 496 } 497 497 { 498 LOOKAHEAD( 2) // both function and identifier start with an identifier498 LOOKAHEAD(3) // both function and identifier start with an identifier (+ optional whitespace) 499 499 fn=function() { return fn; } 500 500 |
Note:
See TracChangeset
for help on using the changeset viewer.