Book a Demo

Author Topic: BNF and UML  (Read 4780 times)

Gobo

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
BNF and UML
« on: February 09, 2006, 01:05:49 am »
Hi,
Does anyone knows successful adaptation of BNF notation using UML (and EA)?

I know, that state machines could be used but it is still far from BNF usability.

thomaskilian

  • Guest
Re: BNF and UML
« Reply #1 on: February 09, 2006, 01:42:47 am »
What do you want to express ??? BNF is a nice way to express syntax rules for languages. So I actually don't see what you're trying to do. Do you want to express syntax rules with UML?

Gobo

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: BNF and UML
« Reply #2 on: February 09, 2006, 01:56:34 am »
Actually the question is: "Here we have syntax desciption (BFN or other) and how can we write it using UML"
In my personal opinion it's probably kind of the UML Fever, but put such a question in case someone would have different opinion :)

I assume that You also suggest using BNF exept trying to use UML?

thomaskilian

  • Guest
Re: BNF and UML
« Reply #3 on: February 09, 2006, 02:44:33 am »
Actually I don't know why you would like to do that. BNF is something you can more or less feed directly into a parser which in turn can decide whether a string is part of the language described with BNF. UML is more and different. Not a good example, but you seem to ask whether you can use a Porsche for a removal. Works, but a van would surely be more useful. Maybe you could precise your request by an example?

Gobo

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: BNF and UML
« Reply #4 on: February 09, 2006, 03:55:43 am »
Well, there is no any example :)
I was simply asked by coders. They use configuration file in BNF notation and asked how they can use UML and EA to have this syntax described within UML model? Mostly for better visualisation and to connect allowed key words (objects) with the rest of the project. So maby syntax is not so important as allowed objects.

Potentialy some automation in convertion it (later)  to BNF is possible so that's why such idea appeared.

My opinion is that there is no point to doing so but I put this post just to get know other opinion.


thomaskilian

  • Guest
Re: BNF and UML
« Reply #5 on: February 09, 2006, 06:47:23 am »
If you use it for configuration, I'd suggest to create an artifact with attributes. You can have a code gen for that to produce reasonable results (the real config file). Maybe that is what the coders expect?