OK, I'm trying to find a regular expression in Lex that identifies the string as a string in an input string Will take like. In Simple, try: While compiling and running, a quick test shows that Cheers, Chris < / P> printf ("stackoverflow"), "stackoverflow" should be recognized as a string, verbatim I am trying the following:
"[.] + "["] [.] + ["] \" [.] + \ "[\"] [.] + [\ "]" "" [.] + "" "" < P> None of these is working. Each time the name "alone" is recognized, what should I do? Thanks in advance ...
\ ". * \" Printf ("STRING [% s]", yytext); \ '. * \ 'Printf ("STRING [% s]", yytext);
"Hello world!" STRING ["Hello world!"] 'Hello world!' '[Hello world!'] 'John's cat' STRING ['John' cat ']' Mary said, 'hello!' 'STRING' said Mary, "Hello!" '' Bye! '' Frank said, "these words are" in which "there is a string that these words are in STRING [" in which "] a string
Comments
Post a Comment