Skip to content

Lines missing ending quote failing parsing - INF Spec and Microsoft parsing assume ending quote #16

@MichaelJJ

Description

@MichaelJJ

Microsoft's INF parser allows for a cases where a value starts with a quote and then ends with a newline. Microsoft assumes the newline character ends the quote.

INF Helper fails with the error:

InfHelper.Exceptions.InvalidTokenException: Invalid tokenBase found during pure value parsing parsing: 
Symbol: 

Token type: NewLine
Allowed tokens: Letter, ValueMarker, Space, WhiteSpace, ValueSeparator
Ignored tokens: InlineComment, LineConcatenator, EQ, CategoryOpening, CategoryClosing

Here's a snippet from an INF:

KSNODETYPE_HEADPHONES                   = "{DFF21CE2-F70F-11D0-B917-00A0C9223196}"
KSNODETYPE_DESKTOP_SPEAKER              = "{DFF21CE4-F70F-11D0-B917-00A0C9223196}"
KSNODETYPE_MICROPHONE                   = "{DFF21BE1-F70F-11D0-B917-00A0C9223196}

;; (cf http://msdn.microsoft.com/en-us/library/dd388914(VS.85).aspx)
Proxy.CLSID         					= "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"

Windows INF parser will successfully load this INF.

https://learn.microsoft.com/en-us/windows-hardware/drivers/install/general-syntax-rules-for-inf-files

I took a look at the code and did not know the best way to handle this case without potential impacts to other behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions