Comments

Flat
Compiling your Grammar
User: rovira74
Date: 10/20/2007 6:32 am
Views: 8531
Rating: 37

Hi,

I have not been able to get the expected result after compilation of the grammer file.I do not know what the problem is as I followed the steps carefully.

It gives this:

sample.grammar has 3 rules
sample.voca    has 6 categories and 18 words

 Now parsing grammar file
"rror:       Lexical mistake "
---
no .dfa or .dict file generated

Help will be appreciated. 

 

Re: Compiling your Grammar
User: kmaclean
Date: 10/20/2007 8:19 am
Views: 427
Rating: 42

Hi rovira74,

Are you running the mkdfa.pl script in Windows, Cygwin, or Linux?  Which version?  I tried it on Fedora FC6, and it seems to work OK.

It sounds like you might have extra characters in either your sample.grammar and sample.voca. 

It might also be a problem with using a Windows text file on Unix/Cygwin or vice versa (i.e. extra carriage returns or line feeds).  The "dos2unix" or "unix2dos" Linux/Cygwin commands can clear this up.

Ken 

Re: Compiling your Grammar
User: rovira74
Date: 10/20/2007 11:31 am
Views: 482
Rating: 101

thanks ken.

Used  dos2unix command on the files and got expected result. 

Re: Compiling your Grammar
User: ethan oconnors
Date: 6/7/2008 12:42 pm
Views: 294
Rating: 24

how do you use the dos2unix and/or command? also, if I use windows (vista) which one of the two should I use?

 -ethan

Re: Compiling your Grammar
User: kmaclean
Date: 6/7/2008 1:15 pm
Views: 190
Rating: 23

Hi ethan,

>how do you use the dos2unix and/or command?

From a Cygwin console on Windows, you should be able to use the "man" command to get documentation on any Cygwin command, like this:

 $ man dos2unix

$ man unix2dos 

(use the "q" to exit the man help page)

>if I use windows (vista) which one of the two should I use?

I can' t remember off-hand... I don't have access to a Windows machine right now -  try them both and see which works  :)

Ken 

Re: Compiling your Grammar
User: ethan oconnors
Date: 6/7/2008 2:06 pm
Views: 277
Rating: 24
I tried. it says there is no manual entry for either of them.
Re: Compiling your Grammar
User: kmaclean
Date: 6/10/2008 9:02 am
Views: 216
Rating: 23

> I tried. it says there is no manual entry for either of them.

use the "cd" command to change directory to where your files are located, then execute the commands as follows:

  • dos2unix *.*
  • unix2dos *.*
This will convert all the files in the particular directory.

My version of Cygwin does not have a "man" page entries for these commands either.  Google brings up the following web pages:

Ken
Re: Compiling your Grammar
User: kmaclean
Date: 6/10/2008 9:04 am
Views: 284
Rating: 25

>if I use windows (vista) which one of the two should I use?

see this post.

Ken 

Re: Compiling your Grammar
User: Marie
Date: 6/20/2011 1:29 am
Views: 149
Rating: 15

Hi,

I am running the mkdfa.pl script in cygwin, and not been able to get either .dfa or .dict file generated.

It gives this error message:

$ ./mkdfa.pl ticket

ticket.grammar has 4 rules

ticket.voca has 9 categories and 18 words

---

Error: cannot open "ticket.dfa.tmp"

---

no .dfa or .dict file generated

 

I have already used the dos2unix command but it didn't fix the problem.

I'd really appreciate if someone could tell me how to fix this. Thanks.

Re: Compiling your Grammar
User: kmaclean
Date: 6/20/2011 12:00 pm
Views: 113
Rating: 16

>Error: cannot open "ticket.dfa.tmp"

are you using the newest version of Julius?

PreviousNext