semantic type checking analysis in bison
问题 I've been trying to find examples everywhere but it's been in vain. I am trying to write a basic Ruby interpreter. For this, I wrote a flex lexical file, containing token recognition sentences, and a grammar file. I wish for my grammar to contain semantic type checking. My grammar file contains, for example: arg : arg '+' arg This should be a valid rule for integers and floats. According to what I've read, I can specify type for a non terminal such as arg, like so: %type <intval> arg where