我identifier
定义为:
identifier = /[A-zA-Z][A-zA-Z0-9_]*/ ;
并且arrayType
作为:
arrayType = ARRAY LBRACK ~ typeList RBRACK OF componentType;
那么为什么 Tatsu 在下面的日志中决定 'ASCIIcode]' 是一个标识符而不是一个身份 + 右括号呢?
≡'['
ASCIIcode] Of ASCIIcode;
≡LBRACK↙arrayType↙unpackedStructuredType↙structuredType↙type↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙typeList↙arrayType↙unpackedStructuredType↙structuredType↙type↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙indexType↙typeList↙arrayType↙unpackedStructuredType↙structuredType↙type↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙simpleType↙indexType↙typeList↙arrayType↙unpackedStructuredType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙scalarType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙LPAREN↙scalarType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢'('
ASCIIcode] Of ASCIIcode;
≢LPAREN↙scalarType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢scalarType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙constant↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙unsignedNumber↙constant↙subrangeType↙simpleType↙indexType↙typeList↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙unsignedInteger↙unsignedNumber↙constant↙subrangeType↙simpleType↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢'' /\d+/
ASCIIcode] Of ASCIIcode;
↙unsignedReal↙unsignedNumber↙constant↙subrangeType↙simpleType↙indexType↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢'' /\d+/
ASCIIcode] Of ASCIIcode;
≢unsignedNumber↙constant↙subrangeType↙simpleType↙indexType↙typeList↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙PLUS↙sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢'+'
ASCIIcode] Of ASCIIcode;
≢PLUS↙sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙MINUS↙sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢'-'
ASCIIcode] Of ASCIIcode;
≢MINUS↙sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙ ~99:15
ASCIIcode] Of ASCIIcode;
≢sign↙constant↙subrangeType↙simpleType↙indexType↙typeList↙arrayType↙ ~99:15
ASCIIcode] Of ASCIIcode;
↙identifier↙constant↙subrangeType↙simpleType↙indexType↙typeList↙ ~99:15
ASCIIcode] Of ASCIIcode;
≡'ASCIIcode]' /[A-zA-Z][A-zA-Z0-9_]*/
Of ASCIIcode;