Adding custom java code to Token classes

23 views
Skip to first unread message

John Jack DaNiMoTh

unread,
Feb 14, 2013, 10:30:01 AM2/14/13
to sab...@googlegroups.com
Hi all,

and thanks for this beautiful project.

I'm now searching a way to add custom code to Token classes (it's basically an equals method, which controls token's text). I don't want to rewrite it every time I generate the files.

I'm using SableCC 3.7. Can you help me?

Many thanks in advance.

Etienne Gagnon

unread,
Feb 14, 2013, 10:41:33 AM2/14/13
to sab...@googlegroups.com
Hi John Jack,

By design, SableCC's generated classes are not meant to be modified. If
you wish to change the default token class template, you can do so by
modifying the tokens.txt and other *.txt template files in SableCC's jar
file. You can do it without even recompiling the source code.

Have fun!

Etienne

Etienne Gagnon, Ph.D.
http://sablecc.org

Le 2013-02-14 10:30, John Jack DaNiMoTh a �crit :
Reply all
Reply to author
Forward
0 new messages