Bug #1258

The parser tries to parse commented lines if the line does not end in newline

Added by Carlos Martín about 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:04/26/2012
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 3.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 3.4

Description

If onetemplate uses this text (without a newline at the end), the core tries to parse the last line

NAME = A
# should not fail to parse
[TemplateAllocate] Error allocating a new virtual machine template. Parse error: syntax error, unexpected VARIABLE, expecting EQUAL or EQUAL_EMPTY at line 2, columns 19:22

The error message also says that the syntax error is in line 2 columns 19:22, when it is actually 10:13. It is adding 9 columns from the first line.

Associated revisions

Revision 1d40fa31
Added by Ruben S. Montero about 9 years ago

bug #1258: Adds a endl character to any string before parsing

Revision a4f10ad9
Added by Ruben S. Montero about 9 years ago

bug #1258: Adds a endl character to any string before parsing
(cherry picked from commit 1d40fa31142db48216a5948e583ff486d775abfe)

Revision 47e86f4a
Added by Ruben S. Montero about 9 years ago

Revert "bug #1258: Adds a endl character to any string before parsing"

This reverts commit a4f10ad9794ec63f76505ed49ddfc25e0674ceb1.

Revision a63d5a9f
Added by Ruben S. Montero about 9 years ago

Revert "bug #1258: Adds a endl character to any string before parsing"

This reverts commit 1d40fa31142db48216a5948e583ff486d775abfe.

History

#1 Updated by Ruben S. Montero about 9 years ago

  • Target version set to Release 3.6

#2 Updated by Ruben S. Montero about 9 years ago

  • Status changed from New to Assigned

#3 Updated by Ruben S. Montero about 9 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Also available in: Atom PDF