Paradox Game Engine
v1.0.0 beta06
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
ParserStack.cs
Go to the documentation of this file.
1
#region License
2
/* **********************************************************************************
3
* Copyright (c) Roman Ivantsov
4
* This source code is subject to terms and conditions of the MIT License
5
* for Irony. A copy of the license can be found in the License.txt file
6
* at the root of this distribution.
7
* By using this source code in any fashion, you are agreeing to be bound by the terms of the
8
* MIT License.
9
* You must not remove this notice from this software.
10
* **********************************************************************************/
11
#endregion
12
13
using
System
;
14
using
System.Collections.Generic;
15
using
System.Text;
16
17
namespace
Irony.
Parsing
{
18
19
public
class
ParserStack
:
List
<ParseTreeNode> {
20
public
ParserStack
() : base(200) { }
21
public
void
Push
(
ParseTreeNode
nodeInfo) {
22
base.Add(nodeInfo);
23
}
24
public
void
Push
(
ParseTreeNode
nodeInfo,
ParserState
state) {
25
nodeInfo.State = state;
26
base.Add(nodeInfo);
27
}
28
public
ParseTreeNode
Pop
() {
29
var top = Top;
30
base.RemoveAt(Count - 1);
31
return
top;
32
}
33
public
void
Pop
(
int
count
) {
34
base.RemoveRange(Count -
count
,
count
);
35
}
36
public
void
PopUntil
(
int
finalCount) {
37
if
(finalCount < Count)
38
Pop(Count - finalCount);
39
}
40
public
ParseTreeNode
Top {
41
get
{
42
if
(Count == 0)
return
null;
43
return
base[Count - 1];
44
}
45
}
46
}
47
}
Irony.Parsing.Parsing
Irony.Parsing.ParserStack.ParserStack
ParserStack()
Definition:
ParserStack.cs:20
Irony.Parsing.ParserStack.Pop
ParseTreeNode Pop()
Definition:
ParserStack.cs:28
SiliconStudio.Shaders.Parser.System
A system file.
Irony.Parsing.ParserStack.Pop
void Pop(int count)
Definition:
ParserStack.cs:33
Irony.Parsing.ParserStack
Definition:
ParserStack.cs:19
Irony.Parsing.ParseTreeNode
Definition:
ParseTree.cs:32
DirectX::count
_In_ size_t count
Definition:
DirectXTexP.h:174
Irony.Parsing.ParserState
Definition:
ParserData.cs:38
Irony.Parsing.ParserStack.Push
void Push(ParseTreeNode nodeInfo, ParserState state)
Definition:
ParserStack.cs:24
Irony.Parsing.ParserStack.PopUntil
void PopUntil(int finalCount)
Definition:
ParserStack.cs:36
Irony.Parsing.List
Irony.Parsing.ParserStack.Push
void Push(ParseTreeNode nodeInfo)
Definition:
ParserStack.cs:21
sources
common
shaders
Irony
Parsing
Parser
ParserStack.cs
Generated on Sat Dec 20 2014 21:51:22 for Paradox Game Engine by
1.8.7