Converting SQL89 YACC rules to Parse::RecDescent

Tompkins@TransWebTools.com (Terry Tompkins)
3 Jul 2003 23:58:29 -0400

          From comp.compilers

Related articles
Converting SQL89 YACC rules to Parse::RecDescent Tompkins@TransWebTools.com (2003-07-03)
| List of all articles for this month |

From: Tompkins@TransWebTools.com (Terry Tompkins)
Newsgroups: comp.compilers
Date: 3 Jul 2003 23:58:29 -0400
Organization: http://groups.google.com/
Keywords: parse, question
Posted-Date: 03 Jul 2003 23:58:29 EDT

I'm having a left-recursion problem converting an LALR (YACC) spec to
LL (Parse::RecDescent). I've read a couple articles on eliminating
left recursion, and they have helped with the simpler rules. However,
I have one rule that is giving me trouble. Here is the rule with one
of its dependencies:


search_condition:
    search_condition /OR/i search_condition
  | search_condition /AND/i search_condition
  | /NOT/i search_condition
  | '(' search_condition ')'
  | predicate


predicate:
    comparison_predicate
  | between_predicate
  | like_predicate
  | test_for_null
  | in_predicate
  | all_or_any_predicate
  | existence_test


I'm assuming I would need to supply additional subrules. Any
suggestions?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.