File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -103,17 +103,19 @@ private void bPGG_Click(object sender, EventArgs e)
103103 var non_terminals = new Dictionary < string , ParserProduction > ( ) ;
104104 var terminals = new Dictionary < string , ParserProduction > ( ) ;
105105
106+ terminals . Add ( "''" , ParserGenerator . ParserGenerator . EmptyString ) ;
107+
106108 foreach ( var nt in rtbPGNT . Text . Split ( ',' ) )
107109 non_terminals . Add ( nt . Trim ( ) , gen . CreateNewProduction ( nt . Trim ( ) , false ) ) ;
108110
109111 foreach ( var t in rtbPGT . Lines )
110112 {
111113 if ( t . Trim ( ) == "" ) continue ;
112114
113- var name = t . Split ( ',' ) [ 0 ] . Trim ( ) ;
114- var pp = t . Split ( ',' ) [ 1 ] . Trim ( ) ;
115+ var name = t . Split ( ',' ) [ 0 ] ;
116+ var pp = t . Substring ( name . Length + 1 ) . Trim ( ) ;
115117
116- terminals . Add ( pp , gen . CreateNewProduction ( name ) ) ;
118+ terminals . Add ( pp , gen . CreateNewProduction ( name . Trim ( ) ) ) ;
117119 }
118120
119121 var prec = new Dictionary < string , List < Tuple < ParserProduction , int > > > ( ) ;
You can’t perform that action at this time.
0 commit comments