File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ type Symbols = Symbol list
3838//---------------------------------------------------------------------
3939// Output Raw Parser Spec AST
4040
41- let StringOfSym sym = match sym with Terminal s -> " '" ^ s ^ " '" | NonTerminal s -> s
41+ let StringOfSym sym = match sym with Terminal s -> String.Concat ( " '" , s , " '" ) | NonTerminal s -> s
4242
4343let OutputSym os sym = fprintf os " %s " ( StringOfSym sym)
4444
@@ -367,7 +367,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec): CompiledSpec =
367367 stopWatch.Start()
368368
369369 // Augment the grammar
370- let fakeStartNonTerminals = spec.StartSymbols |> List.map( fun nt -> " _start" ^nt )
370+ let fakeStartNonTerminals = spec.StartSymbols |> List.map( fun nt -> String.Concat ( " _start" , nt ) )
371371 let nonTerminals = fakeStartNonTerminals@ spec.NonTerminals
372372 let endOfInputTerminal = " $$"
373373 let dummyLookahead = " #"
@@ -480,7 +480,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec): CompiledSpec =
480480 let IsStartItem item0 = fakeStartNonTerminalsSet.Contains( ntIdx_ of_ item0 item0)
481481 let IsKernelItem item0 = ( IsStartItem item0 || dotIdx_ of_ item0 item0 <> 0 )
482482
483- let StringOfSym sym = match sym with PTerminal s -> " '" ^ termTab.OfIndex s ^ " '" | PNonTerminal s -> ntTab.OfIndex s
483+ let StringOfSym sym = match sym with PTerminal s -> String.Concat ( " '" , termTab.OfIndex s, " '" ) | PNonTerminal s -> ntTab.OfIndex s
484484
485485 let OutputSym os sym = fprintf os " %s " ( StringOfSym sym)
486486
You can’t perform that action at this time.
0 commit comments