sablecc

Deleting certain classes on running an external tool in eclipse?

I've set an external tool (sablecc) in eclipse (3.4) that generates a bunch of classes in the current project. I need to run this tool and regenerate these classes fairly frequently. This means that every time I want to run sablecc, I have to manually delete the packages/classes that sablecc creates in order to ensure that I don't have c...

Best way to parse bbcode

I'd like to work on a bbcode filter for a php website. (I'm using cakephp, it would be a bbcode helper) I have some requirement. Bbcodes can be nested. So something like that is valid. [block] [block] [/block] [block] [block] [/block] [/block] [/block] Bbcodes can have 0 or more paramet...

shift/reduce conflict with SableCC

Hi guys! I'm at my first experience with SableCC and grammar definition. I have the following grammar (a part of it): query = {atop} attroperator | {query_par} l_par query r_par | {query_and} [q1]:query logic_and [q2]:query | {query_or} [q1]:query logic_or [q2]:query | {query_not} ...

Custom text editor for Eclipse starting from a parser created with SableCC

Hello everybody! The question of today is the following: I'm developing a code generator for my department at university. It's very simple: they want to use a custom "scripting" language really human readable, parse that and then translate these instructions in Java. I used SableCC to do the trick, it was really smooth. The problem now i...

SableCC Binary Grammar Productions - unable to fix shift/reduce conflict

Apparently, these productions (code extract below) "look good", but I am getting a shift/reduce error as follows: [Logical = Relational] followed by GreaterThan (reduce) [Relational = Relational GreaterThan Binary] (shift) Any insight would be greatly appreciated. Thanks! logical = {simple} relational | {exclusive_and}...