• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Book Recommendations

Is there a length limit on posts? Anybody know what it is?

I dumped an arbitrarily large piece of text into the reply box and hit preview and got this message:

The text that you have entered is too long (68569 characters). Please shorten it to 50000 characters long.

So assuming that message isn't lying, 50000 characters.
 
You can't necro a sticky.

Good idea, Dogs -- seems believable. Thanks!
 
OK, I've posed a pretty big update. It's been a long time, so there's lots of refreshing for newer versions, a couple new sections, and about a dozen new books.

But I'm at 46,000 characters, so I can't write much more. How can I remedy that? In other threads, I've used the second post to continue the first, but it's too late for that; someone else has the second post already. New thread, then pursue a new sticky? Link to something? Something else?
 
But I'm at 46,000 characters, so I can't write much more. How can I remedy that? In other threads, I've used the second post to continue the first, but it's too late for that; someone else has the second post already. New thread, then pursue a new sticky? Link to something? Something else?

My vote would be for a new thread, new sticky, and a link to the old thread inside of the new thread for anybody who cares to read the discussion contained herein.
 
Mike, maybe you can give me some advice on a compiler I am working on, or perhaps point me towards some relevant literature.

I'm writing a compiler for a non-programming language (SystemRDL to be specific). The language spec includes a grammar for the ANLTR framework, so I don't have to implement the lexer or syntactic analysis.

My general strategy is to parse the input and create an abstract syntax tree, and then walk the tree and generate the desired output.

The language supports scoping, component definitions, component instantiations among other things. I'm struggling to build and manage the data structures to track this information (presumably via some sort of symbol table) as I walk the AST. I suspect this is a well understood problem, but I'm not sure where to look. Any suggestions?
 
Last edited:
I don't have my Aho (dragon) book handy, as it is in storage. And I'm not familiar with the language you're supporting.

But, indeed, you want to implement a data structure that helps you implement the scoping you want. A tree of symbol tables is probably appropriate. Your abstract tree will carry along scoping information, and any symbol entered needs to land at the right symbol table to assure proper visibility. Rather than simply probing the symbol table, you'll end up probing to start at the correct scope, then going to larger scopes depending on whatever rules and visibility the language allows.
 
Back
Top