I always get a few laughts when i visit a lol* site. Today i stumble upon lolcode! oh the joy!

so, since i’m writing an article about bash and things related, i decided to create a lolcode syntax highlight for nano so i could grasp teh language!
They have plenty of implementations, like BNF Grammar, interpreters, translators (including a lol2sh ) and a vim syntax highlighter! this gave me the idea to make one for nano.
## Here iz TEH syntax highlight for lolcode
## based on the example for C/C++.
## no can has moar color
syntax "lolcode" "\.lol"
## things
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color brightred "\<[[:alnum:]]*\>"
##
## types
color green "\<(YARN|NUMBR|TROOF|BUKKIT|NOOB)\>"
##
## stuff
color brightgreen "\<(LINE|WORD|LETTAR)\>"
##
## aritmetric (TIEMZ xould be in TIEM?) anyway, all 3 stay as a keyword
## also the MODZ (not in yr spec 1.1) iz highlighted for modulo
color brightgreen "\<(UP|UPZ|NERF|NERFZ|TIEM|TIEMZ|TIEMZD|OVAR|OVARZ|MODZ)\>"
##
## condixonal operatorz.
color brightgreen "\<(BIGR THAN|SMALR THAN|LIEK|NOT|AND|OR|XOR|\!|\~|\&\&)|\|\||\||\^|\!\!)\>"
##
## 4fun
color red "\<(PRON)\>"
##
## varabal related
color brightyellow "\<(BYES|DIAF|GIMMEH|OUTTA|I HAS A|ITZ|IN MAH|LOL|R|VISIBLE|INVISIBLE)\>"
##
## l00p
color brightyellow "\<(IM IN YR|IZ|YARLY|NOWAI|KTHX|WTF|OIC)\>"
##
## added the keywords for dealing with file.
## sorry for the "low lol lolcode <-- say it again :D
color brightyellow "\<(CLOZ|OPEN|REED|RIT)\>"
##
## loops' stuff. added the keywords for try/exepshun
color magenta "\<(GTFO|PLZ|AWSUM THX|O NOES)\>"
##
## begin and end lolcode
color brightcyan "^[[:space:]]*(HAI|CAN HAS|KTHXBYE|)"
##
## not sure what it does, leave it
#color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in. <-- said the previous c/c++ s.h. writer
color brightwhite "<[^=]*>" " ""(\\.|[^"])*""
##
## This string is VERY resource intensive! <-- omg! let's use it :D
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
##
## Comment highlighting
color brightblue "BTW.*"
color cyan start="OBTW" end="TLDR"
pick it here: lolcode SH
save it, change the extension (.png) to .nanorc and put it in the usual place. See the previous posts on how to do just that.
i had so much fun doing this!
NOTE: most of the !!, && and alike are not being correctly highlighted.. help me if u can :D
i want to use linux for everything! linux is the best!!!
Comment by Inês — August 14, 2007 @ 11:43 pm
Thanks form Serbia! Automaticly applyed in my carpet store computer! :)
Comment by tepisi — February 17, 2011 @ 3:09 pm
[...] have a thing for code and colours. Let it be lolcode, lpsolve syntax for whatever the editor i’m using at the time, i have to tweak [...]
Pingback by Syntax hightlight theme for Ruby/Rails/Haml in Aptana « The GNU of Life, the Universe and Everything — March 8, 2012 @ 12:21 am