()
| 2384 | } |
| 2385 | |
| 2386 | func (p *CommandsParser) Simple() (localctx ISimpleContext) { |
| 2387 | localctx = NewSimpleContext(p, p.GetParserRuleContext(), p.GetState()) |
| 2388 | p.EnterRule(localctx, 18, CommandsParserRULE_simple) |
| 2389 | var _la int |
| 2390 | |
| 2391 | p.EnterOuterAlt(localctx, 1) |
| 2392 | { |
| 2393 | p.SetState(136) |
| 2394 | |
| 2395 | var _m = p.Match(CommandsParserCOMMAND) |
| 2396 | |
| 2397 | localctx.(*SimpleContext).cmd = _m |
| 2398 | if p.HasError() { |
| 2399 | // Recognition error - abort rule |
| 2400 | goto errorExit |
| 2401 | } |
| 2402 | } |
| 2403 | p.SetState(141) |
| 2404 | p.GetErrorHandler().Sync(p) |
| 2405 | if p.HasError() { |
| 2406 | goto errorExit |
| 2407 | } |
| 2408 | _la = p.GetTokenStream().LA(1) |
| 2409 | |
| 2410 | for _la == CommandsParserFLAG || _la == CommandsParserSTRING { |
| 2411 | p.SetState(139) |
| 2412 | p.GetErrorHandler().Sync(p) |
| 2413 | if p.HasError() { |
| 2414 | goto errorExit |
| 2415 | } |
| 2416 | |
| 2417 | switch p.GetTokenStream().LA(1) { |
| 2418 | case CommandsParserFLAG: |
| 2419 | { |
| 2420 | p.SetState(137) |
| 2421 | |
| 2422 | var _m = p.Match(CommandsParserFLAG) |
| 2423 | |
| 2424 | localctx.(*SimpleContext)._FLAG = _m |
| 2425 | if p.HasError() { |
| 2426 | // Recognition error - abort rule |
| 2427 | goto errorExit |
| 2428 | } |
| 2429 | } |
| 2430 | localctx.(*SimpleContext).args = append(localctx.(*SimpleContext).args, localctx.(*SimpleContext)._FLAG) |
| 2431 | |
| 2432 | case CommandsParserSTRING: |
| 2433 | { |
| 2434 | p.SetState(138) |
| 2435 | |
| 2436 | var _m = p.Match(CommandsParserSTRING) |
| 2437 | |
| 2438 | localctx.(*SimpleContext)._STRING = _m |
| 2439 | if p.HasError() { |
| 2440 | // Recognition error - abort rule |
| 2441 | goto errorExit |
| 2442 | } |
| 2443 | } |
no test coverage detected