visual-decaf / decaf-compiler

Compiler of decaf language
1 stars 3 forks source link

使用更直观的字符串表示token #58

Closed DistinctWind closed 1 year ago

DistinctWind commented 1 year ago

根据bison文档的这一小节

Once you equate the literal string and the token kind name, you can use them interchangeably in further declarations or the grammar rules.

既然可以互换使用,就没必要写麻烦的token全名了啊。

而且发现 #57 生成的Parser实现图会使用这个更直观的字符串,能获得更好的效果。