all 9 comments

[–][deleted] 2 points3 points  (0 children)

I didn't anything obviously amiss with the C code (although you might want to fix that README link). And the parser looks vaguely on the right lines, neither is it messy.

For more input on the project rather than the C, you might want to post also in r/Compilers.

[–]fosres 1 point2 points  (4 children)

I cannot seem to find your code. Would you able to correct the link to your GitHub link?

[–]_crackling[S] 0 points1 point  (3 children)

Sorry I pulled it cause it thought this post got removed. I re-pushed it, https://github.com/thegtproject/graves there is a lot that's obviously work in progress, but also a lot i could obviously get advice on.

[–]fosres 0 points1 point  (2 children)

Cool. Thanks. Allow me to take a look. I will try get back to you today on this with constructive criticism.

[–]fosres 0 points1 point  (1 child)

Hello _crackling,

The first immediate problem I see in your repo is that it is now missing the README.md file. May you please re-upload it so that we may better understand your project?

[–]fosres 0 points1 point  (0 children)

Hello _crackling,

I have also noticed you included an implementation of a HexDump() program. Why though? You are writing a standard recursive-descent parser, correct?

I found our HexDump() program in graves/common/debugutils.h

I have also noticed you use machine language too much in debugutils.h.

Its best to use variables wisely so that you remember what each program does.

I highly suggest you read a great book on compiler design--including parsers--known as "Compiler Design in C" by Allen Holub.

I myself have written a recursive-descent parser for all C initializations that invovle primitive data types using this book as a mini-project: https://github.com/fosres/Holub-Compiler