Documentation of HCL and REGEX

0 votes
asked Jan 26, 2023 in Wanted features by albert (3,520 points)
I saw in the plantuml repository that a description for EBNF existed and that there was now a reference from README.md to it (pull request #1275  thanks  @The-Lu).

In the plantuml code I saw also that there are possibilities for:

- regex, probably related to the question https://forum.plantuml.net/17112/regex-railroad-diagrams?show=17112#q17112,

- hcl, no idea what it is / where hcl stands for.

Are there for this:

- example(s)

- documentation
commented Feb 5, 2023 by Todd Musheno (2,680 points)
Great start!

Cant wait to see more as it gets flushed out...

I would suggest the same start/end indicators as in ebnf.

Great job so far!
commented Feb 7, 2023 by Todd Musheno (2,680 points)
I think named groups and backreferences might be a major stumbling block when you get to it, so rather then wait:

https://www.regular-expressions.info/refext.html
commented Feb 28, 2023 by Todd Musheno (2,680 points)
hcl is just a specific kind of json document for configuring go applications...

I would suggest since json is already supported, this is not needed.
commented Feb 28, 2023 by Todd Musheno (2,680 points)

The big areas missing so far...

  1. Unicode... /u /x and /p escapes
  2. Range qualifiers a{1,5} ... 1 to 5 "a" characters
  3. Rendering of groups... I would expect comment to draw a box around the left item, and add a yellow note
commented Mar 10, 2023 by Todd Musheno (2,680 points)
Great job so far... I see two things that would need fixed.
1: unicode symbols are not working/displayed.
2: group like things need work
I suggest we wrap these group things in something that looks like a package in a class diagram (a box around the group that indicates details about the group).... this also applies for repetitions (ie: this thing 5 or more times), but would just need to look a bit different so one could tell the 2 apart.

I THINK those 2 things MAY wrap things up... if not, it would probably be very close... to the point that the remaining issues might actually be good enough for most people.

See alphadoc for more details, and as always let us know if you have questions!

1 Answer

+1 vote
answered Jan 26, 2023 by The-Lu (63,920 points)
selected Jan 27, 2023 by albert
 
Best answer

Hello A., and all,

That's a call for papers..

If you want to contribute, here are some beginning for those topics:

@startregex
repetitionZeroOrMore: a*
@endregex
@starthcl
{
key = "value"
}
@endhcl

Enjoy,
Regards,
Th.

commented Jan 31, 2023 by The-Lu (63,920 points)

Hello A., T., and all,

HCL is the HashiCorp Configuration Language or Human Configuration Language.

Ref.:

Good dev... good doc...
Regards.

commented Jan 31, 2023 by The-Lu (63,920 points)

Regex is really undocumented, but should work.

Here is a simple not working example: wink

@startregex
(?:[%s]*\\{([^{}]*)\\})?
@endregex

Regards.

commented Jan 31, 2023 by plantuml (294,960 points)
Thanks, we're going to have a look at it!
commented Feb 9, 2023 by Todd Musheno (2,680 points)
I was expecting only one regex per diagram...

Although you might want to allow them to be embedded in others (ebnf for example).

So the only first... need to think about that.
commented Feb 13, 2023 by Todd Musheno (2,680 points)
Was not what I was expecting, but... why not seems fine to me.
...