我已阅读this和this问题。他们是相当有帮助的,但我仍然对C语法分析器中的令牌生成有疑问。 如果词法分析器检测到int a2.5c;,那么根据我的理解,将会产生7个令牌。 int keyword
a identifier
2 constant
. special symbol
5 constant
c identifier
; special symbol
所以词法分析器不会报
我已通过文件输入码和我有根据它的数据和输出它的结果在一个文本文件以及.. 我的输出代码是下面产生.. public void Generator()
{
/// ....... Code
public void DisplayTOKENS()
{
using (StreamWriter writer =
new StreamWrite