我已将符号表转储到antlr中,但我有几个字段不清楚它们的含义。如果有对此的参考,请指出。该表具有标识符,然后是starttoken,endtoken,otherinfo。我已按组将其分解]
方括号是我的。在startToken中,我看到它开始的行(L:1)和列(:8)以及endtoken的相应结尾。开始(s),结束(e)和索引(i)是什么意思?没有看到押韵或理由。
Otherinfo =什么是国家?它不符合我所看到的任何东西。
这里有几行,因此您可以感觉到输出。
1565614310 - [TokenInformation: L:1, charPosInL:8, s:8, e: 11, i: 1] - [TokenInformation: L:1, charPosInL:8, s:8, e: 11, i: 1] - State: 737 - Type: Identifier
783141366 - [TokenInformation: L:3, charPosInL:0, s:17, e: 22, i: 3] - [TokenInformation: L:29, charPosInL:0, s:832, e: 832, i: 3] - State: 777 - Type: PUBLIC
688113407 - [TokenInformation: L:3, charPosInL:0, s:17, e: 22, i: 3] - [TokenInformation: L:3, charPosInL:0, s:17, e: 22, i: 3] - State: 781 - Type: PUBLIC
1638864144 - [TokenInformation: L:3, charPosInL:22, s:39, e: 39, i: 6] - [TokenInformation: L:29, charPosInL:0, s:832, e: 832, i: 6] - State: 798 - Type: LBRACE
谢谢
我找不到打印此信息的代码,所以我只能给出有根据的猜测:
对于状态号:记住,解析过程是由具有状态和转换的基础网络:ATN(增强的转换网络)控制的。
为了完整性:
length = end - start + 1
。注意:当我说“端口”时,这是不正确的。非Java版本是使用Java变体中的基本原理的重新实现。有显着差异。