> On 22 Aug 2022, at 18:12, Maury Markowitz <maury.markow...@gmail.com> wrote: > > In my BASIC interpreter’s bison code I have one of these: > > CHANGE variable TO variable … > CHANGE is from the original Dartmouth BASIC. It turns out that HP included an > identical feature in their dialect, CONVERT. So I did: … > CONVERT variable TO variable > Works great. > > My question is whether there is a simple way to combine the two to eliminate > the duplicated code?
For example: CHANGE_or_CONVERT variable TO variable; CHANGE_or_CONVERT: CHANGE | CONVERT;