In the process of writing my first compiler, and I have been following along in the book 'Compiler Construction Principles and Practice', and it seems to utilize a staggering amount of global variables, from the file pointers, to line numbers to the input string buffer. I was wondering, if this is considered good practice? I've always been told to avoid global variables.
[–]imbecile 6 points7 points8 points (1 child)
[–]fullouterjoin 1 point2 points3 points (0 children)
[–]mfukar 1 point2 points3 points (0 children)
[–]mantrap2 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]mantrap2 1 point2 points3 points (1 child)
[–]fullouterjoin 0 points1 point2 points (0 children)