I suspect from your description that you have not defined the operator tokens before the grammar. It would help if you would post your grammar.
--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en
---
You received this message because you are subscribed to the Google Groups "SableCC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sablecc+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Also I suggest reviewing some grammars that produce simple calculators. There may be one in the old SableCC grammar archive file or you can just Google one. Here’s one: http://improve.dk/writing-a-calculator-in-csharp-using-sablecc/
This grammar file is a little more complex than needed to just illustrate how to build a calculator, but the added complexity shouldn’t be too distracting.
From: sab...@googlegroups.com [mailto:sab...@googlegroups.com] On Behalf Of Corey Cason
Sent: Monday, January 11, 2016 3:03 PM
To: SableCC <sab...@googlegroups.com>
Subject: How to distinguish similar ascii sequences into separate tokens?
With sablecc3, how would I establish tokens such that free-form ascii strings (using characters 32-127) could be differentiated from ascii operator sequences, such that a production like the following is effective...