Changeset 35285 in osm for applications/editors/josm/plugins/comfort0/src/net
- Timestamp:
- 2020-01-13T21:45:18+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/comfort0/src/net/simon04/comfort0/level0l/Level0LParser.jj
r35284 r35285 46 46 | <EQ: "=" > : VALUE 47 47 | <IDENT: ["a"-"z", "A"-"Z", "_"] (["a"-"z", "A"-"Z", "_", "-", "0"-"9"])* > 48 | <D_COMMENT_START: "#"> : COMMENT 48 49 } 49 50 … … 69 70 lon=<FLOAT> 70 71 { r.setCoor(new LatLon(Double.parseDouble(lat.image), Double.parseDouble(lon.image))); } 71 (<COMMENT_START> | <H_EOL>) 72 tags(r)72 ( <COMMENT_START> | <H_EOL> ) 73 ( tag(r) )* 73 74 { return r; } 74 75 } 75 76 76 void tags(PrimitiveData r): 77 WayData way(): 78 { 79 WayData r; 80 Token id; 81 } 82 { 83 <WAY> 84 { r = new WayData(); } 85 id=<H_ID> 86 { r.setId(Long.parseLong(id.image)); } 87 ( <COMMENT_START> | <H_EOL> ) 88 way_data(r) 89 { return r; } 90 } 91 92 void way_data(WayData r): 77 93 {} 78 94 { 95 LOOKAHEAD(3) 96 ( way_node(r) way_data(r) ) // TODO avoid recursive call to way_data 97 | 79 98 ( tag(r) )* 99 } 100 101 void way_node(WayData r): 102 { 103 Token id; 104 } 105 { 106 <D_SPACE> <D_SPACE> 107 <ND> 108 ( <D_SPACE> )+ 109 id=<D_ID> 110 { r.getNodeIds().add(Long.parseLong(id.image)); } 111 ( <D_SPACE> )* 112 ( <D_COMMENT_START> | <D_EOL> ) 80 113 } 81 114
Note:
See TracChangeset
for help on using the changeset viewer.