Package: PlusState
PlusState
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PlusState() |
|
|
|
|
|
||||||||||||||||||||
parse(RouterSoftware, TempVariableType, Buffer, TypeFileParser) |
|
|
|
|
|
Coverage
1: /**
2: *
3: */
4: package parser.states.typestates;
5:
6: import model.RouterSoftware;
7: import parser.ParserException;
8: import parser.TypeFileParser;
9: import parser.tempparserobjects.TempVariableType;
10: import symbols.AbstractSymbol;
11: import symbols.IdentifierSymbol;
12: import basic.Buffer;
13:
14: /**
15: * @author Hendrik
16: *
17: */
18: public class PlusState extends AbstractTypeState {
19:
20:         @Override
21:         public void parse(final RouterSoftware rs, final TempVariableType tVT,
22:                         final Buffer<AbstractSymbol> buffer, final TypeFileParser tFP)
23:                         throws InterruptedException, ParserException {
24:                 final AbstractSymbol nextSymbol = buffer.peek();
25:•                if (nextSymbol instanceof IdentifierSymbol) {
26:                         tFP.setState(new AdditionalIdentifierState());
27:                 } else {
28:                         throw new ParserException("no valid symbol: "
29:                                         + buffer.peek().getClass().getCanonicalName()
30:                                         + " expected AdditionalIdentifierSymbol");
31:                 }
32:
33:         }
34:
35: }