Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Parsing XML in C++ using the YARD Parser

, 21 Dec 2004
Provides a set of tools for building XML parsers in C++ using the YARD recursive descent parser.
// released into the public domain 
// by Christopher Diggins 2004 
// http://www.cdiggins.com 

#ifndef SCANNER_HPP_INCLUDED  
#define SCANNER_HPP_INCLUDED  

#include "parser_input_stream.hpp"

namespace yard
{
  template<typename Rules_T, typename Elem_T, typename Iter_T>
  void Scan(Iter_T begin, Iter_T end) {
    ParserInputStream<Elem_T, Iter_T> input(begin, end);
    while (!input.AtEnd()) {
      if (!Rules_T::Accept(input)) {
        input.GotoNext(); 
      }
    }
  }
}

#endif // #ifndef SCANNER_HPP_INCLUDED  

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Christopher Diggins
Software Developer Autodesk
Canada Canada
This article was written by Christopher Diggins, a computer science nerd who currently works at Autodesk as an SDK specialist.
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 21 Dec 2004
Article Copyright 2004 by Christopher Diggins
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid