Results 1 to 10 of 12

Thread: WordBuilder 0.9: Release often, release early

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Guild Adept Alfar's Avatar
    Join Date
    May 2009
    Location
    Denmark
    Posts
    276

    Post Quick intro to syntax

    Ok, a bit more information:

    A WordBuilder project basically consists of token sets and rules.

    Token sets are lists of characters or character combinations that can go in the same place. Each token has the same probability of occurring.

    Token sets are defined by the following syntax:

    Tokens <token set name> <token list>

    E.g.

    Code:
    Tokens Vowel a e i o u
    Tokens "Consonant pair" bj kh sh pr tr dr st sp
    Rules are lists of commands that are executed in sequence. Rules are defined by the following syntax:

    Code:
    Rule <rule name> [<probability>] {
      <commands>
    }
    Multiple rules with the same name may exist. In that case, any reference to that rule name will incur one of the rules at random, using the probabilites assigned to each rule. The default probability of a rule is 1.

    E.g.

    Code:
    Rule syllable 2 {
      Token Vowel
    }
    
    Rule syllable 3 {
      Token Consonant
      Token Vowel
    }
    
    Rule syllable {
      Token Consonant
      Token Vowel
      Token "Consonant pair"
    }
    
    Rule root {
      Rule syllable
    }
    The default starting rule is "root" - make a rule called root, and you're good to generate.
    You can set up your own starting rules, any number of them (though more than two and the current version fails if you use the generate dialog. Ctrl+shift+g works with any number, though):

    StartingRule <rule name> [<amount>]

    E.g.

    Code:
    StartingRule verb 10
    StartingRule noun 10
    Would generate 10 verbs and 10 nouns each time you generate.

    Attached is the main app window and the generate dialog.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	wb1.jpg 
Views:	65 
Size:	83.3 KB 
ID:	16505   Click image for larger version. 

Name:	wb2.jpg 
Views:	55 
Size:	11.1 KB 
ID:	16506  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •