Changeset 35288 in osm for applications/editors/josm/plugins/comfort0/src
- Timestamp:
- 2020-01-13T21:45:26+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/comfort0/src/net/simon04/comfort0/level0l/Level0LParser.jj
r35287 r35288 90 90 } 91 91 92 RelationData relation(): 93 { 94 RelationData r; 95 Token id; 96 } 97 { 98 <RELATION> 99 { r = new RelationData(); } 100 id=<H_ID> 101 { r.setId(Long.parseLong(id.image)); } 102 ( <COMMENT_START> <C_EOL> | <H_EOL> ) 103 relation_data(r) 104 { return r; } 105 } 106 92 107 void way_data(WayData r): 93 108 {} … … 112 127 } 113 128 129 void relation_data(RelationData r): 130 {} 131 { 132 ( 133 <D_SPACE> <D_SPACE> 134 ( relation_member(r) | tag(r) ) 135 )* 136 } 137 138 void relation_member(RelationData r): 139 { 140 OsmPrimitiveType type; 141 Token id; 142 Token role = null; 143 } 144 { 145 ( 146 <ND> { type = OsmPrimitiveType.NODE; } 147 | 148 <WY> { type = OsmPrimitiveType.WAY; } 149 | 150 <REL> { type = OsmPrimitiveType.RELATION; } 151 ) 152 <D_SPACE> 153 id=<D_ID> 154 ( 155 <D_SPACE> 156 ( 157 role=<IDENT> ( <D_SPACE> )* 158 | 159 ( <D_SPACE> )* 160 ) 161 )? 162 { r.getMembers().add(new RelationMemberData(role != null ? role.image : "", type, Long.parseLong(id.image))); } 163 ( <D_COMMENT_START> <C_EOL> | <D_EOL> ) 164 } 165 114 166 void tag(PrimitiveData r): 115 167 {
Note:
See TracChangeset
for help on using the changeset viewer.