Re: PKGBUILD parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, May 9, 2010 at 4:57 PM, Kaiting Chen <kaitocracy@xxxxxxxxx> wrote:
> Just to let you know dude, you can't parse that with a regular expression. A
> regular expression is modeled / parsed by a finite automaton = a state
> machine with a finite number of states. Braces allow nesting which creates a
> source with potentially an infinite number of states consider,
>
> a() { echo 1; b() { echo 2; }; }
>
> Potentially I could next expressions like that endlessly. A regular
> expression will never be able to parse that.because it can never decide
> which brace is the final one. This might be better explained here.
>
> http://stackoverflow.com/questions/133601/can-regular-expressions-be-used-to-match-nested-patterns

thank you. i'll continue my journey on parsing this another way.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux