From 438b8e30bd7d4e186554a899d9fc86fc4bc65a9e Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 9 Jan 2014 17:51:25 +0100 Subject: =?UTF-8?q?Impl=C3=A9mentation=20de=20la=20multiplication=20;=20co?= =?UTF-8?q?rrection=20d'un=20bug=20dans=20netlist=5Fgen=20;=20ajout=20de?= =?UTF-8?q?=20la=20localisation=20des=20erreurs=20dans=20sched/.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sched/netlist_lexer.mll | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sched') 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 } -- cgit v1.2.3