1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

reverted to backtracking parser, fixed a few bugs

This commit is contained in:
Mike Kucera 2008-01-29 21:34:25 +00:00
parent 986ba49c19
commit 0c825ab41c
10 changed files with 2110 additions and 3080 deletions

View file

@ -14,6 +14,7 @@ import org.eclipse.cdt.core.dom.ICodeReaderFactory;
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
@ -70,7 +71,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
*
* @return an IASTTranslationUnit object thats empty and will be filled in by the parser
*/
protected abstract IASTTranslationUnit createASTTranslationUnit();
protected abstract IASTTranslationUnit createASTTranslationUnit(IIndex index, IScanner preprocessor);
/**
@ -97,12 +98,12 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo,
ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log) throws CoreException {
ILanguage gccLanguage = GCCLanguage.getDefault();
IASTTranslationUnit gtu = gccLanguage.getASTTranslationUnit(reader, scanInfo, fileCreator, index, log);
ILanguage gppLanguage = GPPLanguage.getDefault();
IASTTranslationUnit gtu = gppLanguage.getASTTranslationUnit(reader, scanInfo, fileCreator, index, log);
System.out.println();
System.out.println("********************************************************");
System.out.println("GCC AST:");
System.out.println("GPP AST:");
DebugUtil.printAST(gtu);
System.out.println();
@ -120,7 +121,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
preprocessor.setComputeImageLocations((options & AbstractLanguage.OPTION_NO_IMAGE_LOCATIONS) == 0);
IParser parser = getParser();
IASTTranslationUnit tu = createTranslationUnit(index, preprocessor);
IASTTranslationUnit tu = createASTTranslationUnit(index, preprocessor);
CPreprocessorAdapter.runCPreprocessor(preprocessor, parser, getTokenMap(), tu);
@ -128,7 +129,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
System.out.println("Base Extensible Language AST:");
//DebugUtil.printAST(tu);
DebugUtil.printAST(tu);
return tu;
}
@ -153,7 +154,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
preprocessor.setContentAssistMode(offset);
IParser parser = getParser();
IASTTranslationUnit tu = createTranslationUnit(index, preprocessor);
IASTTranslationUnit tu = createASTTranslationUnit(index, preprocessor);
CPreprocessorAdapter.runCPreprocessor(preprocessor, parser, getTokenMap(), tu);
@ -163,16 +164,6 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
}
/**
* Gets the translation unit object and sets the index and the location resolver.
*/
private IASTTranslationUnit createTranslationUnit(IIndex index, IScanner preprocessor) {
IASTTranslationUnit tu = createASTTranslationUnit();
tu.setIndex(index);
if(tu instanceof CASTTranslationUnit) {
((CASTTranslationUnit)tu).setLocationResolver(preprocessor.getLocationResolver());
}
return tu;
}
}

View file

@ -294,8 +294,8 @@ public abstract class BuildASTParserAction {
// this is the same way that the DOM parser computes the length
IASTDeclaration[] declarations = tu.getDeclarations();
if (declarations.length != 0) {
CASTNode d = (CASTNode) declarations[declarations.length-1];
setOffsetAndLength(tu, 0, d.getOffset() + d.getLength());
IASTNode d = declarations[declarations.length-1];
setOffsetAndLength(tu, 0, offset(d) + length(d));
}
if(TRACE_AST_STACK) System.out.println(astStack);

View file

@ -74,6 +74,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplatedTypeTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTryBlockStatement;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypenameExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;

View file

@ -18,10 +18,15 @@ import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.lrparser.IParser;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPASTNodeFactory;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.model.IContributedModelBuilder;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.parser.IScanner;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parser;
import org.eclipse.cdt.internal.core.dom.parser.c.CASTTranslationUnit;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
/**
* ILanguage implementation for the C99 parser.
@ -82,16 +87,24 @@ public class C99Language extends BaseExtensibleLanguage {
return GCC_LANGUAGE.getPreprocessorKeywords();
}
@Override
protected IASTTranslationUnit createASTTranslationUnit() {
return C99ASTNodeFactory.DEFAULT_INSTANCE.newTranslationUnit();
}
@Override
protected ParserLanguage getParserLanguageForPreprocessor() {
return ParserLanguage.C;
}
/**
* Gets the translation unit object and sets the index and the location resolver.
*/
@SuppressWarnings("restriction")
@Override
protected IASTTranslationUnit createASTTranslationUnit(IIndex index, IScanner preprocessor) {
IASTTranslationUnit tu = C99ASTNodeFactory.DEFAULT_INSTANCE.newTranslationUnit();
tu.setIndex(index);
if(tu instanceof CASTTranslationUnit) {
((CASTTranslationUnit)tu).setLocationResolver(preprocessor.getLocationResolver());
}
return tu;
}
}

View file

@ -17,11 +17,14 @@ import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.lrparser.IParser;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPASTNodeFactory;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.model.IContributedModelBuilder;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.parser.IScanner;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParser;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
/**
* ILanguage implementation for the C++ parser.
@ -82,16 +85,24 @@ public class ISOCPPLanguage extends BaseExtensibleLanguage {
return GPP_LANGUAGE.getPreprocessorKeywords();
}
@Override
protected IASTTranslationUnit createASTTranslationUnit() {
return C99ASTNodeFactory.DEFAULT_INSTANCE.newTranslationUnit();
}
@Override
protected ParserLanguage getParserLanguageForPreprocessor() {
return ParserLanguage.CPP;
}
/**
* Gets the translation unit object and sets the index and the location resolver.
*/
@SuppressWarnings("restriction")
@Override
protected IASTTranslationUnit createASTTranslationUnit(IIndex index, IScanner preprocessor) {
IASTTranslationUnit tu = CPPASTNodeFactory.DEFAULT_INSTANCE.newTranslationUnit();
tu.setIndex(index);
if(tu instanceof CPPASTTranslationUnit) {
((CPPASTTranslationUnit)tu).setLocationResolver(preprocessor.getLocationResolver());
}
return tu;
}
}

View file

@ -95,7 +95,7 @@ public abstract class AbstractTrialUndoActionProvider<ACT, RULE_DATA> extends Pr
}
public final void finalAction(int rule_number) {
System.out.println("finalAction: " + rule_number);
//System.out.println("finalAction: " + rule_number); //$NON-NLS-1$
ruleAction[rule_number].doFinal(this, parserAction);
}

View file

@ -11,7 +11,7 @@
%options la=2
%options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp
%options template=TrialUndoParserTemplate.g
%options template=btParserTemplateD.g
@ -61,7 +61,7 @@ $Terminals
-- there's going to be more of these
identifier
TypedefName
-- TypedefName
-- Special tokens used in content assist
@ -148,7 +148,7 @@ $End
$Define
-- These macros allow the template and header code to be customized by an extending parser.
$ast_class /.Object./
$additional_interfaces /. ./
$additional_interfaces /. , IParserActionTokenProvider, IParser ./
$build_action_class /. CPPBuildASTParserAction ./
$resolve_action_class /. C99TypedefTrackerParserAction ./
@ -175,9 +175,10 @@ $Define
$resolve /. action.resolver./
$builder /. action.builder./
--$Action /. $BeginAction ./
--$BeginFinal /. ./
--$EndFinal /. ./
-- comment out when using trial/undo
$Action /. $BeginAction ./
$BeginFinal /. ./
$EndFinal /. ./
$End
@ -187,7 +188,7 @@ $Headers
private $action_class action;
// uncomment to use with backtracking parser
// public CPPParser() {}
public CPPParser() {}
private void initActions(IASTTranslationUnit tu) {
// binding resolution actions need access to IASTName nodes, temporary
@ -197,7 +198,7 @@ $Headers
//action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols);
// comment this line to use with backtracking parser
setParserAction(action);
//setParserAction(action);
}
@ -249,9 +250,9 @@ $Headers
// uncomment this method to use with backtracking parser
//public List getRuleTokens() {
// return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
//}
public List getRuleTokens() {
return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
}
./

View file

@ -29,7 +29,7 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0
0,0,0
};
};
public final static byte isKeyword[] = IsKeyword.isKeyword;
@ -1445,7 +1445,7 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
};
};
public final static byte termCheck[] = TermCheck.termCheck;
@ -2103,15 +2103,15 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
8,9,50,54,62,70,76,77,88,89,
104,107,109,114,15,57,63,69,86,90,
92,96,99,101,111,112,113,46,97,60,
68,80,123,95,124,106,56,108,49,66,
68,80,122,95,123,106,56,108,49,66,
72,75,78,85,91,100,55,105,3,79,
1,48,20,65,93,103,21,45,34,31,
122,67,121,98,110,51,52,58,59,61,
121,67,120,98,110,51,52,58,59,61,
71,73,74,87,94,18,19,7,16,17,
22,23,33,5,24,25,26,27,28,29,
6,35,36,37,38,39,40,41,42,43,
44,30,120,4,53,82,83,84,125,64,
116,117,118,119
44,30,119,4,53,82,83,84,124,64,
116,117,118
};
};
public final static char terminalIndex[] = TerminalIndex.terminalIndex;
@ -2119,25 +2119,25 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
public interface NonterminalIndex {
public final static char nonterminalIndex[] = {0,
135,137,238,0,0,136,234,134,0,133,
0,145,0,132,0,0,144,149,0,0,
150,180,159,160,161,162,163,152,164,165,
138,166,127,167,168,169,0,131,129,170,
0,197,143,0,0,0,140,177,139,153,
0,0,0,0,147,173,187,0,179,0,
203,204,0,0,128,0,156,178,0,0,
0,0,0,0,0,0,201,205,206,172,
0,0,0,0,0,0,0,126,148,176,
0,0,186,0,0,212,158,208,209,210,
0,0,202,0,0,130,0,207,0,0,
0,211,0,0,0,241,175,189,190,191,
192,193,195,196,0,214,217,219,220,0,
237,0,240,0,0,141,142,146,0,155,
0,171,181,182,183,184,185,188,0,194,
0,199,0,215,216,0,221,224,226,228,
0,231,232,233,0,235,236,239,0,0,
151,0,0,154,157,174,0,198,200,213,
218,0,222,223,225,227,229,230,242,243,
134,136,237,0,0,135,233,133,0,132,
0,144,0,131,0,0,143,148,0,0,
149,179,158,159,160,161,162,151,163,164,
137,165,126,166,167,168,0,130,128,169,
0,196,142,0,0,0,139,176,138,152,
0,0,0,0,146,172,186,0,178,0,
202,203,0,0,127,0,155,177,0,0,
0,0,0,0,0,0,200,204,205,171,
0,0,0,0,0,0,0,125,147,175,
0,0,185,0,0,211,157,207,208,209,
0,0,201,0,0,129,0,206,0,0,
0,210,0,0,0,240,174,188,189,190,
191,192,194,195,0,213,216,218,219,0,
236,0,239,0,0,140,141,145,0,154,
0,170,180,181,182,183,184,187,0,193,
0,198,0,214,215,0,220,223,225,227,
0,230,231,232,0,234,235,238,0,0,
150,0,0,153,156,173,0,197,199,212,
217,0,221,222,224,226,228,229,241,242,
0,0,0,0,0,0,0,0
};
};
@ -2241,70 +2241,70 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
public interface ScopeRhs {
public final static char scopeRhs[] = {0,
314,2,39,0,127,0,313,2,115,0,
127,173,0,128,180,74,0,216,0,289,
128,63,127,0,21,0,291,128,63,44,
0,21,55,0,34,132,0,21,55,0,
0,291,128,63,44,188,0,21,178,0,
289,128,63,131,0,182,129,0,138,0,
226,2,288,0,288,0,2,0,127,0,
182,129,254,253,254,0,132,190,173,129,
0,129,0,190,173,129,0,134,129,0,
168,0,307,128,168,0,128,168,0,222,
129,0,173,246,0,137,0,0,0,135,
0,0,0,306,128,59,252,0,128,0,
252,0,3,0,0,128,0,305,128,59,
0,45,128,0,152,2,0,128,278,277,
128,74,186,168,0,277,128,74,186,168,
0,215,0,216,0,186,168,0,98,0,
0,215,0,216,0,204,98,0,0,215,
0,216,0,277,128,186,168,0,215,0,
204,0,0,215,0,234,128,2,0,127,
0,0,0,0,0,234,128,2,223,0,
232,2,0,227,128,0,208,0,148,0,
173,129,0,11,0,0,0,221,61,0,
126,0,234,128,2,185,0,185,0,2,
0,0,127,0,0,0,0,0,214,2,
0,201,0,233,128,59,24,41,0,182,
129,60,58,0,143,129,0,132,182,129,
275,58,0,182,129,275,58,0,182,129,
69,1,60,0,233,128,59,60,0,233,
128,59,166,60,0,233,128,59,125,60,
0,273,128,59,1,64,0,273,128,59,
64,0,182,129,64,0,135,0,190,182,
129,246,0,137,0,182,129,246,0,190,
173,129,10,0,173,129,10,0,95,137,
0,301,128,168,0,162,84,0,231,163,
231,172,2,81,0,127,172,0,231,172,
2,81,0,129,0,127,172,0,231,163,
231,163,231,2,81,0,231,163,231,2,
81,0,231,2,81,0,129,0,129,0,
127,172,0,162,2,75,204,80,0,127,
129,0,204,80,0,110,2,131,127,129,
0,241,2,75,0,214,174,0,34,170,
0,174,0,176,34,170,0,241,2,85,
0,204,157,241,2,83,0,64,172,0,
241,2,83,0,127,172,64,172,0,300,
128,59,0,162,0,221,77,0,31,0,
162,112,160,0,31,170,0,179,2,0,
127,150,0,226,2,0,221,61,299,0,
162,61,0,179,2,294,42,129,0,127,
0,0,294,42,129,0,2,147,127,0,
0,179,2,30,0,14,148,0,126,44,
173,129,0,32,14,148,0,95,137,32,
14,148,0,213,182,129,0,148,32,14,
148,0,179,2,34,0,162,2,34,0,
162,2,67,179,63,26,0,179,63,26,
0,21,2,131,127,0,162,2,67,179,
63,29,0,179,63,29,0,162,2,67,
179,63,31,0,179,63,31,0,162,2,
67,179,63,27,0,179,63,27,0,226,
2,126,190,173,129,10,0,126,190,173,
129,10,0,137,2,0,127,0,226,2,
125,259,173,129,10,0,259,173,129,10,
0,135,2,0,127,0,226,2,136,0,
226,2,141,0,162,61,141,0,261,0,
32,0,32,141,0,171,0,134,0,162,
313,2,39,0,126,0,312,2,115,0,
126,172,0,127,179,74,0,215,0,288,
127,63,126,0,21,0,290,127,63,44,
0,21,55,0,34,131,0,21,55,0,
0,290,127,63,44,187,0,21,177,0,
288,127,63,130,0,181,128,0,137,0,
225,2,287,0,287,0,2,0,126,0,
181,128,253,252,253,0,131,189,172,128,
0,128,0,189,172,128,0,133,128,0,
167,0,306,127,167,0,127,167,0,221,
128,0,172,245,0,136,0,0,0,134,
0,0,0,305,127,59,251,0,127,0,
251,0,3,0,0,127,0,304,127,59,
0,45,127,0,151,2,0,127,277,276,
127,74,185,167,0,276,127,74,185,167,
0,214,0,215,0,185,167,0,98,0,
0,214,0,215,0,203,98,0,0,214,
0,215,0,276,127,185,167,0,214,0,
203,0,0,214,0,233,127,2,0,126,
0,0,0,0,0,233,127,2,222,0,
231,2,0,226,127,0,207,0,147,0,
172,128,0,11,0,0,0,220,61,0,
125,0,233,127,2,184,0,184,0,2,
0,0,126,0,0,0,0,0,213,2,
0,200,0,232,127,59,24,41,0,181,
128,60,58,0,142,128,0,131,181,128,
274,58,0,181,128,274,58,0,181,128,
69,1,60,0,232,127,59,60,0,232,
127,59,165,60,0,232,127,59,124,60,
0,272,127,59,1,64,0,272,127,59,
64,0,181,128,64,0,134,0,189,181,
128,245,0,136,0,181,128,245,0,189,
172,128,10,0,172,128,10,0,95,136,
0,300,127,167,0,161,84,0,230,162,
230,171,2,81,0,126,171,0,230,171,
2,81,0,128,0,126,171,0,230,162,
230,162,230,2,81,0,230,162,230,2,
81,0,230,2,81,0,128,0,128,0,
126,171,0,161,2,75,203,80,0,126,
128,0,203,80,0,110,2,130,126,128,
0,240,2,75,0,213,173,0,34,169,
0,173,0,175,34,169,0,240,2,85,
0,203,156,240,2,83,0,64,171,0,
240,2,83,0,126,171,64,171,0,299,
127,59,0,161,0,220,77,0,31,0,
161,112,159,0,31,169,0,178,2,0,
126,149,0,225,2,0,220,61,298,0,
161,61,0,178,2,293,42,128,0,126,
0,0,293,42,128,0,2,146,126,0,
0,178,2,30,0,14,147,0,125,44,
172,128,0,32,14,147,0,95,136,32,
14,147,0,212,181,128,0,147,32,14,
147,0,178,2,34,0,161,2,34,0,
161,2,67,178,63,26,0,178,63,26,
0,21,2,130,126,0,161,2,67,178,
63,29,0,178,63,29,0,161,2,67,
178,63,31,0,178,63,31,0,161,2,
67,178,63,27,0,178,63,27,0,225,
2,125,189,172,128,10,0,125,189,172,
128,10,0,136,2,0,126,0,225,2,
124,258,172,128,10,0,258,172,128,10,
0,134,2,0,126,0,225,2,135,0,
225,2,140,0,161,61,140,0,260,0,
32,0,32,140,0,170,0,133,0,161,
2,0
};
};
@ -2351,58 +2351,58 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
public interface InSymb {
public final static char inSymb[] = {0,
0,293,41,44,188,168,128,62,60,58,
230,24,63,44,186,128,185,4,127,6,
131,1,129,3,2,267,268,252,269,246,
270,64,271,272,1,10,129,2,59,166,
125,1,60,275,128,59,67,63,74,128,
301,214,202,185,128,302,2,63,174,61,
2,40,42,63,182,171,1,173,6,214,
59,173,237,129,126,125,1,59,129,129,
182,173,24,128,59,59,69,129,129,128,
128,128,277,70,2,69,61,227,129,5,
68,128,128,128,61,61,128,3,190,128,
126,125,128,182,128,59,128,182,173,44,
157,233,230,128,128,129,182,182,233,291,
44,10,57,146,277,59,287,129,288,152,
128,59,34,26,29,31,27,10,136,2,
129,30,25,4,9,8,5,7,12,11,
141,147,149,148,151,150,154,153,158,156,
159,39,160,221,160,129,173,128,234,235,
236,289,174,134,292,227,289,261,190,306,
129,183,253,58,168,308,128,128,70,190,
128,273,248,274,190,233,233,182,167,1,
132,68,67,63,237,237,69,232,214,223,
224,2,128,278,128,68,182,2,266,128,
2,63,63,63,63,129,2,179,162,128,
40,42,173,2,126,125,101,114,2,61,
0,292,41,44,187,167,127,62,60,58,
229,24,63,44,185,127,184,4,126,6,
130,1,128,3,2,266,267,251,268,245,
269,64,270,271,1,10,128,2,59,165,
124,1,60,274,127,59,67,63,74,127,
300,213,201,184,127,301,2,63,173,61,
2,40,42,63,181,170,1,172,6,213,
59,172,236,128,125,124,1,59,128,128,
181,172,24,127,59,59,69,128,128,127,
127,127,276,70,2,69,61,226,128,5,
68,127,127,127,61,61,127,3,189,127,
125,124,127,181,127,59,127,181,172,44,
156,232,229,127,127,128,181,181,232,290,
44,10,57,145,276,59,286,128,287,151,
127,59,34,26,29,31,27,10,135,2,
128,30,25,4,9,8,5,7,12,11,
140,146,148,147,150,149,153,152,157,155,
158,39,159,220,159,128,172,127,233,234,
235,288,173,133,291,226,288,260,189,305,
128,182,252,58,167,307,127,127,70,189,
127,272,247,273,189,232,232,181,166,1,
131,68,67,63,236,236,69,231,213,222,
223,2,127,277,127,68,181,2,265,127,
2,63,63,63,63,128,2,178,161,127,
40,42,172,2,125,124,101,114,2,61,
88,94,9,8,90,89,5,92,91,67,
63,86,87,7,96,95,98,97,99,111,
110,109,108,107,106,105,104,103,102,69,
112,100,173,5,181,157,68,128,2,68,
3,173,128,310,254,129,273,69,68,167,
128,69,69,69,69,2,232,128,227,128,
300,79,77,1,162,85,83,81,80,75,
82,84,78,76,168,60,74,45,226,68,
305,179,162,179,179,179,179,173,226,157,
136,10,129,61,294,2,179,44,129,44,
226,162,148,148,147,147,147,150,150,150,
150,149,149,153,151,151,156,154,158,162,
159,128,128,227,128,190,307,125,70,283,
214,68,253,182,291,128,234,279,115,221,
70,2,2,2,204,2,1,162,1,180,
68,67,67,67,67,190,259,129,173,212,
2,295,174,152,129,182,173,70,228,132,
68,70,69,254,67,234,157,2,241,174,
241,172,231,75,241,128,2,2,2,2,
126,125,173,44,179,128,128,4,213,44,
128,129,57,157,128,93,313,174,157,214,
157,231,163,2,157,279,162,162,162,162,
2,2,190,157,296,299,61,191,3,126,
39,182,237,128,228,157,157,128,69,204,
163,231,162,226,226,126,2,61,162,4,
3,2,69,228,128,120,231,163,157,226,
221,4,314,128,157,231,68,157
112,100,172,5,180,156,68,127,2,68,
3,172,127,309,253,128,272,69,68,166,
127,69,69,69,69,2,231,127,226,127,
299,79,77,1,161,85,83,81,80,75,
82,84,78,76,167,60,74,45,225,68,
304,178,161,178,178,178,178,172,225,156,
135,10,128,61,293,2,178,44,128,44,
225,161,147,147,146,146,146,149,149,149,
149,148,148,152,150,150,155,153,157,161,
158,127,127,226,127,189,306,124,70,282,
213,68,252,181,290,127,233,278,115,220,
70,2,2,2,203,2,1,161,1,179,
68,67,67,67,67,189,258,128,172,211,
2,294,173,151,128,181,172,70,227,131,
68,70,69,253,67,233,156,2,240,173,
240,171,230,75,240,127,2,2,2,2,
125,124,172,44,178,127,127,4,212,44,
127,128,57,156,127,93,312,173,156,213,
156,230,162,2,156,278,161,161,161,161,
2,2,189,156,295,298,61,190,3,125,
39,181,236,127,227,156,156,127,69,203,
162,230,161,225,225,125,2,61,161,4,
3,2,69,227,127,120,230,162,156,225,
220,4,313,127,156,230,68,156
};
};
public final static char inSymb[] = InSymb.inSymb;
@ -2526,7 +2526,6 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
"charconst",
"stringlit",
"identifier",
"TypedefName",
"Completion",
"EndOfCompletion",
"Invalid",
@ -2678,12 +2677,12 @@ public class CPPParserprs implements lpg.lpgjavaruntime.ParseTable, CPPParsersym
public final static int
NUM_STATES = 518,
NT_OFFSET = 124,
NT_OFFSET = 123,
LA_STATE_OFFSET = 5698,
MAX_LA = 2147483647,
NUM_RULES = 523,
NUM_NONTERMINALS = 198,
NUM_SYMBOLS = 322,
NUM_SYMBOLS = 321,
SEGMENT_SIZE = 8192,
START_STATE = 2612,
IDENTIFIER_SYMBOL = 0,

View file

@ -83,10 +83,9 @@ public interface CPPParsersym {
TK_charconst = 37,
TK_stringlit = 24,
TK_identifier = 1,
TK_TypedefName = 121,
TK_Completion = 122,
TK_EndOfCompletion = 123,
TK_Invalid = 124,
TK_Completion = 121,
TK_EndOfCompletion = 122,
TK_Invalid = 123,
TK_LeftBracket = 61,
TK_LeftParen = 2,
TK_LeftBrace = 59,
@ -262,7 +261,6 @@ public interface CPPParsersym {
"public",
"EOF_TOKEN",
"else",
"TypedefName",
"Completion",
"EndOfCompletion",
"Invalid"