File: parser.ih

package info (click to toggle)
flexc%2B%2B 2.17.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,180 kB
  • sloc: cpp: 6,467; makefile: 148; sh: 130; ansic: 18
file content (56 lines) | stat: -rw-r--r-- 1,149 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Generated by Bisonc++ V2.09.04 on Mon, 16 Jan 2012 21:40:37 +0100

#include "../xerr/xerr.ih"

// $insert class.h
#include "parser.h"

    // Add below here any includes etc. that are only 
    // required for the compilation of Parser's sources.
#include <bobcat/mstream>
#include <bobcat/string>

#include "../rules/rules.h"


inline FPattern Parser::rawText()
{
    return FPattern::rawText(d_states, d_matched);
}

inline FPattern Parser::rawText(std::string const &str)
{
    return FPattern::rawText(d_states, str);
}

inline void Parser::exceptionHandler(
                            [[maybe_unused]] std::exception const &exc)
{
    throw;              // re-implement to handle exceptions thrown by actions
}

inline FPattern Parser::str()
{
    return rawText(FBB::String::unescape(
                           d_matched.substr(1, d_scanner.length() - 2)));
}

inline FPattern Parser::escape()
{
    return FPattern::escape(d_states, d_matched);
}

inline void Parser::noActions()
{
    d_rules.noActions();
}

inline void Parser::orAction()
{
    d_rules.setOrAction();
}

#ifndef SPCH_
using namespace std;
using namespace FBB;
#endif