# Archive — hermiene.net

"Apparently knowing someone's name doesn't make it easier to set them on fire with your mind."

### May 3, 2004

I have thoroughly tested Firefox, and come to the conclusion that it's awesome. In addition, and after some tweaking, I got it to behave kind of like Opera, too. Firefox, when installed, is lightweight and doesn't really have all that many features. This is where extensions come into play. If there's a feature you're missing, simply install the corresponding extension. Here are two good repositories that I've found: David Tenser's extension page and MozDev's Extension Room. Here are the steps required for Firefox to behave almost exactly the same as Opera:

1. Download and install Session Saver. This will make Firefox remember opened windows and their history after you close an instance.
2. Download and install Mouse Gestures. This enables, well, mouse gestures. To perform a mouse gesture you hold down a mouse button (configurable) and move the mouse in a set pattern. (People who have played Black & White should be familiar with it.)
3. I really like how the mouse cursor didn't change when you hovered over normal text in Opera. You can mimic this behavior in Firefox by adding this to your html.css file (located in the /res/ folder where you've installed Firefox):
*:hover {
cursor: default;
}



Other extensions of interest include Minesweeper, BlockFall (a Tetris clone) and the Mozilla MNG Decoder, which enables MNG support.

I feel like talking about BNF. BNF is a method for describing syntax. The CSS specs use a slightly modified version of BNF, which was what got me interested in finding out more about it in the first place. As far as my understanding goes, there are two offsprings of BNF; EBNF, which is standardized in ISO 14977, and ABNF, which is documented in RFC 2234. The differences between the three are small and annoying, so I'll try sticking to EBNF. So. BNF (whatever the flavor) is composed of production rules. A production rule looks like this:

foo ::= bar


::= means "is defined as". The production rule is read "foo is defined as bar". The production then looks like this:

foo
bar


We start with foo, and bar is produced. Fairly simple. We can complicate things a little:

foo ::= bar
bar ::= baz
baz ::= diligo


This gives the following production:

foo
bar
baz
diligo


We take what's on the left side of ::= and substitute it with what's on the right side. Consider the following:

foo ::= bar | baz


The vertical bar indicates a choice. "foo is defined as bar or baz, but not both". The production can then be either

foo
bar


or

foo
baz


but it can't be

foo
bar baz


There are several operators which make things all the more interesting. We have the three wildcard operators ?, * and +. ? means that an item must appear zero or one times (or, if you prefer, the item is optional), * means that an item must appear zero or more times and + means that an item must appear one or more times. If you want to explicitly specify how many times an item is to appear, you use {A,B}, where the item appears at least A times and at most B times. If you want foo to appear exactly five times, you'd write foo{5,5}. Parentheses are used for grouping, and quote marks denote a string (that is, it's supposed to be written out exactly how it's represented, without the quote marks). Strings are called terminals, since they can't be further defined. Similarly, number and digit are non-terminals, since they can be further defined. Here, I've defined the construction of a number that can be negative and/or fractional. See if you can decipher it. :-)

number ::= "-"? digit+ ("." digit+)?
digit  ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"