OSSP CVS Repository

ossp - Check-in [1403]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1403
Date: 2001-Dec-04 14:37:55 (local)
2001-Dec-04 13:37:55 (UTC)
User:simons
Branch:
Comment: Updated the BNF grammar for the arithmetik parser.
Tickets:
Inspections:
Files:
ossp-pkg/var/var.pod      1.9 -> 1.10     14 inserted, 1 deleted

ossp-pkg/var/var.pod 1.9 -> 1.10

--- var.pod      2001/12/03 10:51:27     1.9
+++ var.pod      2001/12/04 13:37:55     1.10
@@ -618,7 +618,7 @@
 
  variable   : '$' (name|expression)
 
- expression : START-DELIM (name|variable)+ (':' command)* END-DELIM
+ expression : START-DELIM (name|variable)+ (START-INDEX num-exp END-INDEX)? (':' command)* END-DELIM
 
  name       : (VARNAME)+
 
@@ -633,10 +633,23 @@
             | 'l'
             | 'u'
 
+ num-exp    : operand
+            | operand ('+'|'-'|'*'|'/'|'%') num-exp
+
+ operand    : ('+'|'-')? NUMBER
+            | CURR-INDEX
+            | '(' num-exp ')'
+
  START-DELIM: '{'
 
  END-DELIM  : '}'
 
+ START-INDEX: '['
+
+ END-INDEX  : ']'
+
+ CURR-INDEX : '#'
+
  VARNAME    : '[a-zA-Z0-9_]+'
 
  NUMBER     : '[0-9]+'

CVSTrac 2.0.1