close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 21 years ago

Last modified 18 years ago

#39 closed defect (fixed)

Parser returns a mistake always at the first line

Reported by: imendez Owned by: danirus
Priority: normal Milestone:
Component: Kernel Version: head
Severity: normal Keywords:
Cc:

Description

The parser shows a curious error when the lower code is compiled:


Real a = 4;
Real b = 4;
Real c = 4;
Real d = 4;
Real e = 4;
Real f = 4;
Real g = 4;
Set sEq = ?;

ERROR: Símbolo de cierre #}# fuera de lugar en línea 8 y columna 12:

LINEA

8 > Real a = 4;


9 : Real b = 4;

10 : Real c = 4;
11 : Real d = 4;
12 : Real e = 4;
13 : Real f = 4;
14 : Real g = 4;
15 : Set sEq = ?;
16 :

The parser returns a mistake always at the first line, so the complexity of
detecting the error rises with the number of lines.

On the other hand, i don't know if upper way of creating an empty set must be
valid. The code

Set sEq = Copy(Empty);

works perfectly, but:

Set sEq = ?;

doesn't work.

Change History (4)

comment:1 Changed 21 years ago by danirus

Resolution: invalid
Status: newclosed

In this bug report there are two different things.
The second one is not an error, between symbols and ? always must be something.
Please, change the title of the bug and send again the first part as a new bug report.

comment:2 Changed 21 years ago by danirus

Resolution: invalid
Status: closedreopened
Summary: Parser mistakes when someone tries to create an empty setParser returns a mistake always at the first line

I don't know that i can change the summary. Bug accepted.

comment:3 Changed 21 years ago by danirus

Resolution: fixed
Status: reopenedclosed

A solution of this problem has been implemented in Tol CVS repository.
I make some changes in ErrorPosition method of BParser class.
This method calculates the exact position of a syntax error.
Tol Parser need another kind of improvements about those we must talk in the next Tol
Development Meeting (1/6/2004)


comment:4 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://www.tol-project.org
Note: See TracTickets for help on using tickets.