Permalink
Browse files

Introduce a leex scanner for ISO8601 data.

  • Loading branch information...
1 parent 9f788e0 commit 5cd6103bb001a3a7d2c2c0359b668e6a281f88f9 @jlouis committed Oct 19, 2010
Showing with 23 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +22 −0 src/inet_time_scanner.xrl
View
@@ -1,2 +1,3 @@
*.beam
deps
+/src/inet_time_scanner.erl
@@ -0,0 +1,22 @@
+
+Definitions.
+
+DIGIT = [0-9]
+ALPHA = [A-Z]
+
+Rules.
+
+DIGIT+ :
+ {token,{integer,TokenLine,list_to_integer(TokenChars)}}.
+
+(,) : {token, comma}.
+(.) : {token, dot}.
+(\+) : {token, plus}.
+(-) : {token, minus}.
+(--) : {token, mminus}.
+(---) : {token, mmminus}.
+(:) : {token, colon}.
+ALPHA : {token, {alpha, TokenLine, TokenChars}}.
+
+Erlang code.
+

0 comments on commit 5cd6103

Please sign in to comment.