Welcome to iraf.net Tuesday, May 21 2024 @ 07:18 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Script Problem - INTERNAL ERROR: parser gagged
   
jminer
 09/22/2008 08:56PM (Read 6214 times)  
+----
Newbie

Status: offline


Registered: 09/22/2008
Posts: 5
Hi, I am attempting to write a simple IRAF script to do some image manipulation, but I can't get past the 'parser gagged' error message. I have tried trivial scripts like the one below, but I still get the same error message... In fact, I have tried other inputs (a list file), and no inputs at all (hard-coding the filenames), to no avail. Is it an issue with my login.cl, or my IRAF installation? I tried to redo mkiraf and that didn't work either.[code:1:b4b9f5bc01]procedure junk (img)string imgbegin imarith (img, "/", 2, "half.fits") end[/code:1:b4b9f5bc01]I do a[code:1:b4b9f5bc01] task junk = scripts$junk.cl [/code:1:b4b9f5bc01]to declare the procedure, and then type[code:1:b4b9f5bc01] junk file.fits [/code:1:b4b9f5bc01]to run it.The error message is[code:1:b4b9f5bc01] INTERNAL ERROR: parser gagged
called as: `junk (img=file.fits)' [/code:1:b4b9f5bc01]
Thanks for any help, I am really stumped, because I have written many other scripts with no problem, and am pretty sure the syntax is correct. Of course, it doesn't help that I don't know what "parser gagged" even means!-Jesse Miner

 
Profile Email
 Quote
fitz
 09/22/2008 08:56PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Let me guess: You use emacs?The script is syntactically fine, however emacs users sometimes get into a mode where the file is missing and EOF or a newline at the end of the last line. I can run your script correctly but can also reproduce the error if I remove the '\n' after the "end" statement. "Parser gagged " in this case means the interpreter saw the EOF before the newline terminating the last statement.-Mike

 
Profile Email
 Quote
jminer
 09/22/2008 08:56PM  
+----
Newbie

Status: offline


Registered: 09/22/2008
Posts: 5
Yes! I use emacs, and there was no \n after the "end". Thanks for the fix, I was really confused as to why I was getting that error message.-Jesse Miner

 
Profile Email
 Quote
   
Content generated in: 0.15 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login