This program is a highly obfuscated recursive-descent compiler for the Atmel AVR series of microcontrollers (it currently only supports single assignment statements, but it does support just about any expression you can throw at it).

The whole package has been run through gzip -9, then placed inside a string. On execution, the code is piped through gunzip to a file, which is then executed.

Since I can't include the actual CODE here (because of the gzipped string...), I'm including a UUencoded copy. Enjoy.

begin 644 breaktidy.pl M;W!E;B!/+")\9W5N>FEP("T@/B!F(CMP<FEN="!/("(?BP@(R!B3.@(#8FEG M9FEL92YP;`"MEFUOVD@0Q]_?IW`L9)D\-."J;<**GGR!<DA@4(DNO%Q`E1Q[ M27PRAOJAQPGZW6]F=M88''3WXMZ$]>YO_S.SNS.37"*3QG0R&\Y%(PZZ+=$H M5O0WA+_6T!/6="`L=R:L_EQ`9,6S,?3LYLX:/(B?^#5X@*]&['=?9![8L\?> MT&NJE?Y7N]'<K?YN;+O9:[3,Q2:-DMQ<7%PD_31=IQVCL5U<)":C[@F*>[=- M(;=1SD3_E'!ML[$UY'8C@UQ<AJ8V.GK;:%ZQ-GL"E_]ZC6)I#Y]L\+W)\=#J MZ.'4TL@VXS`RTO;':_#*L`SGPX>F-CCZXPP^_YWIUG:Y;+6:GS_?+9)%3DNC MBI":7"3UN1:=_1^B66[,KT%6BWH#"!N%$OEB5.:G,Y[?%-GKT8*K%]8;F/^$ MHGZH7%R%S\/^W^H<+APX-,WPI,ZNTYKDO$[)-[!Q'4L#/XZ-51'?%8#A6VXS MW#L'A]$/AL,2=KTW<#^I!>\]VG11L?\LXW;7\D9"?SGTA1+!1KV>%HH\I_*[ MP;R^NW(Q_7.UX45GD3#5.<+@XO6*`RNE(R-P7"25>9$FACDRWT$N7UVII?'C MR6O"!!#1$I^^(;]#HJGG+^-,[C#1(/-^$J,RW+-YMVGBK@M[Z(Y4VC01-SU_ M)=$-3BG7XYR"'8TM..(+DB=%]K"QU=I.3;Q7U8;D?5?1[OUW:>\+*)=!FA=F M<P<'@;_B"SQL@3?',=.WRGX<5G;9O`M^11\>I<`/RGW8"%CI$%0-BN6PHL]H M!Q4"CU`;P\+U:P<OR-=&9_R(LN@EZ6)0M']BTX0N3H]COC2<1-]NP#>56%PD MXLZ42`*WT46#Y&M7.XXE!9?4M"CK)68:VA?Z]B;L]N$0KO@0X!>:P4R0)U/7 M+F-E[H:YFR,.J\,)N&=P?P1.:MPWYKX=<7,*F;S'B1U>M/9^7%SW_I)%+EF$ M<*P<)\9NF;L]XGHUSF+..N*H7FBWZ!"/,@ZV8W%6A[G?\_BF,MY7QA!OF<M0 MD'A47"2A7%RJ6Z,XSQBXK`C=5L;6OXJZI[V3F2CSX\VKK^J"7"*]\V12K"ID M[QP81B]17@&?SH'9Q@_D`9QB%U--/<O]-.\<_HG0_0VVPMVX='?N6)<Q'-&S M*%87W99<(A<)-0HJL$$,_<6IE.2[:]5;LU35?T)5,7Y.@UQ`]1BG;(I.&YLM M8PYAZ;J45$.J\:$,4%WI7"12Z1"T6O]0_46!*@[.;FI?Y'Y8<9]:5Z=LN.A# M-83[ZWMFVNQ0;)"3VHO[T@NB'#;+FYS#)J5:&E']D(Z!R/?'Q_!)'6A0MC3E E`\N^[YS,4Y2__`,0%/TEB`H``"([8VQO<V4@3SMD;R`B9B(["O!) ` end

Replies are listed 'Best First'.
(jcwren) Re: AVR Compiler
by jcwren (Prior) on Mar 30, 2001 at 10:17 UTC

    This looks to be pretty cool, but what exactly does it expect as input? I've thrown a bunch of different things at it, and what I always get on the second line is "Error: = expected".

    I speak some AVR, so I *think* I know what I'm doing, but I can't make this play.

    --Chris

    e-mail jcwren
      Try something like:

      too = tree / fore;;

      You'll have to include the ";;", there's a small bug in the parser that requires the ";" to be typed twice (if you want to fix it, running the decompressed script through perltidy will make things much nicer, if still somewhat obscure).

      But wait, there's more! The assignment compiler supports unlimited numbers of parentheses!

      The assignment  too = tree / (fore + (1 * (6 - jive)));; will compile. Granted, it ain't pretty. And it doesn't deal with constants well (this = 3 * 3;; will result in instructions to multiply 3 and 3, then store the results to "this"). But it *will* compile!