Click here to register.

Comments

Flat
Compiling your Grammar
User: rovira74
Date: 10/20/2007 6:32 am
Views: 577
Rating: 19    Rate [
]

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. 

 

Reply
Re: Compiling your Grammar
User: kmaclean
Date: 10/20/2007 8:19 am
Views: 171
Rating: 24    Rate [
]

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 

Reply
Re: Compiling your Grammar
User: rovira74
Date: 10/20/2007 11:31 am
Views: 168
Rating: 19    Rate [
]

thanks ken.

Used  dos2unix command on the files and got expected result. 

Reply
Re: Compiling your Grammar
User: ethan oconnors
Date: 6/7/2008 12:42 pm
Views: 21
Rating: 5    Rate [
]

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

 -ethan

Reply
Re: Compiling your Grammar
User: kmaclean
Date: 6/7/2008 1:15 pm
Views: 14
Rating: 5    Rate [
]

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 

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

> 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
Reply
Re: Compiling your Grammar
User: kmaclean
Date: 6/10/2008 9:04 am
Views: 8
Rating: 6    Rate [
]

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

see this post.

Ken 

Reply
PreviousNextAdd