mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
16 lines
420 B
OCaml
16 lines
420 B
OCaml
(* Copyright 2005 INRIA *)
|
|
{
|
|
open Lexing;;
|
|
open Parsedimacs;;
|
|
}
|
|
|
|
let number = ['0' - '9']+
|
|
|
|
rule token = parse
|
|
| ' ' { token lexbuf }
|
|
| 'p' { P }
|
|
| "cnf" { CNF }
|
|
| '\n' { EOL }
|
|
| "c " [^ '\n']* '\n' { token lexbuf }
|
|
| ['-']? number { LIT (int_of_string (Lexing.lexeme lexbuf)) }
|
|
| eof { EOF }
|