[Flex-help] I really thank you for your advice. Arthur Schwarz.
flex is a tool for generating scanners
Brought to you by:
wlestes
From: 최익성 <pn...@na...> - 2015-07-07 14:49:10
|
Dear Arthur Schwarz. I really thank you for your advice and example file. I mean that for input streams "abcdefg", I want both pattern /abcd/ and /bcd/ be active. I know that lex/flex generates a token for input streams. I want multiple tokens be generated simultaneously(concurrently) for input streams. I can know the my problem due to many experts. Thank you very much. -----Original Message----- From: "Arthur Schwarz"<asc...@at...> To: "'최익성'"<pn...@na...>; Cc: Sent: 2015-07-07 (화) 22:55:12 Subject: RE: [Flex-help] Is it possible to search concurrent strings in flex ? -----Original Message----- From: 최익성 [mailto:pn...@na...] Sent: Monday, July 06, 2015 2:05 AM To: fle...@li... Subject: [Flex-help] Is it possible to search concurrent strings in flex ? Dear flex experts. > I have a question about lexical analysis. > > Is it possible to find multiple string "abcd" and "bcd" concurrently in flex ? I don't know what you mean by concurrently. If you mean to have two patterns, one detecting "abcd" and the other "bcd", in the same flex program, the answer is yes: /abcd/ /bcd/ Will work. If the input pattern is "abcd" then /abcd/ will be active and /bcd/ will not. If the input pattern is "bcd? Then /bcd/ will be active and /abcd/ will not. > > Is it possible to find multiple string "abcd" and "cdef" concurrently in flex ? Again, I don't know what 'concurrently' means in this context. But the patterns: /abcd/ /cdef/ Will select the string "abcd" or "cdef" which ever is input. If you mean the ability to select /abcd/ and /cdef/ given "abcdef" then this requires a backup. That is given the input pattern "abcdef" then: /abcd/ will choose the substring "abcd". If on the next Iteration of the flex loop you want to detect "cdef" to simulate receiving "abcdcdef" then you have to return 2 characters to the input stream or you need to start a separate lex loop giving /ef/ as the match patterm > > If flex does not find them, is there any open tool which can find strings concurrently ? Again, there is some question as to what you mean by "concurrently" in this context. I am included a flex 'program' which you can use as you will. I believe that it is complex enough so that all of your questions are covered (however poorly). Good luck art > Thank you very much. ---------------------------------------------------------------------------- -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ -- Flex-help mailing list Fle...@li... https://lists.sourceforge.net/lists/listinfo/flex-help |