Author: muggenhor
Date: Mon Apr 28 02:04:40 2008
New Revision: 4830

URL: http://svn.gna.org/viewcvs/warzone?rev=4830&view=rev
Log:
Add a new bison/yacc parser: level_parser.y:
 * Change level_lexer.l: 
  * Use lev_lval to return token-data in (instead of global vars)
  * Use strdup() to return strings to the parser and let the parser take care 
of memory clean-up (through Bison's %destructor directive)
  * Use the token constants as generated by Bison (instead of our own custom 
enum)
 * Rip out the custom state machine-like level parser from levels.c (was 
function levParse)
  * Remove all global variables associated with this parser
  * Remove the LP_* enum which was only used by this parser
  * Move function lev_error to level_parser.y
 * The new parser provides more verbose error messages if parsing fails

NOTE: The previous state machine-parser actually maintained state in two 
variables, so it was rather overly complex (quadratic complexity if you like)

Added:
    trunk/src/level_parser.y   (with props)
Modified:
    trunk/src/   (props changed)
    trunk/src/Makefile.am
    trunk/src/Makefile.raw
    trunk/src/level_lexer.l
    trunk/src/levelint.h
    trunk/src/levels.c


_______________________________________________
Warzone-commits mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-commits

Reply via email to