[spirit] Symbols parser with overlapping symbols
 
            
            
            
            
                30 Sep
                
                    2012
                
            
            
                30 Sep
                
                '12
                
            
            
            
        
    
                6:17 p.m.
            
        Hi, I wonder how qi::symbols parser behaves when it contains partially overlapping symbols. For example: qi::symbols< char, int > syms; syms.add("a", 1); syms.add("aaa", 2); What will this parser return when "aaa" is passed as input? I couldn't find it in the docs.
 
            
            
            
            
                1 Oct
                
            
            
                1 Oct
                
            
            
            
        
    
                2:44 a.m.
            
        On 10/1/2012 12:17 AM, Andrey Semashev wrote:
Hi,
I wonder how qi::symbols parser behaves when it contains partially overlapping symbols. For example:
qi::symbols< char, int > syms; syms.add("a", 1); syms.add("aaa", 2);
What will this parser return when "aaa" is passed as input? I couldn't find it in the docs.
"aaa" will return 2 while "a" will return 1. I'll make it clear in the docs. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
        4778
        
      
          Age (days ago)
        
      
        4779
        
    
          Last active (days ago)
        
        
        
        1 comments
    
    
        
        2 participants
    
    
    
    
    
    
    
    
    participants (2)
- 
                 Andrey Semashev Andrey Semashev
- 
                 Joel de Guzman Joel de Guzman