This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gdb expression parser for Cobol?
- From: "Cuthbertson, Reva D." <reva_cuthbertson at hp dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Thu, 2 Jun 2005 15:38:42 -0700
- Subject: gdb expression parser for Cobol?
Hello,
Has anyone written a Cobol expression parser for gdb? Is it possible to
support "abbreviated combined relation expressions" using existing gdb
parsing techniques?
For example, in Cobol, you could have:
A NOT EQUAL B OR C
This statement translates into (A NOT EQUAL B) OR (A NOT EQUAL C)
To express this in 'C', for example, one could write:
exp : exp NOTEQUAL exp OROR exp
;
How would you write the expression tree to go with this grammar rule? I
think the first "exp" before the NOTEQUAL needs to be repeated to build
up the two NOTEQUAL expressions, but I am not sure if this is possible.
Has anyone tried to support such expressions before?
Thanks!
Reva Cuthbertson
reva_cuthbertson@hp.com