1 using System;
2 using System.Collections;
3
4
5
6
7
8 namespace soulcm.scmpg
9 {
10 public class Include
11 {
12 public Include(bool hppPrefix_, const ustring& str_) :
13 hppPrefix(hppPrefix_), str(str_)
14 {
15 }
16 public bool HppPrefix() const
17 {
18 return hppPrefix;
19 }
20 public const ustring& Str() const
21 {
22 return str;
23 }
24 private bool hppPrefix;
25 private ustring str;
26 }
27 public class ParserFile
28 {
29 public ParserFile(const string& fileName_) :
30 fileName(fileName_)
31 {
32 }
33 public const string& FileName() const
34 {
35 return fileName;
36 }
37 public const List<UniquePtr<Cm.Ast.Node>>& UsingDirectives() const
38 {
39 return usingDirectives;
40 }
41 public const List<UniquePtr<GrammarParser>>& Parsers() const
42 {
43 return parsers;
44 }
45 public void AddUsingDirective(Cm.Ast.Node* usingDirective)
46 {
47 usingDirectives.Add(UniquePtr<Cm.Ast.Node>(usingDirective));
48 }
49 public void AddParser(GrammarParser* parser)
50 {
51 parsers.Add(UniquePtr<GrammarParser>(parser));
52 }
53 public void Accept(Visitor& visitor)
54 {
55 visitor.Visit(*this);
56 }
57 private string fileName;
58 private List<UniquePtr<Cm.Ast.Node>> usingDirectives;
59 private List<UniquePtr<GrammarParser>> parsers;
60 }
61 }