Archive for April, 2008
My interests
Published April 4, 2008 Personal 0 CommentsTags: computers, Languages, personal interests
I’m a quite stereotypic guy who likes everything about computers and language. Computers are a big part of my life and I don’t know what else I would do if without a computer. I do not play computer games (nor video games) because I think of the computer as a tool. Often when I use a computer I’m rather surfing the Internet or programming. Programming is my passion. When I’m surfing I try to find free tutorials or material so that I can learn new things. Languages for example.I like the structure of languages. Grammar is fun, as well as the origin of words. My vocabulary in those languages I know or am learning is yet restricted. I think that I would learn a languages at least twice as fast as a normal person if I went to the country where they are speaking it. Anyway if you would see me somewhere I’m probably carrying a book of grammar or maybe dictionary just to let the time pass.I know Swedish, Danish, English, German, Spanish and Italian. At least most of the grammar.I do not only like the structure of natural languages. I like the structure of programming languages too. The first language I learned was C#.  I convinced myself to read a book last summer and have quickly become the best in my class at school.
I came across this article in some newsletter I was going to delete. The article is about “techies”, as they call them in the article. Many of those carry a hidden “burden”. They have Asperger’s Syndrome (AS). AS is a autism spectrum disorder that estimated 1 per 100 child has. It is the mildest form of autism. A person who has Asperger’s has normal cognitive and verbal skills like other “normal” persons but finds it very difficult when it comes to being social. This is because it is hard for him to interpret body language and then emotions. Allthough they are aware of emotions and “state of mind” they may not even notice if someone is sad but doesn’t show it directly. i.e. when crying. The intelligence of a person with AS is either avarage or over the normal. The most known effect of the disorder is that people with AS has some kind of special interest. It can be anything from trains to something odd like cash machines. There is one interest that is very common in this group, computers. All kinds of technology. Everyone gets really good at that they are interested in and knows everything that is about his area of interest. Sometimes it’s just like there’s nothing else in the world. In spite of being good at learning things they want it’s not easy to force them to learn something they are not intereted in. Many of history’s geniouses is said to have had Asperger’s. To name a few Isaac Newton and Albert Einstein, and of course the geek himself, Bill Gates. A person with AS is often refered to as an “Aspie”, but it’s not an official term.Now, to return to the subject. The situation of working people that has AS is hard. They don’t get the attention they need as a minority with social difficulties. They don’t know how to tell other people about their difficulties because they don’t know how they will react and treat them later on. You can read the whole article at http://www.computerworld.com/action/article.do?command=printArticleBasic&articleId=9072119
I have Asperger’s . Life is not easy but I’m proud of being who I am. Yesterday was the Autism Awareness Day (Wednesday 2nd of April). There are many blogs about it here on WordPress. Here’s one of them. http://mammaren.wordpress.com/2008/04/01/autism-awareness-month-begins-with-aspergers/
Literal = '1' | '2' | 'a'Â | '-'.
Nonterminal = {Literal}.
{}Â Repeat 0 or more times
()Â Grouping
[] Optional element
|Â Â Or
<> Encloses nonterminals (used in EBNF) Â
Here is an example using all elements and some others too.
(* a simple program in EBNF − Wikipedia *)
program = 'PROGRAM' , white space , identifier , white space ,
          'BEGIN' , white space ,
          { assignment , ";" , white space } ,
          'END.' ;
identifier = alphabetic character , { alphabetic character | digit } ;
number = [ "-" ] , digit , { digit } ;
string = '"' , { all characters − '"' } , '"' ;
assignment = identifier , ":=" , ( number | identifier | string ) ;
alphabetic character = "A" | "B" | "C" | "D" | "E" | "F" | "G"
                    | "H" | "I" | "J" | "K" | "L" | "M" | "N"
                    | "O" | "P" | "Q" | "R" | "S" | "T" | "U"
                    | "V" | "W" | "X" | "Y" | "Z" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
white space = ? white space characters ? ;
all characters = ? all visible characters ? ;
With this grammar you can parse text that is syntactically correct with the grammar. For example this code:
PROGRAM DEMO1 BEGIN Â A0:=3; Â B:=45; Â H:=-100023; Â C:=A; Â D123:=B34A; Â BABOON:=GIRAFFE; Â TEXT:="Hello world!"; END.
There are some good engines available on the market, both commercial and free. I have tried GOLD Parser Generator, a free grammar parser engine where you can build grammars and later port them so that you can use them in your own programming projects.
Why am I interested in this? Lexical parsers are a very interesting and also important piece in compilators. Almost every parser uses BNF. I am planning to construct my own compiler in the future so this will come in handy.
-
GOLD Parsing System http://www.devincook.com/goldparser/
Latest comments