source: icGREP/icgrep-devel/icgrep/re/parse_fixed_strings.cpp @ 5781

Last change on this file since 5781 was 5754, checked in by cameron, 18 months ago

Fixes for last check-in

File size: 689 bytes
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#include <re/re_parser.h>
8#include <re/parse_fixed_strings.h>
9#include <re/re_alt.h>
10#include <re/re_seq.h>
11
12namespace re {
13
14bool FixedStringParser::accept_alt_mark() {
15    if (!mCursor.more() || (*mCursor != '\n')) return false;
16    mCursor++;
17    return true;
18}
19
20RE * FixedStringParser::parse_seq() {
21    std::vector<RE *> seq;
22    while (mCursor.more() && (*mCursor != '\n')) {
23        seq.push_back(createCC(parse_literal_codepoint()));
24    }
25    return makeSeq(seq.begin(), seq.end());
26}
27
28}
Note: See TracBrowser for help on using the repository browser.