parser.h: Add comments explaining *bufptr
authorFather Chrysostomos <sprout@cpan.org>
Tue, 3 Jul 2012 21:00:00 +0000 (14:00 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 3 Jul 2012 21:01:07 +0000 (14:01 -0700)
parser.h

index de69a2d..1d5a7a8 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -64,9 +64,11 @@ typedef struct yy_parser {
     I32                lex_allbrackets;/* (), [], {}, ?: bracket count */
     SUBLEXINFO sublex_info;
     SV         *linestr;       /* current chunk of src text */
-    char       *bufptr;        
-    char       *oldbufptr;     
-    char       *oldoldbufptr;  
+    char       *bufptr;        /* carries the cursor (current parsing
+                                  position) from one invocation of yylex
+                                  to the next */
+    char       *oldbufptr;     /* in yylex, beginning of current token */
+    char       *oldoldbufptr;  /* in yylex, beginning of previous token */
     char       *bufend;        
     char       *linestart;     /* beginning of most recently read line */
     char       *last_uni;      /* position of last named-unary op */