[antlr-interest] Help me the chemmestry forumla grammer?

John B. Brodie jbb at acm.org
Sat Mar 11 09:28:03 PST 2006

Jun Tsai wrote:
>hi all.


>I want to parse a chemestry forumla.such as:
>A2(B3)2C3  => A2B6C3
>A2(AB3)2C3 =>A4B6C3
>A(CB3)2C3 =>A1B6C5
>How to do it?

see attached. doing this was fun for me - thanks!. i've been away from
antlr for toooooo long....

hope this helps

(note i am using some new, to me, e-mail software, so if the
attachment doesn't work for you let me know and i'll try again)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Chemicals.g
Type: application/octet-stream
Size: 2205 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20060311/ee123b87/Chemicals-0001.obj

More information about the antlr-interest mailing list