Enteee / plantuml-parser

Parse PlantUML with JavaScript or TypeScript
https://duckpond.ch/category/plantuml-parser
Apache License 2.0
141 stars 33 forks source link

package not properly parsed #10

Closed DaelDe closed 5 years ago

DaelDe commented 5 years ago

The following diagram:

@startuml

interface _COMP_EXT1_IF1

package p1 as rmf{
  component _COMP8 
}

@enduml

results in

SyntaxError: Expected "'", "(", "/'", "@enduml", "[", "\"", "abstract ", "class ", "cloud", "component ", "database", "digraph  ", "enum ", "folder", "frame", "interface ", "namespace", "node", "note ", "package", "rectangle", "skinparam ", "state", "tog  ether ", "usecase ", [ \t], or [A-Za-z0-9._] but "}" found.

I had a quick look to the grammar but did not find the root cause. I guess it should work however.

DaelDe commented 5 years ago

It works when the package name is quoted as "rmf" but plantuml also allows unquoted names here.

Enteee commented 5 years ago

thank you @DaelDe for reporting this, the linked pull request should fix this issue. Can you please have a look at the new fixture and tell me if this is more or less what you would expect for this diagram.

DaelDe commented 5 years ago

Thank you, the new test is looking OK for me.