[LLVMbugs] [Bug 13834] New: YAMLParser can't handle flow-map within block-map

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 13 06:27:18 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13834

             Bug #: 13834
           Summary: YAMLParser can't handle flow-map within block-map
           Product: new-bugs
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jonathan.anderson at cl.cam.ac.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


When parsing the following YAML:
---
context: { foo: bar }
---

I see this error message:
YAML:1:22: error: Unexpected token. Expected Key or Block End

The actual value of T.Kind is 15 (TK_FlowMappingEnd). If I instead parse:
---
context: { foo: bar, bar: baz }
---

then T.Kind is 11 (TK_FlowEntry).

Either way, it seems that, when parsing a flow mapping node that is a value
within a block mapping node, the parser gets confused and looks for a
TK_BlockEnd to close the outer mapping node rather than consuming the inner
mapping node, the value "{ foo: bar }".

This problem does not occur when my YAML file is constructed with the block
variants of mapping nodes.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list