This project is read-only.

generated code output "#line default" missing, blanks missing


The issues are generated by these methods

void QUT.GPGen.CodeGenerator.InsertCodeSpan( LexSpan span)
void QUT.GPGen.SemanticAction.GenerateCode(CodeGenerator codeGenerator)
  1. No "#line default" at end of the inserted code.
    Compiler messages for a line after the grammar code pointing to wrong file.
  2. In front of the first line "span.startColumn" blanks should be inserted.
    Compiler messages for the first line pointing to the wrong column
  3. Inserting #line in every line is not needed.
    If there is no other reason for this, remove it, it makes the generated code bigger than needed
Take a look of my version of void QUT.GPGen.CodeGenerator.InsertCodeSpan( LexSpan span) and QUT.GPGen.SemanticAction.GenerateCode(CodeGenerator codeGenerator) in the attachment.

For most developer it seems that it is enough to have the line of an error, but when you try to use this for a VS Extension, determining the exact location of the grammar code inside the generated code is necessary.

Emmo Emminghaus

file attachments


k_john_gough wrote Oct 10, 2012 at 5:06 AM

Thanks for the report Emmo. I shall have a look at the issues and fold any change into the next refresh.

wrote Feb 21, 2013 at 11:50 PM