Change the C parser to allow complex constants
authorTom Tromey <tom@tromey.com>
Wed, 1 Apr 2020 20:09:52 +0000 (14:09 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 1 Apr 2020 20:09:53 +0000 (14:09 -0600)
commitfa649bb7d3c8fd97c1d8f01a3023094468f66ca4
tree3c98b9f09421c287261c998a4fe9938f464d0e8e
parent981c08ce72f5b8729381ddebf2f3fe5f1e000638
Change the C parser to allow complex constants

This changes the C parser to allow complex constants.  Now something
like "print 23i" will work.

There are no tests in this patch; they come later.

gdb/ChangeLog
2020-04-01  Tom Tromey  <tom@tromey.com>

* c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
(exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
(parse_number): Handle complex numbers.
gdb/ChangeLog
gdb/c-exp.y