-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparser.lisp
29 lines (23 loc) · 902 Bytes
/
parser.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;;; -*- Mode: LISP, Syntax: COMMON-LISP, Package: MONTY.PARSER -*-
;;;;
;;;; Author: Gautham Ganapathy (gautham@lisphacker.org)
;;;;
;;;; TPTP language parser.
(in-package :cl-tptp-parser.parser)
#|
(defun parse-file (filename)
(make-instance 'tptp-file
:statements (yacc:parse-with-lexer (make-file-lexer filename) *tptp-grammar*)
:token nil))
|#
(defun parse-file (filename)
(let ((statements (yacc:parse-with-lexer (make-file-lexer filename) *tptp-grammar*)))
(make-instance 'file
:statements statements
:token nil)))
(defun parse-syn ()
(parse-file "/home/gautham/work/lisp/cl-tptp-parser/test/SYN000+1.p"))
(defun parse-test-0 ()
(parse-file "/home/gautham/work/tptp/TPTP-v6.0.0/tptp/AGT/AGT001+1.tptp"))
(defun parse-test-1 ()
(parse-file "/home/gautham/work/tptp/TPTP-v6.0.0/Problems/AGT/AGT001+1.p"))