Added SLR(1) support in inputparser
This commit is contained in:
		
							parent
							
								
									f1d9d5b7b3
								
							
						
					
					
						commit
						7f276d7375
					
				| 
						 | 
					@ -34,6 +34,8 @@ namespace pds {
 | 
				
			||||||
                        if(token.type == ParsodusLexer::PARSERTYPE) {
 | 
					                        if(token.type == ParsodusLexer::PARSERTYPE) {
 | 
				
			||||||
                            if(token.content == "lalr(1)") {
 | 
					                            if(token.content == "lalr(1)") {
 | 
				
			||||||
                                config.parserType = util::ParserType::LALR_1;
 | 
					                                config.parserType = util::ParserType::LALR_1;
 | 
				
			||||||
 | 
					                            } else if(token.content == "SLR(1)") {
 | 
				
			||||||
 | 
					                                config.parserType = util::ParserType::SLR_1;
 | 
				
			||||||
                            } else
 | 
					                            } else
 | 
				
			||||||
                                throw InputParserException("Unkown parser type");
 | 
					                                throw InputParserException("Unkown parser type");
 | 
				
			||||||
                        } else {
 | 
					                        } else {
 | 
				
			||||||
| 
						 | 
					@ -108,9 +110,7 @@ namespace pds {
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } catch(ParsodusLexer::NoMoreTokens& err) {
 | 
					        } catch(ParsodusLexer::NoMoreTokens& err) {}
 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return config;
 | 
					        return config;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    void InputParser::lexColon(ParsodusLexer& lex, ParsodusLexer::Token &token, bool nextoken) {
 | 
					    void InputParser::lexColon(ParsodusLexer& lex, ParsodusLexer::Token &token, bool nextoken) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue