Results 1 to 2 of 2

Thread: โปรแกรม LEX หรือ FLEX

  1. #1


    พอดีผมเรียนวิชา programming language principle ได้โพรเจกมาทำเรื่องนึง คืออาจานบอกว่าต้องใช้ LEX หรือ FLEX เพื่อเขียีนโปรแกรม postfix คำนวณ ซึ่งความรู้เรื่องนี้ไม่มีความีรู้เลยก็ว่าได้ เลยอยากจะขอคำแนะนำว่ามันคืออะไรแล้วใช้ภาษาอะไรเขียีนครับ

  2. #2
    Junior Member
    Join Date
    Aug 2007
    Posts
    10


    Cool

    Flex เป็นเครื่องมือที่ใช้ในการ generate scanner ครับ มีไว้สำหรับการอ่านคำ
    โดยจะอ่านทีละตัวอักษรว่าตรงกับ regular expression ที่เรากำหนดหรือไม่
    เราสามารถเขียนโปรแกรมกำหนดได้ว่า เมื่ออ่านเจอคำๆนั้นแล้วจะให้ทำอย่างไรต่อไป
    จะ generate เป็นภาษา C หรือ C++ นะครับ

    option ต่างๆก็มีมากมายนะครับ ผมก็ยังไม่คล่องเท่าไร ลองอ่านข้อมูลในเวบนี้จะดีกว่านะครับ
    Flex: The Fast Lexical Analyzer

    และถ้าหากเป็นการทำงานเกี่ยวกับ compiler ก็จะมีการใช้ Yacc หรือ Bison มาช่วยด้วยนะครับ
    โดย Flex จะอ่านคำ แล้วส่งคำนั้นๆไปให้ Bison ตรวจสอบ syntax ต่อไป
    Bison - GNU parser generator
    b = bit
    B = byte
    m = Milli
    K = Kilo
    M = Mega

    Mb = Mega Bit(s)
    MB = Mega Byte(s)

    8 bits = 1 Byte
    1024 Bytes = 1 KB
    1024 KB = 1 MB
    1024 MB = 1 GB
    1024 GB = 1 TB

Similar Threads

  1. ระวัง โปรแกรม CPE 17 Anti Autorun Killer สำหรับ mitnet หรือ Easy acc บน XP
    By afroman in forum ทิปหรือเคล็ดลับการคอมพิวเตอร์ต่างๆ
    Replies: 0
    Last Post: 29-08-2009, 11:33 AM
  2. Replies: 0
    Last Post: 30-04-2009, 10:16 PM
  3. Flex 3 in Action
    By SheLLniX in forum E-Book, Video หรือบทความทั่วไปด้าน Computer
    Replies: 0
    Last Post: 18-02-2009, 04:05 PM
  4. ~ Flex for Developers ~
    By hooligan in forum E-Book, Video หรือบทความทั่วไปด้าน Computer
    Replies: 0
    Last Post: 17-04-2008, 11:55 AM
  5. Replies: 0
    Last Post: 21-03-2008, 11:33 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •