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 15 years ago

Last modified 11 years ago

#724 reopened defect

Fail in macro Embed combination

Reported by: Víctor de Buen Remiro Owned by: Víctor de Buen Remiro
Priority: high Milestone: Mantainance
Component: Kernel Version: 2.0.1
Severity: normal Keywords:
Cc: Javier Portugal, Pedro Gea, Jorge

Description

When there are two embeded files at the begin of a file and the first one hast just one declaration the parser lost the second one.

Let be these three files

//////////////////////////////////////////////////////////////////////////////
// FILE   : file.tol
// PURPOSE: test for #Embed macro
//////////////////////////////////////////////////////////////////////////////

#Embed "file.1.tol";
#Embed "file.2.tol";

//////////////////////////////////////////////////////////////////////////////
// FILE   : file.1.tol
// PURPOSE: test for #Embed macro
//////////////////////////////////////////////////////////////////////////////

Real a = 1;

//////////////////////////////////////////////////////////////////////////////
// FILE   : file.2.tol
// PURPOSE: test for #Embed macro
//////////////////////////////////////////////////////////////////////////////

Real b = 1;

When file.tol is compìled just Real a is created.

If we declare anything before the first #Embed in in file.tol or we add any declaration to file.1.tol it works fine.

Attachments (1)

Embed01.zip (513 bytes) - added by Pedro Gea 11 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 15 years ago by Víctor de Buen Remiro

Cc: Javier Portugal Pedro Gea Jorge added
Status: newassigned

comment:2 Changed 15 years ago by Víctor de Buen Remiro

Priority: highestnormal

comment:3 Changed 15 years ago by Víctor de Buen Remiro

Priority: normallowest

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

Severity: blockernormal

comment:5 Changed 13 years ago by Víctor de Buen Remiro

(In [3823]) Refs #724

comment:6 Changed 13 years ago by Víctor de Buen Remiro

(In [3824]) Setting VERSION_BUILD "0.18.alpha"
Refs #724

comment:7 Changed 13 years ago by Víctor de Buen Remiro

Resolution: remind
Status: assignedclosed

He puesto un parche que no resuelve pero sí evita este problema.
Al final del filter compruebo si el resultado filtrado comienza por #Embed y en tal caso le añado la línea neutra Write ( \"\" ) ; que evita el problema sin efectos secundarios ni apenas tiempo de CPU extra.

comment:8 Changed 13 years ago by Víctor de Buen Remiro

(In [3825]) Refs #724

comment:9 Changed 11 years ago by Pedro Gea

Resolution: remind
Status: closedreopened

El problema sigue ocurriendo si simplemente en lugar de:

#Embed "file.1.tol";
#Embed "file.2.tol";

hacemos:

NameBlock n = [[
  #Embed "file.1.tol";
  #Embed "file.2.tol"
]];

comment:10 Changed 11 years ago by Pedro Gea

Priority: lowesthigh

Se adjunta un ejemplo.

Changed 11 years ago by Pedro Gea

Attachment: Embed01.zip added

comment:11 Changed 11 years ago by Pedro Gea

Véanse #1731 y #1732.

comment:12 Changed 11 years ago by Jorge

(In [6014]) refs #724, test code for ticket reported

comment:13 Changed 11 years ago by Jorge

(In [6015]) refs #724, el ; esta en el codigo original

Note: See TracTickets for help on using tickets.