2002-11-14 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / mcs / genericparser.cs
1 //
2 // GenericParser.cs: The Base Parser for the Mono compilers
3 //
4 // Author: A Rafael D Teixeira (rafaelteixeirabr@hotmail.com)
5 //
6 // Licensed under the terms of the GNU GPL
7 //
8 // Copyright (C) 2001 Ximian, Inc.
9 //
10 using System;
11 using System.Text;
12
13 namespace Mono.Languages
14 {
15         using System.Collections;
16
17         /// <summary>
18         /// Base class to support multiple Jay generated parsers
19         /// </summary>
20         public abstract class GenericParser
21         {
22                 // Name of the file we are parsing
23                 public string name;
24
25                 // Input stream to parse from.
26                 public System.IO.Stream input;
27
28                 public abstract void parse ();
29
30                 public virtual string[] extensions()
31                 {
32                         string [] list = { ".cs" };
33                         return list;
34                 }
35
36                 public GenericParser()
37                 {
38                         //
39                         // DO NOTHING: Derived classes should do their iniatilization here duties
40                         //
41                 }
42
43                 protected bool yacc_verbose_flag = false;
44
45                 public bool yacc_verbose
46                 {
47                         set
48                         {
49                                 yacc_verbose_flag = value;
50                         }
51
52                         get
53                         {
54                                 return yacc_verbose_flag;
55                         }
56                 }
57         }
58 }
59
60
61