Syntactical error when yacc file is called

74 views Asked by At

I am trying to build an XTAG parser from source. The relevant files can be fetched from ftp://ftp.cis.upenn.edu/pub/xtag/lem. I understand that this particular TAG parser is decades old and there are plenty of newer options, but I need this specific parser to work, as I need to use the XTAG grammar, and I do not know of any other parsers that can handle it.

There is a file (treefile.y, among others) that has the following line at the top: # -*- perl -*-. It is being called from a Makefile like: /usr/bin/byacc -P treefile.py. I recognize the Emacs mode string, but both yacc and byacc (version 2.0) throw a syntax error at the "#". I figured it might be a typo, but all yacc files have the same thing. I tried using a shebang like: #! -*- perl -*- but to no avail. The README requires Perl version 5 or later, which I have. I am running Ubuntu 22.04.2 LTS on VirtualBox (it is mentioned that the parser was only ever tested on SunOS 5.7 and Linux 2.2). Any help is appreciated (and if anyone has a suggestion for an alternative to resurrecting an ancient LTAG parser from antiquity, I'd love to know).

1

There are 1 answers

1
aram10 On BEST ANSWER

The only answer is that resurrecting this ancient software is a lost cause.