News for hackers. Stuff that matters.
Re:The Jim Roskind C/C++ Grammar (2018) by jey on Friday October 09, 2020 @10:43AM (#24730350)
This email it links to is a fun read about ambiguities in parsing C: https://pdos.csail.mit.edu/archive/l/c/roskind.html

    # Getting back to your example, since you copied the grammar from the ANSI
    # Standard, your grammar is probably wrong.  To expose the problem, try
    # parsing:
    #
    #         typedef int A, B(A); /* my bet is you get a syntax error*/
    #
    # When correctly parsed, the above is equivalent to:
    #
    #         typedef int A;
    #         typedef int B(A);
    #
    # or simply:
    #
    #         typedef int A;
    #         typedef int B(int); /* B's type is function taking an int
    #                 returning and int */

There are no comments on this comment yet.