Commit 5849914b authored by Vladimír Štill's avatar Vladimír Štill
Browse files

lib: Hopefully drop all excess quotes in parser

parent 24edb89c
Pipeline #81099 passed with stage
in 1 minute and 21 seconds
...@@ -289,7 +289,7 @@ class NFABuilder(NFAListener): ...@@ -289,7 +289,7 @@ class NFABuilder(NFAListener):
name += str(value) name += str(value)
i += 1 i += 1
return '"' + name + '"' return name
def exitProduction(self, ctx): def exitProduction(self, ctx):
state = State(self.visitStatename(ctx.statename(0))) state = State(self.visitStatename(ctx.statename(0)))
...@@ -385,8 +385,8 @@ class RegExBuilder(RegExVisitor): ...@@ -385,8 +385,8 @@ class RegExBuilder(RegExVisitor):
name += str(value) name += str(value)
i += 1 i += 1
self.characters.add(Character('"' + name + '"')) self.characters.add(Character(name))
return CharNode(Character('"' + name + '"')) return CharNode(Character(name))
def visitParentheses(self, ctx): def visitParentheses(self, ctx):
return self.visitExpr(ctx.expr()) return self.visitExpr(ctx.expr())
...@@ -460,7 +460,7 @@ class CFGBuilder(CFGListener): ...@@ -460,7 +460,7 @@ class CFGBuilder(CFGListener):
if value is not None: if value is not None:
name += str(value) name += str(value)
j += 1 j += 1
name = '"' + name + '"' name = name
terminal = Terminal(name) terminal = Terminal(name)
self.terminals.add(terminal) self.terminals.add(terminal)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment