Andrew Lentvorski wrote: > And we've had s-expressions for longer than that. So why are there so
What is an s-expression? This whole thread is way beyond my area of expertise. I never had the opportunity to pick up much about this area of computer science. So I have a few questions... > As a fun exercise, inject a NUL character into *anything* going into C. > Oops. Security hole. Wouldn't it just terminate the string prematurely? How does it end up being a security hole? > better yet, the number of programs that still have hard-coded string and > buffer lengths. Oops. Stack smash. Assuming they are going onto the stack. > The fact that you recommend lex and yacc sums up the problem quite > nicely. There are many superior tools for parsing and lexing, and yet > nobody ever uses them. Such as? I thought lex and yacc were the ultimate tools for doing this sort of thing. I even have a book about them (which I am yet to read) on my bookshelf. Lately, I find that whenever I run into complicated computer science discussions with terms I do not understand I turn to wikipedia which seems to have very extensive coverage of the area. But many of the articles are not written such that someone who does not already have a masters in computer science will grok it. For example, while doing some reading on parsers we run into the term "context free grammar". What is this? So we link over to the wikipedia article on it and find lots of complicated notation without much in the way of explanation. http://en.wikipedia.org/wiki/Context-free_grammar I think I've figured out what a terminal and non-terminal and productions rules are. But Example 1 completely loses me. How does this grammar generate that language? What is that language? Why is it not regular? I understand example 2 and example 3 although it takes some concentration to see how all of those substitutions can work out. Example 4 loses me again. The stuff about derivations and syntax trees all seem pretty straightforward. -- Tracy R Reed http://copilotconsulting.com -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
