summaryrefslogtreecommitdiff
path: root/sched
diff options
context:
space:
mode:
authorJonathan <jonathan@jonathan-VirtualBox.(none)>2014-01-09 17:51:25 +0100
committerJonathan <jonathan@jonathan-VirtualBox.(none)>2014-01-09 17:51:25 +0100
commit438b8e30bd7d4e186554a899d9fc86fc4bc65a9e (patch)
tree343843b5e173892fce45e913ac6b91f1ab1b9739 /sched
parent36a354fc8b914f6b96cba19a67c8f6ce712ac656 (diff)
downloadSystDigit-Projet-438b8e30bd7d4e186554a899d9fc86fc4bc65a9e.tar.gz
SystDigit-Projet-438b8e30bd7d4e186554a899d9fc86fc4bc65a9e.zip
Implémentation de la multiplication ; correction d'un bug dans netlist_gen ; ajout de la localisation des erreurs dans sched/.
Diffstat (limited to 'sched')
-rw-r--r--sched/netlist_lexer.mll9
1 files changed, 8 insertions, 1 deletions
diff --git a/sched/netlist_lexer.mll b/sched/netlist_lexer.mll
index 60cb223..ec27367 100644
--- a/sched/netlist_lexer.mll
+++ b/sched/netlist_lexer.mll
@@ -1,5 +1,6 @@
{
open Netlist_parser
+open Lexing
exception Eof
let keyword_list =
@@ -22,10 +23,16 @@ let keyword_list =
"XOR", XOR;
]
+let newline lexbuf =
+ let pos = lexbuf.lex_curr_p in
+ lexbuf.lex_curr_p <-
+ { pos with pos_lnum = pos.pos_lnum + 1; pos_bol = pos.pos_cnum }
+
}
rule token = parse
- [' ' '\t' '\n'] { token lexbuf } (* skip blanks *)
+ | '\n' { newline lexbuf ; token lexbuf }
+ | [' ' '\t'] { token lexbuf } (* skip blanks *)
| "=" { EQUAL }
| ":" { COLON }
| "," { COMMA }