Author Topic: unexpected end of prog  (Read 422 times)

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 699
    • PluriBASIC
unexpected end of prog
« on: August 15, 2020, 04:15:04 pm »
I am sooo close to self-compiling for 64bits... but I am getting this:

Code: [Select]
ERROR: ERROR: unexpected end of prog
WORD: istrue
IN: handlemodules
LINE: 61547
FILE: "main source

 What could be causing this? The program is actually 82337 lines long. I am attaching a picture.

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: unexpected end of prog
« Reply #1 on: August 15, 2020, 11:57:11 pm »
Hi Brian,

'unexpected end of prog' occurs when the source code terminates with an incomplete expression.

For example:
int a
a=1 +


John

  • Hero Member
  • *****
  • Posts: 3966
Re: unexpected end of prog
« Reply #2 on: August 16, 2020, 06:45:20 am »
My vote is a syntax error message.

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 699
    • PluriBASIC
Re: unexpected end of prog
« Reply #3 on: August 16, 2020, 07:50:22 am »
'unexpected end of prog' occurs when the source code terminates with an incomplete expression.

 Ahhh you mean "unexpected end of statement". It didnt occured to me to check the statement syntax because i thought internally oxygen was getting an EOF in the source code.

  I will check that, maybe I am generating a stray parenteses or something.

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: unexpected end of prog
« Reply #4 on: August 16, 2020, 09:42:13 am »

The error is triggered when the expression evaluator runs out of symbols/words from the source stream. Usually caused by corruption somewhere ..

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 699
    • PluriBASIC
Re: unexpected end of prog
« Reply #5 on: August 16, 2020, 10:26:08 am »
Yes. I was converting an exceptionally long IF condition. I was checking only 128 tokens after the IF and the condition was 230 tokens long. I increased the token check to 2048 tokens. Hopefully it will be enough. Thanks!