gdb expression parser for Cobol?
Cuthbertson, Reva D.
reva_cuthbertson@hp.com
Thu Jun 2 22:39:00 GMT 2005
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
More information about the Gdb
mailing list