twittidai / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

Interactive mode errors #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello!
I found some error in interactive mode (picoc-0.93.tar.bz2)
1. If in interactive command prompt enter any character and pres "Enter" I got 
a asser.
Example:
 starting picoc
 picoc> q
 Assertion failed: ReserveSpace >= MemUsed, file c:\projects\testc\testc\lex.c, line 500

2.  Looks like interpreter ignores errors in the first non empty line but detect 
errors in second non empty line.
Example:
 starting picoc
 picoc> error1
      >
      > error2
        ^
 :3: 'error2' is undefined
(line 1 contains error “'error1' is undefined” but interpreter don’t 
detect it.

Also, could you please fix some warning during PICOC compilation:
 expression.c: In function 'ExpressionInfixOperator':
 expression.c:577: warning: 'Result' may be used uninitialized in this  function
 parse.c: In function 'ParseDeclarationAssignment':
 parse.c:126: warning: 'ArrayElement' may be used uninitialized in this function
 parse.c: In function 'ParseDeclaration':
 parse.c:173: warning: 'NewVariable' may be used uninitialized in this function

Thanks,
Sergey

Original issue reported on code.google.com by sdanil...@gmail.com on 3 Jul 2010 at 12:43

GoogleCodeExporter commented 8 years ago
Hi, thanks for your bug report.

The first problem you mention is now fixed in revision #450.

I checked the warnings and they don't seem to be from a recent version of 
picoc. What version are you using?

Original comment by zik.sale...@gmail.com on 3 Jul 2010 at 1:11

GoogleCodeExporter commented 8 years ago
Thanks for quick response!
I use 0.93 relese (picoc-0.93.tar.bz2).
Is the svn version of project stable? If so, I’ll migrate my project to svn 
code.
Thanks,
Sergey

Original comment by sdanil...@gmail.com on 3 Jul 2010 at 2:40

GoogleCodeExporter commented 8 years ago
Revision #450 is stable. Give it a try.

The error messages are a bit harder to address. Saying "error1" is ambiguous 
until it's followed by something. For instance you might do:

> error1
>
> ();

in which case it was a call to a function called error1, which would be quite 
valid.

It's a bit confusing I guess... Not really sure what to do about it since it's 
really part of the C language. I'm calling this closed for now unless you have 
an idea of how to solve the problem.

Original comment by zik.sale...@gmail.com on 3 Jul 2010 at 4:16