GNUgperfUtiltity»ç¿ëÀÚ¼³¸í¼­


GNU GPERF Utilty »ç¿ëÀÚ¼³¸í¼­ Douglas C. Schmidt ¸¶Áö¸· ¾÷µ¥ÀÌÆ®³¯Â¥: 1998³â 4¿ù14ÀÏ ¹öÀü2.7 Copyright (C) 1989-1998 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the section entitled "GNU gperf General Public License" is included exactly as in the original, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that the section entitled "GNU gperf General Public License" may be included in a translation approved by the author instead of in the original English.

GNU GENERAL PUBLIC LICENSE

Version 1, February 1989

Copyright (C) 1989 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too.

When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS

  1. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you".
  2. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy.
  3. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms.
  4. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system.
  5. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance.
  6. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions.
  7. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein.
  8. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation.
  9. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

    NO WARRANTY

  10. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  11. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

Appendix: How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the program's name and a brief idea of what it does.
Copyright (C) 19yy  name of author

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

That's all there is to it!

GNU gperf °øÇåÀڵ鿡°Ô

¼Ò°³

gperf´Â C++·Î ÀÛ¼ºµÈ ¿Ïº® Çؽà ÇÔ¼ö »ý¼º±âÀÔ´Ï´Ù. ±×°ÍÀº n°³ ¿ä¼ÒÀÇ »ç¿ëÀÚÁ¤ÀÇµÈ Å°¿öµå ¼Â W¸¦ ¿Ïº® Çؽ¬ ÇÔ¼ö F·Î º¯È¯½Ãŵ´Ï´Ù. F´Â À¯´ÏÅ©ÇÏ°Ô W¾ÈÀÇ Å°¿öµåµéÀ» 0¿¡¼­ k»çÀÌÀÇ ¹üÀ§¾È¿¡ ¸ÅÇÎ ½Ãŵ´Ï´Ù.k´Â nº¸´Ù Å©°Å³ª °°½À´Ï´Ù. ¸¸¾à k°¡ n°ú °°´Ù¸é F´Â ÃÖ¼ÒÀÇ ¿Ïº® Çؽà ÇÔ¼öÀÔ´Ï´Ù. gperf´Â 0..k ¿ä¼Ò ½ºÅÂƽ ·è¾÷ Å×À̺í°ú CÇÔ¼öÀÇ Â¦À» »ý¼ºÇÕ´Ï´Ù. ÀÌ ÇÔ¼öµéÀº ÁÖ¾îÁø ¹®ÀÚ¿­ s°¡ W¾È¿¡ ¹ß°ßµÇ´ÂÁö, ·è¾÷ Å×À̺í¾ÈÀ¸·Î Àû¾îµµ ÇÑ°³ÀÇ ÇÁ·Îºê¸¦ »ç¿ëÇÏ¿© °áÁ¤ÇÕ´Ï´Ù.

ÇöÀç geprf´Â GNU C, GNU C++, GNU Pascal, GNU Module 3, GNU indent¸¦ Æ÷ÇÔÇÏ´Â ¼ö°³ÀÇ Á¦Ç°°ú ¿¬±¸ÁßÀÎ ÄÄÆÄÀÏ·¯, ±×¸®°í ¾ð¾î ó¸® Åø¾ÈÀÇ »çÀü ºÐ¼®±â¸¦ À§ÇØ ¿¹ºñ Å°¿öµå Àνı⸦ »ý¼ºÇÕ´Ï´Ù. geprfÀÇ ¿ÏÀüÇÑ C++ ¼Ò½º ÄÚµå´Â ics.uci.edu¿Í ftp.santafe.eduÀÇ À͸í ftp ¸¦ ÅëÇØ ¾òÀ»¼ö ÀÖ½À´Ï´Ù. gperf´Â ¶ÇÇÑ ¼ö³âµ¿¾È GNU libg++ ¶óÀ̺귯¸®¿Í ÇÔ²² ¹èÆ÷µÇ¾ú½À´Ï´Ù. À̽ļºÀÌ ¶Ù¾î³ª°í µ¿ÀÏÇÑ ±â´ÉÀÇ gperf K&R C ¹öÀüÀÌ comp.sources.unix¿¡ º¸°üµÇ¾î ÀÖ½À´Ï´Ù. ³¡À¸·Î, gperfÀÇ µðÀÚÀÎÀ» ¼³¸íÇÑ ¼³¸í¼­¿Í ÀÚ¼¼È÷ ±â·ÏµÈ ½ÇÇ༭°¡ Second USENIX C++ ÄÁÆÛ·±½º ÀÇ»ç·Ï¿¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

½ºÅÂƽ °Ë»ö ±¸Á¶¿Í GNU gperf

½ºÅÂƽ °Ë»ö ±¸Á¶´Â ƯÁ¤ÇÑ ±âº» ¿ÀÆÛ·¹À̼Ç, Áï ÃʱâÈ­,ÀԷ±׸®°í Á¶È¸¸¦ °¡Áö´Â Àý´ë µ¥ÀÌŸ ŸÀÔÀÔ´Ï´Ù. °³³äÀûÀ¸·Î, ¸ðµç ÀÔ·ÂÀº Á¶È¸ÀÌÀü¿¡ ¹ß»ýÇÕ´Ï´Ù. ½ÇÁ¦·Î,gperf´Â °Ë»ö ÁýÇÕ Å°¿öµåµéÀ» Æ÷ÇÔÇÏ´Â ½ºÅÂƽ¾î·¹ÀÌ¿Í »ç¿ëÀÚ¿¡ ÀÇÇØ °áÁ¤µÇ´Â ÀÓÀÇ·Î °ü°èµÇ´Â ¼Ó¼ºµéÀ» »ý¼ºÇÕ´Ï´Ù. ±×·¡¼­ º»ÁúÀûÀ¸·Î ÀÔ·ÂÀ» À§ÇÑ ½ÇÇà ½Ã°£ °ªÀÌ ¾ø½À´Ï´Ù. ±×°ÍÀº ½ºÅÂƽ °Ë»ö ÁýÇÕÀÇ Ç¥ÇöÀ» À§ÇÑ À¯¿ëÇÑ µ¥ÀÌŸ ±¸Á¶ÀÔ´Ï´Ù. ½ºÅÂƽ °Ë»ö ÁýÇÕµéÀº ¼ÒÇÁÆ®¿þ¾î ½Ã½ºÅÛ ¾îÇø®ÄÉÀ̼Ǿȿ¡¼­ ÀÚÁÖ ¹ß»ýÇÕ´Ï´Ù. ÀϹÝÀûÀÎ ½ºÅÂƽ °Ë»ö ÁýÇÕµéÀº ÄÄÆÄÀÏ·¯ ¿¹¾à¾î, ¾î¼Àºí·¯ ÀÔ·Â opcode,±×¸®°í ³»Àå ½© ÀÎÅÍÇÁ¸®ÅÍ ¸í·É¾îµéÀ» Æ÷ÇÔÇÕ´Ï´Ù. °Ë»ö ÁýÇÕ ¸â¹öµéÀº Å°¿öµå¶ó°í ºÒ¸®´Âµ¥, º¸Åë ÇÁ·Î±×·¥ÀÇ ÃʱâÈ­µ¿¾È¿¡ ±¸Á¶¿¡ ´Ü Çѹø ÀԷµǸç, ½ÇÇà½Ã¿¡ ÀϹÝÀûÀ¸·Î ¼öÁ¤µÇÁö ¾Ê½À´Ï´Ù.

¼öÀûÀÎ ½ºÅÂƽ °Ë»ö ±¸Á¶ÀÇ ±¸ÇöÀº ¾î·¹À̳ª, ¸µÅ©µÈ ¸®½ºÆ®, ¹ÙÀ̳ʸ® °Ë»ö ³ª¹«±¸Á¶,µðÁöÅÐ ±¸Á¶ ½Ãµµ, ±×¸®°í Çؽà Å×À̺í·Î Á¸ÀçÇÕ´Ï´Ù. °ø°£ À¯Æ¿¶óÀÌÁ¦À̼ǰú °Ë»ö ½Ã°£ È¿°ú»çÀÌ¿¡¼­ ¼­·Î ´Ù¸¥ ½Ãµµ´Â ±ÕÇüÀ» ÃëÇÒ°ÍÀ» Á¦°øÇÕ´Ï´Ù.¿¹¸¦ µé¾î, ¼ÒÆÃµÈ n°³ ¿¤·¹¸àÆ® ¾î·¹ÀÌ´Â °ø°£Àû À̵æÀÌ ÀÖ°í, ¹Ý¸é¿¡ ¹ÙÀ̳ʸ®°Ë»öÀ» ÀÌ¿ëÇÏ´Â °Ë»ö ¿ÀÆÛ·¹À̼ǿ¡ ´ëÇÑ Æò±Õ ÄÉÀ̽º ½Ã°£ º¹Àâµµ´Â ·Î±× n¿¡ ºñ·ÊÇÕ´Ï´Ù. ¿ªÀ¸·Î, Çؽà Å×ÀÌºí ±¸ÇöÀº ÀÚÁÖ ÀÏÁ¤ÇÑ ½Ã°£³»¿¡ Å×ÀÌºí ¿£Æ®¸®¸¦ À§Ä¡½ÃÅ°Áö¸¸, ÀϹÝÀûÀ¸·Î ¿©ºÐÀÇ ¸Þ¸ð¸®¸¦ ´õ Áö¿ì¸ç, ´õ ³ª»Û ÄÉÀ̽º ¼º´ÉÀ» º¸ÀÔ´Ï´Ù.

ÃÖ¼Ò ¿Ïº® Çؽà Æã¼ÇÀº ½ºÅÂƽ °Ë»ö ÁýÇÕÀÇ Æ¯º°ÇÑ °æ¿ì¿¡ ´ëÇØ ÃÖ»óÀÇ ¼Ö·ç¼ÇÀ» Á¦°øÇÕ´Ï´Ù. ÃÖ¼Ò ¿Ïº® Çؽà Æã¼ÇÀº µÎ °¡ÁöÀÇ Æ¯Â¡À¸·Î Á¤Àǵ˴ϴÙ:

´ëºÎºÐÀÇ ¾îÇø®ÄÉÀ̼ǿ¡ ´ëÇؼ­ ÃÖ¼Ò ¿Ïº®Çؽà Æã¼Çµéº¸´Ù ¿Ïº®Çؽà Æã¼ÇµéÀ» ¸¸µé¾î³»´Â °ÍÀÌ ´õ ½±½À´Ï´Ù.´õ ³ª¾Æ°¡, ½ÇÁ¦ ¹®Á¦¿¡¼­ ÃÖ¼Ò°¡ ¾Æ´Ñ ¿Ïº® Çؽà Æã¼ÇÀº ÀÚÁÖ ÃÖ¼ÒÀÇ °Íº¸´Ù ´õ »¡¸® ½ÇÇàµË´Ï´Ù. ÀÌ Çö»óÀº µå¹® Å°¿öµå Å×À̺íÀ» ã´Â °ÍÀÌ "³Î" ¿£Æ®¸®¸¦ À§Ä¡½ÃÅ°´Â °¡´É¼ºÀ» Áõ»ç½ÃÅ°¸ç, µû¶ó¼­ ¹®ÀÚ¿­ ºñ±³¸¦ °¨¼Ò½ÃÅ°±â ¶§¹®ÀÔ´Ï´Ù.gperfÀÇ µðÆúÆ® ÇൿÀº Å°¿öµå ÁýÇյ鿡 ´ëÇؼ­ ÃÖ¼Ò¿¡ °¡±î¿î ¿Ïº® Çؽà Æã¼ÇÀ» »ý¼ºÇÕ´Ï´Ù.±×·¯³ª, gperf´Â ÃÖ¼Ò¼º°ú ¿Ïº®¼ºÀÇ µî±ÞÀ» ³Ñ¾î »ç¿ëÀÚÀÇ Á¶ÀýÀ» Çã¶ôÇÏ´Â ¸¹Àº ¿É¼ÇÀ» Á¦°øÇÕ´Ï´Ù.

½ºÅÂƽ °Ë»ö ÁýÇÕµéÀº Á¾Á¾ ±ä ½Ã°£µ¿¾È ºñ±³Àû ¾ÈÁ¤¼ºÀ» º¸¿©ÁÝ´Ï´Ù. ¿¹¸¦ µé¾î, ¾Æ´ÙÀÇ 63°³ÀÇ ¿¹¾à¾î´Â °ÅÀÇ 10³âµ¿¾È ÀÏÁ¤ÇÏ°Ô ³²¾Æ ÀÖ½À´Ï. µû¶ó¼­ ¸¸¾à ±× °á°ú·Î¼­ ¸Å¿ì ¸¹Àº Ƚ¼ö·Î¼­ »ç¿ëµÇ¾îÁø´Ù¸é ÇѹøÃÖÀûÀÇ °Ë»ö ±¸Á¶¸¦ ¸¸µé¾î°¡´Â ÇÕÀÇµÈ ³ë·Â¸¦ È®Àå½ÃÅ°´Â °ÍÀº ÀÚÁÖ ÇÒ¸¸ÇÑ °¡Ä¡°¡ ÀÖ´Â ÀÏÀÔ´Ï´Ù.gperf´Â ¼ÕÀ¸·Î ½Ã°ø°£ÀÇ À¯È¿ÇÑ °Ë»ö ±¸Á¶¸¦ ¸¸µé¾î³»´Â°Í°ú °ü·ÃµÇ´Â ´ÜÁ¶·Ó°í °íµÈ ÀÛ¾÷À» ¾ø¾ÖÁÝ´Ï´Ù. ÀÌ°ÍÀº Áß¿äÇÑ ÇÁ·Î±×·¡¹Ö ÇÁ·ÎÁ§Æ®¿¡ ´ëÇؼ­ À¯È¿ÇÏ°í ½ÇÁ¦ÀûÀÎ µµ±¸¶ó°í Áõ¸íÀÌ µÇ¾ú½À´Ï´Ù. gpef·ÎºÎÅÍÀÇ °á°ú´Â ÀϹÝÀûÀ¸·Î GNU C, GNU C++, GNU Pascal ±×¸®°í GNU Modula 3¸¦ Æ÷ÇÔÇÏ¿© ¼ö°³ÀÇ Á¦Ç°°ú ¿¬±¸¿ë ÄÄÆÄÀÏ·¯¿¡ »ç¿ëµË´Ï´Ù. ÈÄÀÚÀÇ µÎ°³ÀÇ ÄÄÆÄÀÏ·¯´Â ¾ÆÁ÷ °ø½ÄÀûÀÎ GNU ¹èÆ÷º»ÀÇ ÀϺδ ¾Æ´Õ´Ï´Ù. °¢°¢ÀÇ ÄÄÆÄÀÏ·¯´Â gperf¸¦ È¿°úÀûÀ¸·Î °¢ÀÚÀÇ ¿¹¾à¾î¸¦ È®ÀÎÇÏ´Â ½ºÅÂƽ °Ë»ö ±¸Á¶µéÀ» ÀÚµ¿ÀûÀ¸·Î »ý¼ºÇϴµ¥¿¡ ÀÌ¿ëÇÕ´Ï´Ù.

GNU gperfÀÇ °í·¹º§ ¼­¼ú

¿Ïº® Çؽà Æã¼Ç »ý¼º±â geprf´Â Å°ÆÄÀÏ(¶Ç´Â µðÆúÆ®·Î Ç¥ÁØ ÀÔ·ÂÀ¸·ÎºÎÅÍ)·ÎºÎÅÍ Å°¿öµåÀÇ ÁýÇÕÀ» ÀнÀ´Ï´Ù. ±×°ÍÀº ·è¾÷ Å×À̺í·ÎÀÇ Àû¾îµµ ÇÑ°³ÀÇ ÇÁ·Îºê¸¦ °¡Áö´Â ½ºÅÂƽ Å°¿öµå ÁýÇÕÀÇ ¸â¹ö¸¦ ÀÎÁöÇÏ´Â ¿Ïº® Çؽà Æã¼Ç¸¦ ²ø¾î³»´Â ½Ãµµ¸¦ ÇÕ´Ï´Ù. ¸¸¾à gperf°¡ ±×·¯ÇÑ Æã¼ÇÀ» »ý¼ºÇϴµ¥¿¡ ¼º°øÇÏ¸é ±×°ÍÀº Çؽ̰ú Å×ÀÌºí ·è¾÷ ÀνÄÀ» ¼öÇàÇÏ´Â C ¼Ò½º ÄÚµå ·çƾ ½ÖÀ» ¸¸µé¾î³À´Ï´Ù. ¸ðµç »ý¼ºµÈ C ÄÚµå´Â Ç¥ÁØ Ãâ·ÂÀ¸·Î ¹æÇâÁö¾îÁý´Ï´Ù. ¾Æ·¡¿¡ Ç¥»çµÈ ¸í·ÉÇà ¿É¼ÇÀº gperf·ÎÀÇ ÀԷ°ú Ãâ·Â Çü½ÄÀ» °íÄ¡´Â °ÍÀ» °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù.

µðÆúÆ®·Î, gperf´Â È¿°úÀûÀÎ °ø°£ ÀÌ¿ë¿¡¼­ ´ú °­Á¶µÈ ½Ã°£È¿À² Äڵ带 »ý¼ºÇÏ·Á°í ½ÃµµÇÕ´Ï´Ù. ±×·¯³ª, °ø°£ÀÇ ÀúÀåÀ» À§ÇØ ½ÇÇà½Ã°£À» ±³È¯À» Çã¶ôÇϰųª ¶Ç´Â ¿ªÀ¸·ÎÀÇ Çã¶ô¸¦ À§ÇØ ¼ö°³ÀÇ ¿É¼ÇÀÌ Á¸ÀçÇÕ´Ï´Ù. Ưº°È÷, ÀϹÝÀûÀ¸·Î ´õ ºü¸¥ °Ë»öÀ» ¾çº¸ÇÏ¿©, »ý¼ºµÈ Å×À̺í Å©±âÀÇ È®ÀåÀº Èñ¹ÚÇÑ °Ë»ö ±¸Á¶¸¦ ¸¸µé¾î³À´Ï´Ù. ¿ªÀ¸·Î, gperf¸¦ µ¥ÀÌŸ °ø°£ ÀúÀå »çÀÌÁ ÃÖ¼ÒÈ­ÇÏ´Â C ½ºÀ­Ä¡ ±¸¹® ¹æ¹ý¿¡ Á÷Á¢ÀûÀ¸·Î »ç¿ëÇÒ¼öµµ ÀÖ½À´Ï´Ù. ´õ ³ª¾Æ°¡¼­, C ½ºÀ­Ä¡ÀÇ »ç¿ëÀº ½ÇÁ¦ÀûÀ¸·Î ¾î´ÀÁ¤µµ ½Ã°£À» ¹úÃæÇÏ¿© Å°¿öµåÀÇ ¼Óµµ¸¦ ³ôÀϼöµµ ÀÖ½À´Ï´Ù. ½ÇÁ¦ÀÇ °á°ú´Â ¹°·Ð C ÄÄÆÄÀÏ·¯¿¡ ÀÇÁ¸ÇÕ´Ï´Ù.

ÀϹÝÀûÀ¸·Î, gperf´Â ¹®ÀÚ¿¡ °ªÀ» ÁöÁ¤ÇÕ´Ï´Ù. ±×°ÍÀº ¸î°³ÀÇ °ªÀÇ ÁýÇÕÀÌ °¢°¢ÀÇ Å°¿öµå¿¡ À¯ÀÏÇÑ °ªÀ» ÁÖ±âÀü±îÁö ÇؽÌÀ» À§ÇØ »ç¿ëµË´Ï´Ù. È¿°úÀûÀÎ ¹ß°ßÀû ÇÁ·Î±×·¥Àº Çؽà °ªÀÇ ¹üÀ§°¡ Ä¿Áú¼ö·Ï, gperf°¡ ¿Ïº® Çؽà Æã¼Ç¸¦ ¹ß°ßÇÏ°í ¸¸µé¾î³»´Â °ÍÀÌ ½¬¾îÁý´Ï´Ù. ½ÇÇèÀº gperf·ÎºÎÅÍ ´ëºÎºÐÀ» ¾ò¾î³»´Â ÇÙ½ÉÀÔ´Ï´Ù.

gperf·ÎÀÇ ÀÔ·Â Çü½Ä

Ưº°È÷ `-t' ¿É¼Ç, Áï ¾î¶² ¸í·ÉÇà ¾Æ±Ô¸ÕÆ®¸¦ º¯È¯½ÃÅ´À¸·Î ÀÔ·Â Å°ÆÄÀÏ Çü½ÄÀ» Á¶ÀýÇÒ¼ö ÀÖ½À´Ï´Ù. ÀÔ·Â ÇüÅ´ GNU À¯Æ¿¸®Æ¼ flex¿Í bison(¶Ç´Â UNIX À¯Æ¿¸®Æ¼ lex¿Í yacc)°ú ºñ½ÁÇÕ´Ï´Ù. ´ÙÀ½Àº ÀϹÝÀûÀÎ Çü½ÄÀÇ °³·«ÀûÀÎ ¸ð½ÀÀÔ´Ï´Ù:

declarations
%%
keywords
%%
functions

flex³ª bison°ú Ʋ¸®°Ô, gperf ÀÔ·ÂÀÇ ¸ðµç ¼½¼ÇµéÀº ¿É¼ÇÀ¸·Î µÇ¾î ÀÖ½À´Ï´Ù. ´ÙÀ½ Àýµé¿¡¼­ °¢°¢ÀÇ ¼½¼Ç¿¡ ´ëÇÑ ÀÔ·Â Çü½ÄÀ» ±â¼úÇÕ´Ï´Ù.

½ºÆ®·°Æ®(struct) ¼±¾ð°ú C code Æ÷ÇÔ(Inclusion)

Å°¿öµå ÀÔ·Â ÆÄÀÏÀº ¼±ÅÃÀûÀ¸·Î »ç¿ëÀÚ-°ø±ÞÀ» ÁغñÇϱâ À§ÇÑ Á¶Ç×»Ó¸¸ ¾Æ´Ï¶ó ÀÓÀÇÀÇ C ¼±¾ðµé°ú Á¤ÀǵéÀ» Æ÷ÇÔÇϱâ À§ÇÑ ¼½¼ÇÀ» Æ÷ÇÔÇÕ´Ï´Ù. ¸¸¾à `-t' ¿É¼ÇÀÌ È°¼ºÈ­µÇ¸é, ¹Ýµå½Ã Å°ÆÄÀÏ ÆÄÀϷκÎÅÍÀÇ ¼±¾ðºÎ¾È¿¡ ¸¶Áö¸· ÄÄÆ÷³ÍÆ®·Î¼­ C ½ºÆ®·°Æ®°¡ Á¦°øµÇ¾î¾ß ÇÕ´Ï´Ù. ÀÌ ½ºÆ®·°Æ®¾ÈÀÇ Ã¹¹ø° Çʵå(field)´Â ÀÌ ÇʵåÀÇ À̸§ÀÌ ¾Æ·¡¿¡ ±â¼úµÈ `-K' ¿É¼ÇÀ¸·Î ¼öÁ¤ÇÏ´Â °ÍÀÌ °¡´ÉÇÔ¿¡µµ ºÒ±¸ÇÏ°í `³×ÀÓ(name)'À̶ó°í ºÒ¸®´Â char * ½Äº°ÀÚ°¡ µÇ¾î¾ß ÇÕ´Ï´Ù.

´ÙÀ½¿¡ ÀÔ·ÂÀ¸·Î½á ³âµµÀÇ ´Þ(month)°ú ±×°ÍµéÀÇ ¼Ó¼ºÀ» »ç¿ëÇÑ °£´ÜÇÑ ¿¹°¡ ÀÖ½À´Ï´Ù:

struct months { char *name; int number; int days; int leap_days; };
%%
january,   1, 31, 31
february,  2, 28, 29
march,     3, 31, 31
april,     4, 30, 30
may,       5, 31, 31
june,      6, 30, 30
july,      7, 31, 31
august,    8, 31, 31
september, 9, 30, 30
october,  10, 31, 31
november, 11, 30, 30
december, 12, 31, 31

Å°¿öµåµéÀÇ ¸®½ºÆ®¿Í ´Ù¸¥ Çʵå·ÎºÎÅÍÀÇ ½ºÆ®·°Æ® ¼±¾ðÀÇ ºÐ¸®°¡ ¿¬¼ÓµÈ ÆÛ¼¾Æ® ±âÈ£ÀÇ ½Ö %%À̸ç, À¯´Ð½º À¯Æ¿¸®Æ¼ lexó·³ ù¹ø° Ä÷³ÀÇ ¿ÞÆí¿¡ ³ªÅ¸³ªÀÖ½À´Ï´Ù.

GNU À¯Æ¿¸®Æ¼ flex¿Í bison°ú ºñ½ÁÇÑ ¹®¹ýÀ» »ç¿ëÇÏ¿©, »ý¼ºµÈ Ãâ·Â ÆÄÀÏ·Î C ¼Ò½º ÅؽºÆ®¿Í Ãà¾îÀûÀÎ ÄÚ¸àÆ®¸¦ Á÷Á¢ÀûÀ¸·Î Æ÷ÇÔÇÏ´Â °ÍÀÌ °¡´ÉÇÏ´Ù. ÀÌ°ÍÀº ¸®Àü(region) ÀλçÀ̵带 left-justifedµÈ ¼­¶ó¿îµù(surrounding)%{,%} ½ÖÀ¸·Î µÑ·¯½Î´Â °ÍÀ¸·Î ¼ºÃëµË´Ï´Ù. ´ÙÀ½¿¡ ÀÌ·¯ÇÑ Æ¯Â¡À» ÀÏ·¯½ºÆ®ÇÑ ¾Õ¼­ÀÇ ¿¹Á¦¿¡ ±âÃÊÇÑ ÀÔ·Â ÇÁ·¹±×¸ÕÆ®(fragment)°¡ ÀÖ½À´Ï´Ù:

%{
#include <assert.h>
/* ÀÌ Äڵ弽¼ÇÀº Ãâ·ÂÀ¸·Î °ð¹Ù·Î »ðÀԵ˴ϴÙ.*/
int return_month_days (struct months *months, int is_leap_year);
%}
struct months { char *name; int number; int days; int leap_days; };
%%
january,   1, 31, 31
february,  2, 28, 29
march,     3, 31, 31
...

ÀüüÀûÀ¸·Î ¼±¾ðºÎ¸¦ »ý·«Çϴ°ÍÀÌ °¡´ÉÇÕ´Ï´Ù. ÀÌ·¯ÇÑ °æ¿ì Å°ÆÄÀÏÀº ù¹ø° Å°¿öµå ¶óÀÎÀ¸·Î °ð¹Ù·Î ½ÃÀÛÇÕ´Ï´Ù. Áï:

january,   1, 31, 31
february,  2, 28, 29
march,     3, 31, 31
april,     4, 30, 30
...

Å°¿öµå ¿£Æ®¸®¸¦ À§ÇÑ Çü½Ä

µÎ¹ø° Å°ÆÄÀÏ Æ÷¸Ë ¼½¼ÇÀº Å°¿öµåµéÀÇ ¶óÀεé°ú Á¦°øµÉ¼öµµ ÀÖ´Â ÀÓÀÇÀÇ °ü·ÃµÈ ¼Ó¼ºµéÀ» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. ù¹ø° Ä÷³¿¡¼­ `#'À¸·Î ½ÃÀ۵Ǵ ¶óÀÎÀº ÁÖ¼®À¸·Î ¿©°ÜÁý´Ï´Ù. `#'´ÙÀ½¿¡ µÚµû¸£´Â ¸ðµç °ÍµéÀº ±×°ÍºÎÅÍ ´ÙÀ½ÀÇ »õ·Î¿î ÇàÀ» Æ÷ÇÔÇÏ¿© ¹«½ÃµË´Ï´Ù.

ÁÖ¼®¹®ÀÌ ¾Æ´Ñ ¶óÀÎÀÇ Ã¹¹ø° Çʵå´Â Ç×»ó Å° ±× ÀÚ½ÅÀÔ´Ï´Ù. ±×°ÍÀº °£´ÜÇÑ ¸íĪÀ¸·Î ÁÖ¾îÁ®¾ß Çϴµ¥, Áï ÀοëºÎÈ£·Î µÑ·¯½×À̰ųª ù¹ø° Ä÷³¿¡ ¹ÝÇÏ¿© left-justified flushµÇ´Â °ÍÀÌ ¾ø¾î¾ß ÇÕ´Ï´Ù. ÀÌ ¹®¸Æ¿¡¼­, "Çʵå"´Â ó¹ø° ºóÄ­, ¶Ç´Â Äĸ¶, ȤÀº »õ·Î¿î¶óÀαîÁö È®ÀåµÇÁö¸¸ ±×°ÍµéÀ» Æ÷ÇÔÇÏÁö´Â ¾Ê´Â°ÍÀ¸·Î ¿©°ÜÁý´Ï´Ù. ¿©±â¿¡ C ¿¹¾à¾îÀÇ ºÎºÐ ¸®½ºÆ®·ÎºÎÅÍ ¹ßÃéµÈ °£´ÜÇÑ ¿¹°¡ ÀÖ½À´Ï´Ù.

# À̰͵éÀº C ¿¹¾à¾îÀÔ´Ï´Ù. ANSI C ¿¹¾à¾îÀÇ ¿ÏÀüÇÑ ¸®½ºÆ®µéÀ» À§ÇØ 
# c.gperfÆÄÀÏÀ» º¸½Ê½Ã¿À. 
unsigned
sizeof
switch
signed
if
default
for
while
return

flex³ª bison¿Í´Â ´Þ¸® ù¹ø° %% Ç¥½Ã´Â ¸¸¾à ¼±¾ðºÎ°¡ ºñ¾îÀÖ´Ù¸é »ý·«µÉ¼öµµ ÀÖ´Ù´Â °ÍÀ» ÁÖÀÇÇϽʽÿÀ.

µ¡ºÙ¿©Áø ÇʵåµéÀº ¼±ÅÃÀûÀ¸·Î ¼±µµ Å°¿öµå¸¦ µû¶ó°¥¼öµµ ÀÖ½À´Ï´Ù. ÇʵåµéÀº Äĸ¶·Î ±¸º°µÇ¾îÁ®¾ß Çϸç, ¶óÀÎÀÇ ³¡¿¡¼­ ³¡³»¾ß ÇÕ´Ï´Ù. ÀÌ·¯ÇÑ ÇʵåµéÀÌ ÀǹÌÇÏ´Â °ÍÀº ÀüÀûÀ¸·Î ´ç½Å¿¡°Ô ´Þ·Á ÀÖ½À´Ï´Ù;±×°ÍµéÀº ¼±¾ðºÎ¿¡¼­ ´ç½Å¿¡ ÀÇÇØ Á¦°øµÇ´Â »ç¿ëÀÚÁ¤ÀÇµÈ ½ºÆ®·°Æ®ÀÇ ¿ä¼ÒµéÀ» ÃʱâÈ­È­´Âµ¥ »ç¿ëµË´Ï´Ù. ¸¸¾à `-t'¿É¼ÇÀÌ È°¼ºÈ­µÇÁö ¾Ê´Â´Ù¸é ÀÌ·¯ÇÑ ÇʵåµéÀº ´Ü¼øÈ÷ ¹«½ÃµË´Ï´Ù. ¸¶Áö¸· °ÍÀ» Á¦¿ÜÇÑ ¸ðµç ¾ÕÀÇ ¿¹Á¦µéÀº Å°¿öµå ¼Ó¼ºµéÀ» Æ÷ÇÔÇÕ´Ï´Ù.

Æ÷ÇԵǾî ÀÖ´Â Ãß°¡ÀûÀÎ CÇÔ¼öµé

¿É¼ÇÀÎ ¼¼¹ø° ¼½¼ÇÀº ¶ÇÇÑ flex¿Í bison¾È¿¡¼­ ¹ß°ßµÇ¾îÁö´Â Çù¾à°ú ¸Å¿ì ¹ÐÁ¢ÇÏ°Ô ´ëÀÀÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ ¼½¼Ç¾ÈÀÇ ¸ðµç ÅؽºÆ®´Â ¸¶Áö¸· %%¿¡¼­ ½ÃÀÛÇÏ¿© ÀÔ·Â ÆÄÀÏÀÇ ³¡±îÁö È®ÀåµÇ¾îÁö´Âµ¥,»ý¼ºµÇ¾îÁö´Â Ãâ·Â ÆÄÀϾȿ¡ ¸» ±×´ë·Î Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. ´ç¿¬È÷, ÀÌ ¼½¼Ç¾È¿¡ ´ã°ÜÁ® ÀÖ´Â Äڵ尡 Á¤´çÇÑ C¶ó´Â °ÍÀ» È®½ÅÇÏ´Â °ÍÀº ´ç½ÅÀÇ Ã¥ÀÓÀÔ´Ï´Ù.

gperf¸¦ ÀÌ¿ëÇÏ¿© »ý¼ºµÇ´Â C ÄÚµåÀÇ Ãâ·Â Æ÷¸Ë

¸î°³ÀÇ C Äڵ带 »ý¼ºÇÏ´Â ¹æ¹ýÀ» Á¶ÀýÇÏ´Â ¿É¼ÇµéÀÌ Ç¥ÁØ Ãâ·Â¿¡ ³ªÅ¸³ª ÀÖ½À´Ï´Ù. µÎ°³ÀÇ C ÇÔ¼ö°¡ »ý¼ºµË´Ï´Ù. ´ç½ÅÀÌ Ä¿¸Çµå ¶óÀÎ ¿É¼ÇÀ» ÀÌ¿ëÇÏ¿© in_word_set¸¦ À§ÇÑ À̸§À» ¼öÁ¤ÇÑ´Ù ÇÏ´õ¶óµµ ±×°ÍµéÀº hash¿Í in_word_set¶ó ºÒ¸³´Ï´Ù. µÎ°³ÀÇ ÇÔ¼öµå´Â µÎ°³ÀÇ ¾Æ±Ô¸ÕÆ®¸¦ ¿ä±¸Çϴµ¥, ½ºÆ®¸µÀÎ char * str¿Í ±æÀÌ(length) ÆĶó¹ÌÅÍÀÎ int lenÀÔ´Ï´Ù. ±×°ÍµéÀÇ µðÆúÆ® ÇÔ¼ö ÇÁ·ÎÅäŸÀÔÀº ´ÙÀ½°ú °°½À´Ï´Ù:

static int hash (char *str, int len);
int in_word_set (char *str, int len);

µðÆúÆ®·Î, »ý¼ºµÈ hash ÇÔ¼ö´Â lenÀ» ¼ö°³ÀÇ »ç¿ëÀÚÁ¤ÀÇµÈ Áö¿ªÀû ½ºÅÂƽ ¾î·¹À̾ȿ¡ ÀúÀåµÈ Á¶ÇÕµÈ(associated) °ª Å×À̺í¾ÈÀ¸·Î À妽ºµÈ str Å° Æ÷Áö¼Ç¿¡ ´õÇÔÀ¸·Î½á »ý¼ºµÈ Á¤¼ö°ªÀ» µ¹·ÁÁÝ´Ï´Ù. Á¶ÇÕµÈ °ª Å×À̺íÀº ³»ºÎÀûÀ¸·Î gperf¿¡ ÀÇÇؼ­ Çü¼ºµÇ¾îÁö¸ç ÀÌÈÄ hash_tableÀ̶ó ºÒ¸®´Â ½ºÅÂƽ Áö¿ª C ¾î·¹À̷μ­ Ãâ·ÂµË´Ï´Ù; ±× ÀÇ¹Ì¿Í Æ¯¼ºÀº ¾Æ·¡ºÎºÐ¿¡ ¹¦»çµÇ¾î ÀÖ½À´Ï´Ù. GNU gperfÀÇ ±¸Çö »ó¼¼µµ ¼½¼ÇÀ» º¸½Ê½Ã¿À. °ü·ÃµÈ Å° À§Ä¡µéÀº gperf°¡ ½ÇÇàµÉ¶§ `-k' ¿É¼Ç¿¡ ÀÇÇÏ¿© °áÁ¤µÇ´Âµ¥, ¾Æ·¡ÂÊÀÇ ¿É¼Çµé¼½¼Ç¿¡ ÀÚ¼¼È÷ ³ª¿Í ÀÖ½À´Ï´Ù. gperfÀ¯Æ¿¸®Æ¼¿¡ ´ëÇÑ ¿É¼Çµé ¼½¼ÇÀ» º¸½Ê½Ã¿À.

µÎ°³ÀÇ ¿É¼Ç `-g'(´ç½ÅÀÌ GNU C¿Í ±×°ÍÀÇ ÀζóÀÎÇÇÃÄ(feature)¸¦ °¡Áö°í ÄÄÆÄÀÏÇÑ´Ù°í °¡Á¤ÇÕ´Ï´Ù.)°ú `-a' (¾È½Ã C ½ºÅ¸ÀÏ ÇÔ¼ö ÇÁ·ÎÅäŸÀÔÀ» °¡Á¤ÇÕ´Ï´Ù.) Àº »ý¼ºµÈ hash ·çƾ°ú in_word_set ·çƾ ¸ðµÎÀÇ ³»¿ëÀ» ¹Ù²ß´Ï´Ù. ±×·¯³ª , ÇÔ¼ö in_word_set´Â ´ç½ÃÀÇ ¿É¼Ç ¼¼Æÿ¡ ´äÇÏ¿© ´õ È®ÀåÀûÀ¸·Î ¼öÁ¤ÀÌ µÉ ¼ö ÀÖ½À´Ï´Ù. in_word_set ±¸Á¶¿¡ ¿µÇâÀ» ÁÖ´Â ¿É¼ÇÀº ´ÙÀ½°ú °°½À´Ï´Ù:

¸¸¾à `-t'¿Í `-s'¿É¼ÇÀÌ »ý·«µÈ´Ù¸é, µðÆúÆ® ¾×¼ÇÀº Å°¸¦ Æ÷ÇÔÇÏ´Â char *¸¦ »ý¼ºÇÒÅÙµ¥, ÀÌ Å°´Â ¾î·¹À̸¦ ºÎ¿¬ÇÏ´Â µ¥¿¡ »ç¿ëµÇ´Â ¿©ºÐÀÇ ³Î(null) ½ºÆ®¸µÀ» µ¿¹ÝÇÕ´Ï´Ù. ´Ù¾çÇÑ ÀԷ°ú Ãâ·Â ¿É¼ÇÀ¸·Î ½ÇÇèÇÏ°í, °á°ú·Î ³ª¿À´Â C Äڵ带 ŸÀ̹ÖÇÔ¿¡ ÀÇÇÏ¿©, ´ç½ÅÀº ¼­·Î ´Ù¸¥ Å°¿öµå ¼¼Æ® Ư¼ºµé¿¡ ´ëÇØ °¡Àå ÁÁÀº ¿É¼ÇÀÇ ¼±ÅÃÀ» °áÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.

gperfÀ¯Æ¿¸®Æ¼¿¡ ´ëÇÑ ¿É¼Çµé

gperf¿¡ ´ëÇØ ¸¹Àº ¿É¼ÇµéÀÌ ÀÖ½À´Ï´Ù. ±×°ÍµéÀº ÇÁ·Î±×·¥ÀÌ ½ÇÁ¦ÀûÀÎ ¾îÇø®ÄÉÀ̼ǵ鿡 »ç¿ëµÇ±â ÆíÇØÁöµµ·Ï ¸¸µå´Âµ¥ µ¡ºÙ¿©Áý´Ï´Ù. "¿Â¶óÀÎ" µµ¿ò¸»ÀÌ `-h' ¿É¼ÇÀ» ÅëÇÏ¿© Àб⠰¡´ÉÇÕ´Ï´Ù. ¿©±â¿¡ ¿ÏÀüÇÑ ¿É¼Ç ¸®½ºÆ®°¡ ÀÖ½À´Ï´Ù.

ÀÔ·Â ÆÄÀÏÀÇ Çؼ®¿¡ ¿µÇâÀ» ¹ÌÄ¡´Â ¿É¼Çµé

Ãâ·Â Äڵ带 À§ÇÑ ¾ð¾î¸¦ »ó¼úÇÏ´Â ¿É¼Çµé

Ãâ·Â Äڵ峻ÀÇ ÆÄÀÎ Æ©´× µðÅ×ÀÏ(fine tuning Details)À» À§ÇÑ ¿É¼Ç

gperf¿¡ äÅÃµÈ ¾Ë°í¸®ÁòÀ» ¹Ù²Ù±â À§ÇÑ ¿É¼Çµé

Á¤º¸¸¦ Á¦°øÇÏ´Â Ãâ·Â

gperfÀÇ ¾Ë·ÁÁø ¹®Á¦Á¡°ú ÇÑ°èµé

´ÙÀ½Àº gperf ÇöÀç ¸±¸®½ºÀÇ ¸î°¡Áö Áh°èµéÀÔ´Ï´Ù:

¿©ÀüÈ÷ ³²¾Æ ÀÖ´Â ÇØ¾ß ÇÒ °Íµé

´õ ¼Ó¼ÓµéÀÌ µé¾î³»´Â Á¢±ÙÀ» °¡Áö°í ÇöÀçÀÇ ¿Ïº® Çؽà ÇÔ¼ö ¾Ë°í¸®ÁòÀ» ±³Ã¼ÇÏ´Â "ºñ±³Àû"½¬¿î ¹æ¹ýÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù;¿Ïº® Çؽà ÇÔ¼ö ¸ðµâÀº ´Ù¸¥ ÇÁ·Î±×·¥ ¸ðµâ ¿¡ ´ëÇØ º»ÁúÀûÀ¸·Î µ¶¸³ÀûÀÔ´Ï´Ù. Ãß°¡ÀûÀÎ °¡Ä¡ÀÖ´Â Çâ»óÀÌ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù:

GNUgperfÀÇ ±¸Çö ¼¼ºÎ

gperf ±¸Çö¿¡ »ç¿ëµÇ¾îÁö´Â µ¥ÀÌÅÍ ±¸Á¶¿Í ¾Ë°í¸®ÁòÀÇ °íÂ÷¿øÀÇ ¼³¸íÀ» ÇÏ´Â º¸°í¼­°¡ °ð ³ª¿Ã °ÍÀÔ´Ï´Ù. ÀÌ º¸°í¼­´Â À¯Áöº¸¼ö¿Í °­È­ °üÁ¡À¸·ÎºÎÅͻӸ¸ ¾Æ´Ï¶ó ´Ù¼öÀÇ ´õ Çü¸íÇÏ°í À¯¿ëÇÑ ÇÁ·Î±×·¡¹Ö ±â¹ý, Áï `¹Ýº¹ ¼ö' ºÒ¸®¾Ó ¾î·¹ÀÌ, ´õºí ÇؽÌ, ÆÄÀϷκÎÅÍÀÇ ¸¶À½´ë·ÎÀÇ ±ä ÀÔ·ÂÀ» Àд "¾ÈÀü"ÇÏ°í È¿°úÀûÀÎ ¹æ¹ý, ±×¸®°í ¸®½ºÆ®¾È¿¡¼­ ÃÖ¼Ò ÃÖ´ë ¿ø¼Ò¸¦ µ¿½Ã¿¡ °áÁ¤Çϱâ À§ÇÑ ÃÖÀûÇÏµÈ ¾Ë°í¸®ÁòÀ» º¸¿©Áֱ⠶§¹®¿¡¶óµµ À¯¿ëÇÕ´Ï´Ù.

Âü°í¹®Çå

[1] Chang, C.C.: A Scheme for Constructing Ordered Minimal Perfect Hashing Functions Information Sciences 39(1986), 187-195. [2] Cichelli, Richard J. Author's Response to "On Cichelli's Minimal Perfect Hash Functions Method" Communications of the ACM, 23, 12(December 1980), 729. [3] Cichelli, Richard J. Minimal Perfect Hash Functions Made Simple Communications of the ACM, 23, 1(January 1980), 17-19. [4] Cook, C. R. and Oldehoeft, R.R. A Letter Oriented Minimal Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27.

[5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M. Practical Perfect Hashing Computer Journal, 28, 1(January 1985), 54-58. [6] Jaeschke, G. Reciprocal Hashing: A Method for Generating Minimal Perfect Hashing Functions Communications of the ACM, 24, 12(December 1981), 829-833.

[7] Jaeschke, G. and Osterburg, G. On Cichelli's Minimal Perfect Hash Functions Method Communications of the ACM, 23, 12(December 1980), 728-729.

[8] Sager, Thomas J. A Polynomial Time Generator for Minimal Perfect Hash Functions Communications of the ACM, 28, 5(December 1985), 523-532

[9] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator Second USENIX C++ Conference Proceedings, April 1990.

[10] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions for Reserved Word Lists SIGPLAN Notices, 20, 12(September 1985), 47-53.

[11] Sprugnoli, R. Perfect Hashing Functions: A Single Probe Retrieving Method for Static Sets Communications of the ACM, 20 11(November 1977), 841-850.

[12] Stallman, Richard M. Using and Porting GNU CC Free Software Foundation, 1988.

[13] Stroustrup, Bjarne The C++ Programming Language. Addison-Wesley, 1986.

[14] Tiemann, Michael D. User's Guide to GNU C++ Free Software Foundation, 1989.


This document was generated on 25 June 2001 using texi2html 1.56k.