[Monodevelop-patches-list] r2522 - trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Sat May 7 19:46:49 EDT 2005
Author: jluke
Date: 2005-05-07 19:46:49 -0400 (Sat, 07 May 2005)
New Revision: 2522
Modified:
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs
Log:
grr
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs 2005-05-07 23:36:01 UTC (rev 2521)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs 2005-05-07 23:46:49 UTC (rev 2522)
@@ -6,32 +6,32 @@
using System.Text;
using ICSharpCode.SharpRefactory.Parser;
using ICSharpCode.SharpRefactory.Parser.AST;
-using System;
-using System.Reflection;
-
-namespace ICSharpCode.SharpRefactory.Parser {
-
-
-
-public class Parser
-{
+using System;
+using System.Reflection;
+
+namespace ICSharpCode.SharpRefactory.Parser {
+
+
+
+public class Parser
+{
const int maxT = 125;
-
- const bool T = true;
- const bool x = false;
- const int minErrDist = 2;
- const string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
- int errDist = minErrDist;
- Errors errors;
- Lexer lexer;
-
- public Errors Errors {
- get {
- return errors;
- }
- }
-
+ const bool T = true;
+ const bool x = false;
+ const int minErrDist = 2;
+ const string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
+ int errDist = minErrDist;
+ Errors errors;
+ Lexer lexer;
+
+ public Errors Errors {
+ get {
+ return errors;
+ }
+ }
+
+
#line 10 "cs.ATG"
string assemblyName = null;
@@ -397,74 +397,74 @@
/*------------------------------------------------------------------------*
*----- LEXER TOKEN LIST ------------------------------------------------*
*------------------------------------------------------------------------*/
-
-
-/*
-
-*/
- void SynErr(int n)
- {
- if (errDist >= minErrDist) {
- errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
- }
- errDist = 0;
- }
-
- public void SemErr(string msg)
- {
- if (errDist >= minErrDist) {
- errors.Error(lexer.Token.line, lexer.Token.col, msg);
- }
- errDist = 0;
- }
-
- void Expect(int n)
- {
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- } else {
- SynErr(n);
- }
- }
-
- bool StartOf(int s)
- {
- return set[s, lexer.LookAhead.kind];
- }
-
- void ExpectWeak(int n, int follow)
- {
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- } else {
- SynErr(n);
- while (!StartOf(follow)) {
- lexer.NextToken();
- }
- }
- }
-
- bool WeakSeparator(int n, int syFol, int repFol)
- {
- bool[] s = new bool[maxT + 1];
-
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- return true;
- } else if (StartOf(repFol)) {
- return false;
- } else {
- for (int i = 0; i <= maxT; i++) {
- s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
- }
- SynErr(n);
- while (!s[lexer.LookAhead.kind]) {
- lexer.NextToken();
- }
- return StartOf(syFol);
- }
- }
-
+
+
+/*
+
+*/
+ void SynErr(int n)
+ {
+ if (errDist >= minErrDist) {
+ errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
+ }
+ errDist = 0;
+ }
+
+ public void SemErr(string msg)
+ {
+ if (errDist >= minErrDist) {
+ errors.Error(lexer.Token.line, lexer.Token.col, msg);
+ }
+ errDist = 0;
+ }
+
+ void Expect(int n)
+ {
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ } else {
+ SynErr(n);
+ }
+ }
+
+ bool StartOf(int s)
+ {
+ return set[s, lexer.LookAhead.kind];
+ }
+
+ void ExpectWeak(int n, int follow)
+ {
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ } else {
+ SynErr(n);
+ while (!StartOf(follow)) {
+ lexer.NextToken();
+ }
+ }
+ }
+
+ bool WeakSeparator(int n, int syFol, int repFol)
+ {
+ bool[] s = new bool[maxT + 1];
+
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ return true;
+ } else if (StartOf(repFol)) {
+ return false;
+ } else {
+ for (int i = 0; i <= maxT; i++) {
+ s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
+ }
+ SynErr(n);
+ while (!s[lexer.LookAhead.kind]) {
+ lexer.NextToken();
+ }
+ return StartOf(syFol);
+ }
+ }
+
void CS() {
#line 527 "cs.ATG"
@@ -4851,23 +4851,23 @@
}
}
-
-
- public void Parse(Lexer lexer)
- {
- this.errors = lexer.Errors;
- this.lexer = lexer;
- errors.SynErr = new ErrorCodeProc(SynErr);
- lexer.NextToken();
+
+
+ public void Parse(Lexer lexer)
+ {
+ this.errors = lexer.Errors;
+ this.lexer = lexer;
+ errors.SynErr = new ErrorCodeProc(SynErr);
+ lexer.NextToken();
CS();
-
- }
-
- void SynErr(int line, int col, int errorNumber)
- {
- errors.count++;
- string s;
- switch (errorNumber) {
+
+ }
+
+ void SynErr(int line, int col, int errorNumber)
+ {
+ errors.count++;
+ string s;
+ switch (errorNumber) {
case 0: s = "EOF expected"; break;
case 1: s = "ident expected"; break;
case 2: s = "literal expected"; break;
@@ -5055,13 +5055,13 @@
case 184: s = "invalid PrimaryExpr"; break;
case 185: s = "invalid RelationalExpr"; break;
case 186: s = "invalid RelationalExpr"; break;
-
- default: s = "error " + errorNumber; break;
- }
- errors.Error(line, col, s);
- }
-
- static bool[,] set = {
+
+ default: s = "error " + errorNumber; break;
+ }
+ errors.Error(line, col, s);
+ }
+
+ static bool[,] set = {
{T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,T, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
@@ -5092,8 +5092,8 @@
{x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}
-
- };
-} // end Parser
-
+
+ };
+} // end Parser
+
}
\ No newline at end of file
More information about the Monodevelop-patches-list
mailing list