Java 类org.yaml.snakeyaml.parser.Parser 实例源码

项目:AndroidApktool    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:snakeyaml    文件:PyImportTest.java   
protected List<Event> parse(InputStream input) throws IOException {
    StreamReader reader = new StreamReader(new UnicodeReader(input));
    Parser parser = new ParserImpl(reader);
    List<Event> result = new ArrayList<Event>();
    while (parser.peekEvent() != null) {
        result.add(parser.getEvent());
    }
    input.close();
    return result;
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:org.openntf.domino    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(final Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        @Override
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        @Override
        public Event next() {
            return parser.getEvent();
        }

        @Override
        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new EventIterable(result);
}
项目:snake-yaml    文件:ConstructorMappingTest.java   
private Object construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    return constructor.getSingleData(Object.class);
}
项目:snake-yaml    文件:ConstructorSequenceTest.java   
@SuppressWarnings("unchecked")
private List<Object> construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    List<Object> result = (List<Object>) constructor.getSingleData(Object.class);
    return result;
}
项目:snakeyaml    文件:ConstructorMappingTest.java   
private Object construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    return constructor.getSingleData(Object.class);
}
项目:snakeyaml    文件:ConstructorSequenceTest.java   
@SuppressWarnings("unchecked")
private List<Object> construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    List<Object> result = (List<Object>) constructor.getSingleData(Object.class);
    return result;
}
项目:AndroidApktool    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:5zig-TIMV-Plugin    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:diorite-configs-java8    文件:YamlParserEventIterator.java   
YamlParserEventIterator(Parser parser)
{
    this.parser = parser;
}
项目:snake-yaml    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:snake-yaml    文件:FragmentComposer.java   
public FragmentComposer(Parser parser, Resolver resolver, String nodeName) {
    super(parser, resolver);
    this.nodeName = nodeName;
}
项目:snake-yaml    文件:PyImportTest.java   
protected List<Event> parse(InputStream input) throws IOException {
    StreamReader reader = new StreamReader(new UnicodeReader(input));
    Parser parser = new ParserImpl(reader);
    List<Event> result = new ArrayList<Event>();
    while (parser.peekEvent() != null) {
        result.add(parser.getEvent());
    }
    input.close();
    return result;
}
项目:SubServers-2    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:Diorite    文件:YamlParserEventIterator.java   
YamlParserEventIterator(Parser parser)
{
    this.parser = parser;
}
项目:snakeyaml    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:snakeyaml    文件:FragmentComposer.java   
public FragmentComposer(Parser parser, Resolver resolver, String nodeName) {
    super(parser, resolver);
    this.nodeName = nodeName;
}
项目:TestTheTeacher    文件:Composer.java   
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:org.openntf.domino    文件:Composer.java   
public Composer(final Parser parser, final Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
项目:diorite-configs-java8    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @param yaml
 *         YAML document(s)
 *
 * @return parsed events
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 */
public Iterable<Event> parse(Reader yaml)
{
    Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new YamlParserEventIterator(parser);
    return new YamlEventIterable(result);
}
项目:Diorite    文件:Yaml.java   
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @param yaml
 *         YAML document(s)
 *
 * @return parsed events
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 */
public Iterable<Event> parse(Reader yaml)
{
    Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new YamlParserEventIterator(parser);
    return new YamlEventIterable(result);
}