±¸¹® ºÐ¼® :: BooleanLogic.

ºÎ¿ï Ç¥Çö½Ä Æļ­
Áö±Ý ´Ù¿î·Îµå

±¸¹® ºÐ¼® :: BooleanLogic. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Ruslan Zakirov and Robert Spier
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~ruz/

±¸¹® ºÐ¼® :: BooleanLogic. ű×


±¸¹® ºÐ¼® :: BooleanLogic. ¼³¸í

ºÎ¿ï Ç¥ÇöÀÇ Æļ­ Parse :: BooleanLogicÀº ºÎ¿ï Ç¥Çö½ÄÀ»À§ÇÑ ¸Å¿ì ºü¸¥ Æļ­ ÀÎ Perl ¸ðµâÀÔ´Ï´Ù. ¿ø·¡ Ç¥Çö½Ä°ú °°Àº SQLÀ» ±¸¹® ºÐ¼® ÇÒ ¼öÀÖ´Â ¿äû ÃßÀû±â°¡ ¾µ ¼ö ÀÖÁö¸¸ ¿©ÀüÈ÷ ´É·ÂÀÌÀÖ´Â ÇÇ¿¬»êÀÚ¿Í °ýÈ£¸¦ »ç¿ëÇÏ¿© ±×·ìÈ­µÇ°í Áßø µÈ ÇÇ¿¬»êÀÚ°¡ Æ÷ÇÔ µÈ ÇÇ¿¬»êÀÚ°¡ÀÖ´Â ÇÇ¿¬»êÀÚ·Î ´Ù¸¥ ºÎ¿ï ³í¸® ¹®ÀåÀ» ±¸¹® ºÐ¼®ÇÏ´Â µ¥ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Æļ­°¡ ´Ù¸¥ °ÍÀ» ±¸¹® ºÐ¼® ÇÒ ¼öÀÖÀ» Á¤µµ·Î Æļ­¸¦ À¯¿¬ÇÏ°Ô ¸¸µå´Â °ÍÀÔ´Ï´Ù. ¿¹¸¦ µé¾î : # SQL°ú °°Àº Ç¥Çö½Ä (task.status = "new"¶Ç´Â task.status = "¿­±â") ¹× task.owner_id = 123 # GoogleÀº Gmail¿¡¼­ »ç¿ë µÈ °Ë»ö ±¸¹®°ú °°Àº °Ë»ö ±¸¹®°ú °°½À´Ï´Ù. ±âŸ ¼­ºñ½º Á¦¸ñ : "ÀϺΠÅؽºÆ®"(¿¡¼­ : Me ¶Ç´Â To : Me) ·¹À̺í : Todo! Label : Done # ¹ÙÀ̳ʸ® ºÎ¿ï ³í¸® Ç¥Çö½Ä (a | b) ¹× (C | D) ºÎ¿ï ¿¬»êÀÚ ¹× ¿þÀÌ ¿þÀÌ¿¡ »ç¿ëµÇ´Â ¸®ÅÍ·²À» º¯°æÇÒ ¼ö ÀÖ½À´Ï´Ù. ...¿¡ »ý¼ºÀÚÀÇ Àμö¿¡ ´ëÇÑ ¼³¸í¿¡¼­ ÀÌ°Í¿¡ ´ëÇØ ÀÚ¼¼È÷ ¾Ë¾Æº¸½Ê½Ã¿À. Synopsis Parse :: BooleanOgic; µ¥ÀÌÅÍ :: Dumper; MY $ PARSER = PARSE :: BOOleanLogic-> New (Operators => ); $ TREE = $ PARSER-> AS_ARRAY ( 'LABEL : Æļ­ Á¦¸ñ : "ºÎ¿ï ·ÎÁ÷"); Àμ⠴ýÆÛ ($ Æ®¸®); $ parser = »õ ±¸¹® ºÐ¼® :: BooleanLogic; $ tree = $ parser-> as_array ( 'x = 10'); Àμ⠴ýÆÛ ($ Æ®¸®); $ tree = $ parser-> as_array ( 'x = 10 ¶Ç´Â (x> 20 ¹× x <30)'); Àμ⠴ýÆÛ ($ Æ®¸®); # callbacks $ parser-> Parse (String => x <30) ' callback => {open_paren => sub {...}, ¿¬»êÀÚ => SUB {. ..}, operand => sub {...}, close_paren => sub {...}, error => sub {...},},); ¿ä±¸ »çÇ× : ¡¤ Perl.


±¸¹® ºÐ¼® :: BooleanLogic. °ü·Ã ¼ÒÇÁÆ®¿þ¾î