Menu
  • HOME
  • TAGS

Never declared custom class members in lemon-generated parser cause compile errors

c++,c++11,lemon

You have a missing curly brace in AST.h. The first error message you received indicated that the given declaration wasn't allowed "in-class". This is the clue that you need. It looks like it's not supposed to be in a class, so why does the compiler think that it is? This...

Using midaction rules in Lemon to interpret “let” expression

parsing,interpreter,lalr,lemon

It's really not a very scalable solution to evaluate immediately in a parser. See below. It is true that mid-rule actions are (mostly) syntactic sugar. However, in most cases they are not syntactic sugar for "markers" (non-terminals with empty right-hand sides) but rather for non-terminals representing production prefixes. For example,...