Changeset 35290 in osm


Ignore:
Timestamp:
2020-01-13T21:45:32+01:00 (5 years ago)
Author:
simon04
Message:

JOSM/comfort0: parse multiple primitives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/comfort0/src/net/simon04/comfort0/level0l/Level0LParser.jj

    r35288 r35290  
    88import org.openstreetmap.josm.data.osm.*;
    99import org.openstreetmap.josm.data.coor.*;
     10import java.util.ArrayList;
     11import java.util.List;
    1012public class Level0LParser {
    1113}
     
    5355    <V_EOL: ("\n" | "\r" | "\r\n") > : DATA
    5456    | <TEXT: (~["\n", "\r"])+ >
     57}
     58
     59List<PrimitiveData> primitives():
     60{
     61    List<PrimitiveData> primitives = new ArrayList<PrimitiveData>();
     62    PrimitiveData p;
     63}
     64{
     65    (
     66        ( p = node() | p = way() | p = relation() )
     67        { primitives.add(p); }
     68    )*
     69    <EOF>
     70    { return primitives; }
    5571}
    5672
Note: See TracChangeset for help on using the changeset viewer.