本文整理汇总了C#中Procedure.SetName方法的典型用法代码示例。如果您正苦于以下问题:C# Procedure.SetName方法的具体用法?C# Procedure.SetName怎么用?C# Procedure.SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Procedure
的用法示例。
在下文中一共展示了Procedure.SetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: procDef
public Procedure procDef()
{
EnterRule_procDef();
EnterRule("procDef", 11);
TraceIn("procDef", 11);
Procedure procDecl = default(Procedure);
IToken identifier20 = default(IToken);
List<Variable> parameterList21 = default(List<Variable>);
List<Variable> variableDef22 = default(List<Variable>);
Body body23 = default(Body);
procDecl = new Procedure();
try { DebugEnterRule(GrammarFileName, "procDef");
DebugLocation(222, 5);
try
{
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:227:6: ( PROCEDURE identifier ( LPAREN parameterList RPAREN )? SEMI ( variableDef )? body SEMI )
DebugEnterAlt(1);
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:227:8: PROCEDURE identifier ( LPAREN parameterList RPAREN )? SEMI ( variableDef )? body SEMI
{
DebugLocation(227, 8);
Match(input,PROCEDURE,Follow._PROCEDURE_in_procDef727);
DebugLocation(228, 7);
PushFollow(Follow._identifier_in_procDef735);
identifier20=identifier();
PopFollow();
DebugLocation(229, 7);
procDecl.SetName(identifier20);
DebugLocation(232, 7);
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:232:7: ( LPAREN parameterList RPAREN )?
int alt10=2;
try { DebugEnterSubRule(10);
try { DebugEnterDecision(10, false);
int LA10_0 = input.LA(1);
if ((LA10_0==LPAREN))
{
alt10 = 1;
}
} finally { DebugExitDecision(10); }
switch (alt10)
{
case 1:
DebugEnterAlt(1);
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:232:9: LPAREN parameterList RPAREN
{
DebugLocation(232, 9);
Match(input,LPAREN,Follow._LPAREN_in_procDef753);
DebugLocation(233, 7);
PushFollow(Follow._parameterList_in_procDef762);
parameterList21=parameterList();
PopFollow();
DebugLocation(234, 7);
foreach(var pr in parameterList21)
{
procDecl.AddChild(pr);
}
DebugLocation(240, 7);
Match(input,RPAREN,Follow._RPAREN_in_procDef778);
}
break;
}
} finally { DebugExitSubRule(10); }
DebugLocation(240, 17);
Match(input,SEMI,Follow._SEMI_in_procDef783);
DebugLocation(241, 7);
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:241:7: ( variableDef )?
int alt11=2;
try { DebugEnterSubRule(11);
try { DebugEnterDecision(11, false);
int LA11_0 = input.LA(1);
if ((LA11_0==VAR))
{
alt11 = 1;
}
} finally { DebugExitDecision(11); }
switch (alt11)
{
case 1:
DebugEnterAlt(1);
// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:241:9: variableDef
{
DebugLocation(241, 9);
PushFollow(Follow._variableDef_in_procDef794);
variableDef22=variableDef();
PopFollow();
//.........这里部分代码省略.........