aboutsummaryrefslogtreecommitdiff
path: root/odf/odf_ExpressionLexer.mll
diff options
context:
space:
mode:
Diffstat (limited to 'odf/odf_ExpressionLexer.mll')
-rwxr-xr-xodf/odf_ExpressionLexer.mll11
1 files changed, 8 insertions, 3 deletions
diff --git a/odf/odf_ExpressionLexer.mll b/odf/odf_ExpressionLexer.mll
index 28fce22..1db73c3 100755
--- a/odf/odf_ExpressionLexer.mll
+++ b/odf/odf_ExpressionLexer.mll
@@ -13,9 +13,13 @@ let newline = "\r\n" | '\n' | '\r'
let space = ['\t' ' '] | newline
let letters = ['A'-'Z' 'a'-'z']
-let identifier = letters (letters | digit | ['-' '_' '.'])* (letters | digit)+
-let text = letters | digit
+(* Function identifier.
+ Valid identifiers are :
+ ORG.OPENOFFICE.DAYSINMONTH
+ it cannot end with a digit.
+ *)
+let identifier = letters (letters | digit | ['-' '_' '.'])* letters+
let cell = letters+ digit+
@@ -36,7 +40,7 @@ rule read = parse
| '+' { PLUS }
| '-' { MINUS }
| '/' { DIVIDE }
- | '"' { read_string (Buffer.create 17) lexbuf }
+ | '"' { read_string (Buffer.create 16) lexbuf }
| ';' { SEMICOLON }
| ':' { COLON }
| '[' { L_SQ_BRACKET }
@@ -47,6 +51,7 @@ rule read = parse
| '.' { DOT }
| letters+ as _1 { LETTERS _1}
+ | identifier as _1 { IDENT _1}
| '\000' { EOF }
| eof { EOF }