public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/11617] New: Gluing string literals doesn't work with token substitution
@ 2010-05-21 19:43 jistone at redhat dot com
  2010-05-24 15:56 ` [Bug translator/11617] " jistone at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: jistone at redhat dot com @ 2010-05-21 19:43 UTC (permalink / raw)
  To: systemtap

For the string-gluing feature of bug #11208, the lexer peeks ahead after seeing
a string in case there are other strings to merge in.  This fails when it
encounters something that would end up a string through token substitution (as
noticed in bug #10025 comment #11).  Examples that ought to work:

  stap -l 'kernel.function("do_" @1 "_open")' filp
  stap -l 'kernel.function("do_" %( 1==1 %? "filp" %) "_open")'
  stap -l 'kernel.function("do_" %( 1==1 %? @1 %) "_open")' filp

I think it would be easier to achieve this by moving the glue out of the lexer
and into parse_literal, roughly: "while(peek()->type == tok_string)
append(...)".  We would lose the effect that comments force separation, but we
could also add a just-ate-comment flag somewhere similar to the
just-ate-whitespace flag suggested in bug #10025.

-- 
           Summary: Gluing string literals doesn't work with token
                    substitution
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11617

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug translator/11617] Gluing string literals doesn't work with token substitution
  2010-05-21 19:43 [Bug translator/11617] New: Gluing string literals doesn't work with token substitution jistone at redhat dot com
@ 2010-05-24 15:56 ` jistone at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jistone at redhat dot com @ 2010-05-24 15:56 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2010-05-22 01:49 -------
c5be751  Move string literal gluing from lexer to parser

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11617

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-22  1:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-21 19:43 [Bug translator/11617] New: Gluing string literals doesn't work with token substitution jistone at redhat dot com
2010-05-24 15:56 ` [Bug translator/11617] " jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).