Re: Tokens to patterns?
Akim Demaille <[email protected]> Fri, 1 Jan 2021 08:19:20 +0100
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christian, > Le 31 déc. 2020 à 14:27, Christian Schoenebeck <[email protected]> a écrit : > > That even seems to work in combination with type specifiers and string > literals: Yes, and that's documented and stable. > %token <sval> ONE "one" > %token <ival> TWO "two" > %token <dval> THREE "three" > > -> > > %token <sval> ONE "one" <ival> TWO "two" <dval> THREE "three" > > Not exactly human friendly to read though. \n is meaningless, you don't have to put everything on one line. I like this style: > %token > <sval> > ONE "one" > TWO "two" > <dval> > THREE "three" > FOUR > FIVE Cheers, and happy new year!