⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scanner.hpp

📁 yard lib, template for regular rule
💻 HPP
字号:

// 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)) {
                //double checker
                if ((!input.AtEnd())) input.GotoNext();
            }
        }
    }
}

#endif // #ifndef SCANNER_HPP_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -