bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: question: is a long line still a problem in current bison version?


From: Stephan Sperber
Subject: Fwd: question: is a long line still a problem in current bison version?
Date: Thu, 27 Oct 2022 16:12:26 +0200

Yes msvc has a 16k limit. Line length or expression lenght. The first
simple idea was to just linebreak but it was just the same problem
with different errormsg.

The msvc ifdef guard came with a commit having exactly the same problem.

Disabling is a possible way to go, but why not just use some other
construct, i.e. if or switch, and support msvc better? The generated
assert has some use i think.

I dont know m4 very well, so i just wanted to give and get some thoughts.

Thx
Stephan


>
> On 2022-10-25 09:23, Stephan Sperber wrote:
> > Hi All,
> >
> > to explain my problem i opened a pull request on github. i hope it
> > explains my problem. (it is based on some old version)
> > https://github.com/akimd/bison/pull/95
> >
> > as i understand this line
> > https://github.com/akimd/bison/blob/master/data/skeletons/variant.hh#L488
> > of the latest and greatest
> > it is only generated if we dont have msvc.
> > so this kind of problem should be resolved for me if i just manage to
> > use a recent version, am i correct?
>
> Do you know whether long logical lines are a problem for MSVC,
> or is it just long physical (i.e. preprocessor) lines?
>
> C and C++ can be mechanically fit to a minum line width using backslash
> continuations. Backslash continuations can be in the middle of a token,
> so it can be done without regard for even token level syntax.
> A trivial text filtering program can do it.
>
> Here is chpped-up Hello, World:
>
> #inc\
> lu\
> de\
> <std\
> io.h>
>
> in\
> t mai\
> n(vo\
> id)
> {
>   pr\
> in\
> tf(\
> "h\
> ello,\
>  world!\n\
> ");
> }
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]