compiler-theory
Why we can't implement polymorphism in C++ without base class pointer or reference?
First of all have a look at the following code (in this code shape is the base class and line is the derived class)[详细]
2022-12-19 04:27 分类:问答Parsing "off-side" (indentation-based) languages
An off-side language is the one where ...the scope of declarations (a block) in that language is expressed by their indentation.[详细]
2022-12-18 13:02 分类:问答How do C compilers implement functions that return large structures?
The return value of a function is usually stored on the stack or in a register. But for a large structure, it has to be on the stack. How much copying has to happen in a real compiler for this code? O[详细]
2022-12-18 04:43 分类:问答LALR(2) dangling else
Is LALR(2) able to handle the dangling else case naturally (without any special rules, as开发者_开发百科 with LALR(1))?[详细]
2022-12-13 03:55 分类:问答Pac-Man representation with Finite State Automaton
Consider a game similar to pac-mac that we want to represent it with an FSA graph. We have a maze (table) and there are berries into it in random positions. The goal is to eat all the berries in the m[详细]
2022-12-11 08:04 分类:问答Syntax analysis question
In school we were assigned to design a language and then to implement it, (I\'m having so much fun implementing it =)). My teacher told us to use yacc/lex, but i decided to go with java + regex API, h[详细]
2022-12-11 07:21 分类:问答