You can find all the possible tricks in making it debuggable by reading the y.tab.c
Including all the corner cases for odd compilers.
Re2c is a bit more modern if you don't need all the history of yacc.
But yes, you can put a line-oriented breakpoint on your action code and step through it.
There's also the issue in that the following two things don't have the same semantics in C:
float v = a * b + c;
vs static_inline float get_thing(float a, float b) {
return a*b;
}
float v = get_thing(a, b) + c;
This is just a C-ism (floating point contraction) that can make extracting things into always inlined functions still be a big net performance negative. The C spec mandates it sadly!uintptr_t's don't actually have the same semantics as pointers either. Eg if you write:
void my_func(strong_type1* a, strong_type2* b);
a =/= b, and we can pull the underlying type out. However, if you write: void my_func(some_type_that_has_a_uintptr_t1 ap, some_type_that_has_a_uintptr_t2 bp) {
float* a = get(ap);
float* b = get(bp);
}
a could equal b. Semantically the uintptr_t version doesn't provide any aliasing semantics. Which may or may not be what you want depending on your higher level language semantics, but its worth keeping the distinction in mind because the compiler won't be able to optimise as well float v = (float) ((float) a) * ((float) b) + c;
Since v is float, the cast representing the return conversion can be omitted: float v = ((float) a) * ((float) b) + c;
Now, if a and b are already float, then it's equivalent. Otherwise not; if they are double or int, we get double or int multiplication in the original open code.> Nearly one in four car drivers killed in 2024 were aged 70 or older, according to government figures.
So, somewhat less than 25%. Let's guess 23% or whatever.
What are the age demographics? According to 2024 stats, 19.7% of the UK was aged 65 or older. 17% in the 0-14 age range.
Thus 65-year-olds and older make up 23.7% of the population older than 14.
It seems, roughly, as if the proportion of 70-year-olds and older might be more or less in line with their representation in the driving age population.
It's not the statistics we need, but close enough to defeat the alarmist idea of OMG, a whopping quarter (almost) fatalities are 70+; get the old buggers off the roads!