/var/spool/weblog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Geek News del.icio.us bookmarks RSS |
Sat, Apr 30, 2005
Static models
/var/spool/courses/csuf/2005/spring/cpsc465 # Fri, Apr 29, 2005
Assignment 3
/var/spool/courses/csuf/2005/spring/cpsc423 #
No class tonight
/var/spool/courses/csuf/2005/spring/cpsc423 # Wed, Apr 27, 2005
Assignment 5
/var/spool/courses/csuf/2005/spring/cpsc465 # Mon, Apr 25, 2005
Today's Lab Exercises
/var/spool/courses/csuf/2005/spring/cpsc461 # Tue, Apr 19, 2005
Optical Illusions
/var/spool/courses/csuf/2005/spring/cpsc465 #
Example Lexical Analyzer
This is a scanner generated by Flex, the GNU Fast Lexical Analyzer generator. You need the .c and .h files to compile a working program. The file example.l is the Flex source file; you won't need this unless you want to change the scanner. The file lex.yy.c was generated with the command flex -l example.l. Take a look at main.c to see how the lexical analyzer works. Call yylex() to get the next token. The value returned by yylex() will be one of the token types defined in y.tab.h. When yylex() finishes, the variable yytext will contain the corresponding lexeme. /var/spool/courses/csuf/2005/spring/cpsc423 # Mon, Apr 18, 2005
Lab Exercises
/var/spool/courses/csuf/2005/spring/cpsc461 # Wed, Apr 13, 2005
For Windows people
/var/spool/courses/csuf/2005/spring/cpsc423 #
Test Generator
While the code is a little complicated by the need to keep track of declared variables and indentation, really all it does is use the grammar the way Chomsky intended, in "reverse", to generate new programs. Note too that while the programs are syntactically correct and obey the rules that I set down in the assignment for the use of identifiers, they're completely meaningless. /var/spool/courses/csuf/2005/spring/cpsc423 #
I give up
/var/spool/courses/csuf/2005/spring/cpsc423 #
Yet another syntax error
should beWHILE i < 9 OR i = 9 DO You're only allowed to leave off the parentheses if there's a single expression (as in the fibonacci program). What can I can say? Writing programs without a parser to check them isn't easy.WHILE (i < 9) OR (i = 9) DO /var/spool/courses/csuf/2005/spring/cpsc423 # Tue, Apr 12, 2005
Assignment 4
/var/spool/courses/csuf/2005/spring/cpsc465 #
Using Context-Free Grammars for Evil
Behold SCIgen - An Automatic CS Paper Generator Disclaimer: if you try submitting one of these to a class and you get caught, don't blame me. /var/spool/courses/csuf/2005/spring/cpsc423 # Mon, Apr 11, 2005
Lab Exercises
/var/spool/courses/csuf/2005/spring/cpsc461 # Fri, Apr 08, 2005
Stupid Spammer Tricks
But here's a new twist. The other day I got a spam e-mail whose subject line included the word "quadric." Since we'd been talking about quadric surfaces in my graphics class just the other day, they almost got me to read their stupid advertisement. I figured it was just a coincidence until yesterday I got one whose subject line contained "cryptanalysis." I gather they've taken to scraping web pages: when they decide to spam whomever@example.com, they first check to see if there's a www.example.com, then grab a statistically significant word from that page and use it in the subject line, hoping to fool you into opening it. Clever, but not clever enough. Did I mention that both of the e-mails had already been automatically filed under "Spam?" /var/spool/courses/csuf/2005/spring/cpsc433/misc #
The DNS Poisoning Attacks
The attacks are serious enough that the Internet Storm Center has raised their Infocon level to "Yellow." I know this because the icon in my system tray has turned yellow and started flashing. /var/spool/courses/csuf/2005/spring/cpsc433/misc #
Syntax Error
/var/spool/courses/csuf/2005/spring/cpsc423 # Mon, Apr 04, 2005
Schedule Change
/var/spool/courses/csuf/2005/spring/cpsc461 #
Lab Session
/var/spool/courses/csuf/2005/spring/cpsc461 # |
Topics
Archives
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||