+
+
+/*---------------------------------------------------------------.
+| TEXT is expexted tp be @$ in some code associated to a symbol: |
+| destructor or printer. |
+`---------------------------------------------------------------*/
+
+static inline void
+handle_symbol_code_at (char *text, location_t location)
+{
+ char *cp = text + 1;
+ if (*cp == '$')
+ obstack_sgrow (&string_obstack, "]b4_at_dollar[");
+ else
+ complain_at (location, _("%s is invalid"), quote (text));
+}
+
+
+/*-------------------------------------------------------------------.
+| Dispatch onto handle_action_at, or handle_destructor_at, depending |
+| upon CODE_KIND. |
+`-------------------------------------------------------------------*/
+
+static void
+handle_at (braced_code_t braced_code_kind,
+ char *text, location_t location)
+{
+ switch (braced_code_kind)
+ {
+ case action_braced_code:
+ handle_action_at (text, location);
+ break;
+
+ case destructor_braced_code:
+ case printer_braced_code:
+ handle_symbol_code_at (text, location);
+ break;
+ }
+}
+
+
+/*-------------------------.
+| Initialize the scanner. |
+`-------------------------*/
+
+void
+scanner_initialize (void)
+{
+ obstack_init (&string_obstack);
+}
+
+
+/*-----------------------------------------------.
+| Free all the memory allocated to the scanner. |
+`-----------------------------------------------*/
+
+void
+scanner_free (void)
+{
+ obstack_free (&string_obstack, 0);
+ /* Reclaim Flex's buffers. */
+ yy_delete_buffer (YY_CURRENT_BUFFER);
+}