Advertisement
gmendezm

Primera caida de la progra Compi 2

Sep 12th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.63 KB | None | 0 0
  1.  
  2.     [RuleVersion(0)]
  3.     public ProgramContext program() {
  4.         ProgramContext _localctx = new ProgramContext(_ctx, State);
  5.         EnterRule(_localctx, 0, RULE_program);
  6.         int _la;
  7.         try {
  8.             _localctx = new ProgramASTContext(_localctx);
  9.             EnterOuterAlt(_localctx, 1);
  10.             {
  11.             State = 40; ((ProgramASTContext)_localctx).tclass = Match(CLASS);
  12.             State = 41; ((ProgramASTContext)_localctx).tident = Match(IDENT);
  13.             State = 47;
  14.             _errHandler.Sync(this);
  15.             _la = _input.La(1);
  16.             while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CLASS) | (1L << CONST) | (1L << IDENT))) != 0)) {
  17.                 {
  18.                 State = 45;
  19.                 switch (_input.La(1)) {
  20.                 case CONST:
  21.                     {
  22.                     State = 42; const_decl();
  23.                     }
  24.                     break;
  25.                 case IDENT:
  26.                     {
  27.                     State = 43; var_decl();
  28.                     }
  29.                     break;
  30.                 case CLASS:
  31.                     {
  32.                     State = 44; class_decl();
  33.                     }
  34.                     break;
  35.                 default:
  36.                     throw new NoViableAltException(this);
  37.                 }
  38.                 }
  39.                 State = 49;
  40.                 _errHandler.Sync(this);
  41.                 _la = _input.La(1);
  42.             }
  43.             State = 50; ((ProgramASTContext)_localctx).tlcb = Match(LEFT_CURLY_BRACKET);
  44.             State = 54;
  45.             _errHandler.Sync(this);
  46.             _la = _input.La(1);
  47.             while (_la==VOID || _la==IDENT) {
  48.                 {
  49.                 {
  50.                 State = 51; method_decl();
  51.                 }
  52.                 }
  53.                 State = 56;
  54.                 _errHandler.Sync(this);
  55.                 _la = _input.La(1);
  56.             }
  57.             State = 57; ((ProgramASTContext)_localctx).trcb = Match(RIGHT_CURLY_BRACKET);
  58.             State = 58; Match(Eof);
  59.             }
  60.         }
  61.         catch (RecognitionException re) {
  62.             _localctx.exception = re;
  63.             _errHandler.ReportError(this, re);
  64.             _errHandler.Recover(this, re);
  65.         }
  66.         finally {
  67.             ExitRule();
  68.         }
  69.         return _localctx;
  70.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement