Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #3695

Closed
Open
Created Oct 22, 2018 by James Willenbring@jmwilleMaintainer0 of 3 tasks completed0/3 tasks

Teuchos: Line Returns in Flow Mappings and Sequences

Created by: danielsjensen1

Many YAML input files have long lists of variables such as the following

      Nodal Quantities: >
         Ex, Ey, Ez,
         Bx, By, Bz,
         ion_px, ion_py, ion_pz, ion_rho, ion_rho_E,
         ion_ux, ion_uy, ion_uz, ion_n, ion_P,

Internally, we have been converting these strings to arrays but it would be fantastic if we could just use flow sequences with line returns as follows

      Nodal Quantities: [
         Ex, Ey, Ez,
         Bx, By, Bz,
         ion_px, ion_py, ion_pz, ion_rho, ion_rho_E,
         ion_ux, ion_uy, ion_uz, ion_n, ion_P]

Flow sequences and flow maps currently work if they are on one line only such as foo: [a b] and foo: {a: 1, b:2} but they fail if there are any line returns as in the Nodal Quantities example above.

@trilinos/Teuchos

enhancement

@trilinos/Teuchos

Expectations

The following input

FooPL:
  sequence: [1, 2,
             3]
  map: {a: 1, b: 2, 
        c: 3}

should be equivalent to

FooPL:
  sequence: [1, 2, 3]
  map: {a: 1, b: 2, c: 3}

Current Behavior

The input above produces the following error message

Teuchos in Trilinos 12.13 (Dev)

terminate called after throwing an instance of 'Teuchos::ParserFail'
  what():  error: Parser failure at line 3 column 14 of foo.yaml
             3]
            ^
Expected one of {!, ", ', -, ., OTHERCHAR, WS, [, {}
Got: NEWLINE
Lexer text: "
             "
Parser was in state 169

Motivation and Context

Users familiar with YAML files expect flow mappings and sequences to work properly even if there are line returns present. Input files become unnecessarily long either in width or height when line returns aren't allowed in flow mappings and sequences.

Definition of Done

The examples given above could be used in creating unit tests.

Possible Solution

Steps to Reproduce

Your Environment

  • Relevant repo SHA1s:
  • Relevant configure flags or configure script:
  • Operating system and version:
  • Compiler and TPL versions:

Related Issues

  • Blocks
  • Is blocked by
  • Follows
  • Precedes
  • Related to
  • Part of
  • Composed of

Additional Information

Assignee
Assign to
Time tracking