Lojban In General

Lojban In General


Parsers won't compile in Linux

Use this thread to discuss the Parsers won't compile in Linux page.


Hello every body

I just signed up for this list. I have some trouble with the parsers available in lojban.org.

I use Ubuntu 8.10 and when I downloaded the .gz file and unziped it, then I went in to the directory of the unziped file and gave the command mentioned in the description page of the parser. Here I put the text of my screen:

cc -o parser *.c
cc: *.c: No existe el fichero ó directorio
cc: no hay ficheros de entrada

This would translate as:

cc -o parser *.c

cc: *.c: There is no such file or directory

cc: There are no input files

Then I tried to compile jbofi'e but that was harder and it didn't work either. I downloaded the packages the author says are needed (the ones recommended):

- bison (yacc probably OK, edit the makefile)
- flex (lex probably OK, ditto)
- an ANSI C compiler (gcc recommended)
- perl
- make (GNU make recommended)

then gave the commands detailed for a default installation

perl config.pl --prefix=/usr/local
make all
make install


But I got the following output:

oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo perl config.pl --prefix=/usr/local
oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo make all
sed -e 's/$Name: \(.*\) $/\1/;' < version.txt > version.h
gcc -O2 -DHAVE_MMAP=1 -DDEFAULT_DICTIONARY=\"/usr/local/lib/jbofihe/smujmaji.dat\" -c smujajgau.c
perl canonluj.pl < reduced_gismu > canonluj.inc
gcc -O2 -DHAVE_MMAP=1 -DDEFAULT_DICTIONARY=\"/usr/local/lib/jbofihe/smujmaji.dat\" -c canonluj.c
gcc -O2 -DHAVE_MMAP=1 -DDEFAULT_DICTIONARY=\"/usr/local/lib/jbofihe/smujmaji.dat\" -o smujajgau smujajgau.o canonluj.o
perl mkdict.pl > gismu_cmavo.dict
rm -f smujmaji.dat
./smujajgau smujmaji.dat gismu_cmavo.dict
Reading file gismu_cmavo.dict ...
Building transaction array from list ...
Sorting transaction array ...
Crunching transaction array ...
Write database ...
if -r lujvo-list; then \
perl lujvod.pl < ./lujvo-list > lujvo.dict ;\
./smujajgau smujmaji.dat lujvo.dict ;\
fi
if -r NORALUJV.txt; then \
perl noralujv.pl > noralujv.dict ;\
./smujajgau smujmaji.dat noralujv.dict ;\
fi
./smujajgau smujmaji.dat extradict places.dat patterns
Reading existing database ...
Reading file extradict ...
Reading file places.dat ...
Reading file patterns ...
Building transaction array from list ...
Sorting transaction array ...
Crunching transaction array ...
Write database ...
flex -t uncom.l > uncom.c
gcc -O2 -c uncom.c
<stdout>:536:25: error: la macro "yywrap" recibió 1 argumentos, pero solamente tomó 0
make: *** uncom.o Error 1
oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo make install
gcc -O2 -c uncom.c
<stdout>:536:25: error: la macro "yywrap" recibió 1 argumentos, pero solamente tomó 0
make: *** uncom.o Error 1
oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$

That last part seems to translate as:

gcc -O2 -c uncom.c

<stdout>:536:25: error: the macro "yywrap" recieved 1 arguments, but only took 0

make: *** uncom.o Error 1

oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo make install

gcc -O2 -c uncom.c

<stdout>:536:25: error: the macro "yywrap" recieved 1 arguments, but only took 0

make: *** uncom.o Error 1

oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$


Please Help! these parsers would be realy useful to have.

Oscar

_
Es tu última oportunidad para ganar premios por el simple hecho de buscar en internet.
http://www.ganabuscando.com/Default.aspx

posts: 3588

de'i li 22 pi'e 09 pi'e 2008 la'o fy. Oscar Lazo .fy. cusku zoi skamyxatra.
> I just signed up for this list. I have some trouble with the parsers
> available in lojban.org.
>
> I use Ubuntu 8.10 and when I downloaded the .gz file and unziped it, then I
> went in to the directory of the unziped file and gave the command mentioned
> in the description page of the parser. Here I put the text of my screen:
>
> cc -o parser *.c
> cc: *.c: No existe el fichero ó directorio
> cc: no hay ficheros de entrada

The parser is downloaded as a compressed shar file. After you uncompress it,
you're supposed to unarchive it by running 'sh parser.shar' at the shell. Then
you can do 'cc -o parser *.c'.

I don't think I can help you with jbofi'e.

mu'omi'e la'o gy. Minimiscience .gy.

--
no zo mi nenri zo bende


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 324

On Monday 22 September 2008 18:46:02 Oscar Lazo wrote:
> oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo make install
>
> gcc -O2 -c uncom.c
>
> <stdout>:536:25: error: the macro "yywrap" recieved 1 arguments, but only
> took 0
>
> make: *** uncom.o Error 1
>
> oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$

Ubuntu has a jbofihe package. Have you tried installing it?

Pierre


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 9

Pierre Abbat wrote:
> On Monday 22 September 2008 18:46:02 Oscar Lazo wrote:
>> oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$ sudo make install
>>
>> gcc -O2 -c uncom.c
>>
>> <stdout>:536:25: error: the macro "yywrap" recieved 1 arguments, but only
>> took 0
>>
>> make: *** uncom.o Error 1
>>
>> oscar@OSCAR-MOVIL:~/Documentos/lojban/jbofihe-0.38$
>
> Ubuntu has a jbofihe package. Have you tried installing it?
>
> Pierre

If it has a jbofihe package, it should probably also have a source package.
And comparing Ubuntu source and unofficial source you could find out what's
wrong with the official one.


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 953

On Mon, Sep 22, 2008 at 05:46:02PM -0500, Oscar Lazo wrote:
>
> Hello every body
>
> I just signed up for this list. I have some trouble with the parsers available in lojban.org.
>

The parser on http://www.lojban.org/tiki/tiki-index.php?page=Official+Parser&bl=y is an outdated version. I have had trouble compiling it myself.

Try this instead: http://home.ccil.org/~cowan/parser-3.0.00.tar.gz

(Incidentally, if someone reading this would be so kind as to update the wiki page and attach version 3.0.0. of the parser to it, that would be swell.)

--
Arnt Richard Johansen http://arj.nvg.org/
Hic est Olaus Brummus
Ursus paulus silvanos
Tiddeli-tiddeli bummus
Mi nomen Brummus est


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 40

On 9/23/08, Arnt Richard Johansen <arj@nvg.org> wrote:

> (Incidentally, if someone reading this would be so kind as to update
> the wiki page and attach version 3.0.0. of the parser to it, that would > be swell.)

Link added. If someone know (and I mean "know", not "guess") it's
official status, please clarify this in the wiki, please.

--
http://slobin.pp.ru/ `When I use a word,' Humpty Dumpty said,
<cyril@slobin.pp.ru> `it means just what I choose it to mean'


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.


The ubuntu package worked just fine. It took me a long time to realize that the lojban sentence was not supposed to be typed along with the command as in: "jbofihe sentence". Instead you have to give "jbofihe filename", where filename is the name of a textfile containing the lojban text jbofi'e will parse. As for the official parser I think I'll let that uninstalled, jbofi'e does exactly what that parser seems to do in XP so nevermind installing it.

Thank you all.

Oscar

_
Realiza búsquedas en Internet y llévate hasta ¡Un Auto!
http://www.ganabuscando.com/Default.aspx

On Tue, Sep 23, 2008 at 23:33, Oscar Lazo <geometricamente@hotmail.com> wrote:
> It took me a long time to realize that
> the lojban sentence was not supposed to be typed along with the command as
> in: "jbofihe sentence". Instead you have to give "jbofihe filename", where
> filename is the name of a textfile containing the lojban text jbofi'e will
> parse.

Or just "jbofihe", then type Lojban at the program, then Ctrl-D. (My
preferred method.)

Or "echo 'mi klama le zarci' | jbofihe".

mu'o mi'e .filip.
--

Philip Newton <philip.newton@gmail.com>



To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 40
On 9/24/08, Philip Newton <philip.newton@gmail.com> wrote:


> > It took me a long time to realize that the lojban sentence was
> > not supposed to be typed along with the command as in: "jbofihe
> > sentence". Instead you have to give "jbofihe filename", where
> > filename is the name of a textfile containing the lojban text
> > jbofi'e will parse.

> Or just "jbofihe", then type Lojban at the program, then Ctrl-D.
> (My preferred method.)
>
> Or "echo 'mi klama le zarci' | jbofihe".

Long ago I have written a short python script that adds the readline
capabilities to jbofihe: you can type the lojban text, recall the text
previously typed by the up arrow, edit it and so on. Very handy if you
are trying to say something in lojban and are not sure about the
correct way to do this. Because some lojban sentences are very long
(and because you are often paste them from some other window), "end of
sentence" is not the one newline, but two in a row (like a paragraph).

Alas script was debugged with Win32 python, not with Linux one, but it
seems like there is nothing Win32-specific in it. Anyway it is short,
and you can give a try to it — if it doesn't work, you lose nothing.
Script text follows:

import atexit, os, readline, sys

histfilename = "citri.jbo"

def input_para(ps1 = "", ps2 = ""):
para = ""
line = raw_input(ps1)
while line != "":
para += line + "\n"
line = raw_input(ps2)
return para

readline.read_history_file(histfilename)
readline.set_history_length(500)
atexit.register(readline.write_history_file, histfilename)

try:
while 1:
text = input_para(">> ", ".. ")
inpipe, outpipe, errpipe = os.popen3("jbofihe -b -x")
inpipe.write(text)
inpipe.close()
sys.stdout.write(outpipe.read())
outpipe.close()
sys.stdout.write(errpipe.read())
errpipe.close()
except EOFError:
sys.stdout.write("co'o")

--
http://slobin.pp.ru/ `When I use a word,' Humpty Dumpty said,
<cyril@slobin.pp.ru> `it means just what I choose it to mean'


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.

posts: 324

On Wednesday 24 September 2008 20:50:21 Cyril Slobin wrote:
> Alas script was debugged with Win32 python, not with Linux one, but it
> seems like there is nothing Win32-specific in it. Anyway it is short,
> and you can give a try to it — if it doesn't work, you lose nothing.
> Script text follows:

Works on Linux, as long as I add a hashbang line at the beginning, create a
citri.jbo file, and change the non-break spaces to spaces.

Pierre


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.