Previous: , Up: Retargeting Flex   [Contents][Index]


A.5.4 Translation Guidelines

The following assumptions in the code might trip you up and require fixes outside a back end.

  1. As previously noted, the item separator in data initializers is a comma. Flex does not assume that a trailing comma after the last initializer element is legal, though it is legal in C/C++.
  2. Either case arms can be stacked as in C; that is, there is an implicit fallthrough if the case arm has no code. Or, there is an explicit fallthrough keyword that enables this, as in Go.

By putting a yyterminate() call in the expansion of M4_HOOK_EOF_STATE_CASE_FALLTHROUGH and defining an empty M4_HOOK_EOF_STATE_CASE_TERMINATE macro, you could handle languages like Pascal.


Previous: Development Steps, Up: Retargeting Flex   [Contents][Index]