lib/antelope/generator/templates/c_header.ant in antelope-0.3.2 vs lib/antelope/generator/templates/c_header.ant in antelope-0.4.0
- old
+ new
@@ -1,36 +1,36 @@
-#ifndef _%{guard_name}_H
-#define _%{guard_name}_H
-
-% if define_stype?
-typedef union {
- %{union_body}
-} %{stype};
-% end
-
-enum %{prefix}tokentype {
-% starting = 257
- %{token_prefix}EOF = 0,
-% grammar.terminals.each_with_index do |terminal, i|
- %{token_prefix}%{terminal.name} = %{starting + i},
-% end
-};
-
-typedef struct {
- struct %{prefix}stack_element* elements;
- unsigned int current;
- unsigned int max;
- unsigned char free;
-} %{prefix}pstate;
-
-#define %{upper_prefix}PUSH_MORE -1
-#define %{upper_prefix}TERMINALS %{grammar.terminals.size}
-#define %{upper_prefix}STATES %{table.size}
-
-const char* %{prefix}token_string(%{terminal_type} token);
-int %{prefix}lex(%{stype}* lval%{lex_params});
-int %{prefix}parse_push(%{parse_params});
-int %{prefix}parse_pull(%{parse_params});
-%{prefix}pstate* %{prefix}pstate_new();
-void %{prefix}pstate_delete(%{prefix}pstate* stack);
-
-#endif
+#ifndef _%{guard_name}_H
+#define _%{guard_name}_H
+
+% if define_stype?
+typedef union {
+ %{union_body}
+} %{stype};
+% end
+
+enum %{prefix}tokentype {
+% starting = 257
+ %{token_prefix}EOF = 0,
+% grammar.terminals.each_with_index do |terminal, i|
+ %{token_prefix}%{terminal.name} = %{starting + i},
+% end
+};
+
+typedef struct {
+ struct %{prefix}stack_element* elements;
+ unsigned int current;
+ unsigned int max;
+ unsigned char free;
+} %{prefix}pstate;
+
+#define %{upper_prefix}PUSH_MORE -1
+#define %{upper_prefix}TERMINALS %{grammar.terminals.size}
+#define %{upper_prefix}STATES %{table.size}
+
+const char* %{prefix}token_string(%{terminal_type} token);
+int %{prefix}lex(%{stype}* lval%{lex_params});
+int %{prefix}parse_push(%{parse_params});
+int %{prefix}parse_pull(%{parse_params});
+%{prefix}pstate* %{prefix}pstate_new();
+void %{prefix}pstate_delete(%{prefix}pstate* stack);
+
+#endif