21 Commits

Author SHA1 Message Date
Josh Holtrop
0f82c9b43b directly use Node's children in UnitNode object 2011-08-31 10:43:16 -04:00
Josh Holtrop
9063eb10ce add more lexer tokens 2011-08-31 10:41:31 -04:00
Josh Holtrop
a2050cd5a0 fix a couple PLY lexer warnings 2011-08-31 10:27:36 -04:00
Josh Holtrop
6ac296e1d4 do not use yacc.yacc() outputdir option as this causes tables to always be regenerated 2011-08-31 10:26:31 -04:00
Josh Holtrop
94677bc79e report line and column number on parsing error 2011-08-30 16:20:38 -04:00
Josh Holtrop
1d44cc0e6e parser returns None if an error is seen 2011-08-30 16:07:27 -04:00
Josh Holtrop
9fe95aa7f2 convert lexer and parser into classes 2011-08-30 16:03:13 -04:00
Josh Holtrop
f534f3e753 properly lex a string with escaped characters 2011-08-30 13:59:15 -04:00
Josh Holtrop
854b82e088 add Node.visit() method 2011-08-30 13:35:51 -04:00
Josh Holtrop
ba80f5d9f7 fix string to not include doublequotes in value 2011-08-30 13:35:39 -04:00
Josh Holtrop
581be4f10d add "unit" top-level parsing target 2011-08-30 12:02:52 -04:00
Josh Holtrop
b8e617bd39 change Node to nodes module; use a class hierarchy for node types 2011-08-30 10:58:36 -04:00
Josh Holtrop
0b33cc7401 break out c_expr into statement/expression 2011-08-30 10:43:58 -04:00
Josh Holtrop
0a816d9636 parse functions return a Node instance 2011-08-30 10:40:22 -04:00
Josh Holtrop
6f64f6d6d9 add Node class 2011-08-30 10:39:52 -04:00
Josh Holtrop
1c20826e62 add a simple C-expression grammar rule 2011-08-29 16:47:56 -04:00
Josh Holtrop
c3b5db9f6e ignore parsetab.py 2011-08-29 16:36:34 -04:00
Josh Holtrop
dd4b51a272 write parsetab to parser directory 2011-08-29 16:36:20 -04:00
Josh Holtrop
39389c03d3 add empty parserules module, add parser.parse() method 2011-08-29 16:23:29 -04:00
Josh Holtrop
71f4b01c23 mv lexer.py -> lexrules.py, remove get_lexer() and ply import 2011-08-29 14:37:36 -04:00
Josh Holtrop
2b4de69ff8 add lexer skeleton 2011-08-29 10:01:23 -04:00