The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

4

Mathematical expressions or natural language are good candidates for these. e.g. from http://matt.might.net/articles/grammars-bnf-ebnf/ <expr> ::= <term> "+" <expr> | <term> <term> ::= <factor> "*" <term> | <factor> <factor> ::= "(" <expr> ")" | <const> ...


2

Let me try to give a more interesting example, that can't be expressed as a set of simple regular expressions. BNF, properly speaking, is about the structure of a thing, such as a language. As such, the parts have relationships to one another. So, in computer languages "if" and "while" are tokens (word symbols, keywords), and tokens can be defined by regular ...


4

The literary arts are full of structured strings. The main problem there is finding ones which have sufficiently interesting structure. E.g. play ::= act+ act ::= scene+ scene ::= (stage-direction | line)+ stage-direction ::= "Enter" actor+ | "Exit" actor+ ... Gypsy Spellweaver helpfully points out that this can be elaborated to incorporate even more ...


8

Going with real-world things which they should be familiar with are best, even if it is completely outside of education. As you have applied the tag for adult education, I'm going to presume it is outside of normal university/college courses. A bit of creativity and looking around can develop many an idea as long as you get outside the box. The cafeteria ...


Top 50 recent answers are included