User Tools

Site Tools


tanszek:oktatas:techcomm:bn_formulas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:techcomm:bn_formulas [2024/10/07 16:33] kneheztanszek:oktatas:techcomm:bn_formulas [2025/11/25 07:50] (current) knehez
Line 9: Line 9:
 | ''::=''     | definition | | ''::=''     | definition |
 | ''|''       | alternative | | ''|''       | alternative |
-''{expression}'' | repetition (minimum and maximum repetitions can be specified using subscripts) |+\({expression}_{min}^{max}\) | repetition (minimum and maximum repetitions can be specified using subscripts) |
 | ''GOTO''    | terminal symbol (in quotes for clarity, can also use apostrophes instead) | | ''GOTO''    | terminal symbol (in quotes for clarity, can also use apostrophes instead) |
  
Line 16: Line 16:
 Let’s start with a few typical examples and try to generalize: Let’s start with a few typical examples and try to generalize:
  
-''ABC-1234, GHT-234, HSD-333, AI-BB-654''+''ABC-935, GHT-234, HSD-333, AI-BB-654''
  
 Syntax definition: Syntax definition:
Line 31: Line 31:
 Let’s list a few examples and try to generalize: Let’s list a few examples and try to generalize:
  
-''062012345, +36301234567, 0680460046''+''062012345, 0036701234567, +36301234567, 0680460046''
  
 Syntax definition: Syntax definition:
 $$ $$
 <phone call>::= \{<prefix>\}_0^1 <city> <customer> \\ <phone call>::= \{<prefix>\}_0^1 <city> <customer> \\
-<prefix>::=\{+\}_0^1 36|06 \\+<prefix>::=\{+|00\}_0^1 36|06 \\
 <city>::=\{<number>\}_1^2\\ <city>::=\{<number>\}_1^2\\
 <customer>::=\{<number>\}_6^7\\ <customer>::=\{<number>\}_6^7\\
Line 45: Line 45:
  
 \[ \[
-\langle \text{BN formula} \rangle ::= \langle \text{rule} \rangle +\langle \text{BN formula} \rangle ::= \{\langle \text{rule} \rangle \}_{1}^{\infty}
 \] \]
 \[ \[
Line 60: Line 60:
 \] \]
 \[ \[
-\langle \text{factor} \rangle ::= \langle \text{identifier} \rangle \mid \langle \text{terminal\_symbol} \rangle+\langle \text{factor} \rangle ::= \langle \text{identifier} \rangle \mid \langle \text{terminal_symbol} \rangle
 \] \]
 \[ \[
-\langle \text{terminal\_symbol} \rangle ::= \left\lbrace \langle \text{character} \rangle \right\rbrace+\langle \text{terminal_symbol} \rangle ::= \left\lbrace \langle \text{character} \rangle \right\rbrace
 \] \]
 \[ \[
Line 78: Line 78:
 \] \]
  
-This format uses MathJax for a more formal representation of the BNF description in a mathematical context.+
tanszek/oktatas/techcomm/bn_formulas.1728318820.txt.gz · Last modified: 2024/10/07 16:33 by knehez