* \author Michal Krol\r
*/\r
\r
-#include "imports.h" \r
-#include "slang_compile.h"\r
+#include "imports.h"\r
#include "grammar_mesa.h"\r
+#include "slang_compile.h"\r
#include "slang_preprocess.h"\r
\r
static const char *slang_version_syn =\r
\r
grammar_destroy (id);\r
\r
+ /* there can be multiple #version directives - grab the last one */\r
I = prod;\r
while (I < prod + size)\r
{\r
- *version = (unsigned int) I[0] + (unsigned int) I[1] * 100;\r
- *eaten = (unsigned int) I[2] + ((unsigned int) I[3] << 8) +\r
- ((unsigned int) I[4] << 16) + ((unsigned int) I[5] << 24);\r
+ *version =\r
+ (unsigned int) I[0] +\r
+ (unsigned int) I[1] * 100;\r
+ *eaten =\r
+ ((unsigned int) I[2]) +\r
+ ((unsigned int) I[3] << 8) +\r
+ ((unsigned int) I[4] << 16) +\r
+ ((unsigned int) I[5] << 24);\r
I += 6;\r
}\r
\r