This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]