Permalink
Browse files

more little fixes

  • Loading branch information...
smoothie30 committed Apr 26, 2012
1 parent 0481c26 commit e1fc593a90d07e665d48dec5a572a0f28062ae86
View
Binary file not shown.
View
BIN .DS_Store
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -30,8 +30,8 @@ selection_stmt
: IF_T assignment_expr '{'stmt'}' (ELSE_T '{'stmt'}')?
;
iteration_stmt
- : FOREACH_T COURSE_T ID IN_T ID '{'(stmt)*'}'
- ;
+ : FOREACH_T COURSE_T ID IN_T ID '{' (declarator';')* (stmt)* '}'
+ ; // iterations only exist for courses
jump_stmt
: BREAK_T
;
@@ -58,13 +58,13 @@ unary_expr
;
postfix_expr
: (ID '.')? primary_expr ( '(' (argument_expr_list)? ')' )?
- ;
+ ; // doesn't accept postfix_expr.postfix_expr, only id.postfix_expr
primary_expr
: constant
| ID
| STRING
| '('assignment_expr')'
- ;
+ ; // does parser need to also recognize dates and times? i.e. MW 1:10-2:25
argument_expr_list
: (assignment_expr) (',' assignment_expr)*
;
@@ -75,6 +75,8 @@ constant
type_specifier
: INT_T
| DOUBLE_T
+ | TIME_T
+ | DAY_T
| STRING_T
;
derived_type_specifier
View
@@ -0,0 +1,61 @@
+T__37=37
+T__38=38
+T__39=39
+T__40=40
+T__41=41
+T__42=42
+T__43=43
+T__44=44
+T__45=45
+T__46=46
+T__47=47
+T__48=48
+T__49=49
+T__50=50
+AND=4
+BREAK_T=5
+CHAR=6
+COMMENT=7
+COURSELIST_T=8
+COURSE_T=9
+DAY_T=10
+DOUBLE_T=11
+ELSE_T=12
+EQ=13
+ESC_SEQ=14
+EXPONENT=15
+FLOAT=16
+FOREACH_T=17
+GEQ=18
+HEX_DIGIT=19
+ID=20
+IF_T=21
+INT=22
+INT_T=23
+IN_T=24
+LEQ=25
+NEQ=26
+NEW_T=27
+NOT=28
+OCTAL_ESC=29
+OR=30
+SCHEDULE_T=31
+STRING=32
+STRING_T=33
+TIME_T=34
+UNICODE_ESC=35
+WHITESPACE=36
+'('=37
+')'=38
+'*'=39
+'+'=40
+','=41
+'-'=42
+'.'=43
+'/'=44
+';'=45
+'<'=46
+'='=47
+'>'=48
+'{'=49
+'}'=50
Oops, something went wrong.

0 comments on commit e1fc593

Please sign in to comment.