Skip to content

Commit

Permalink
Adjust path
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jan 16, 2024
1 parent 655e0a6 commit 20aa05d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/lrama/command.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Lrama
class Command
STDLILB_FILE_PATH = "lib/lrama/grammar/stdlib.y"
LRAMA_LIB = File.realpath(File.join(File.dirname(__FILE__)))
STDLIB_FILE_PATH = File.join(LRAMA_LIB, 'grammar', 'stdlib.y')

def run(argv)
begin
Expand All @@ -19,7 +20,7 @@ def run(argv)
begin
grammar = Lrama::Parser.new(text, options.grammar_file, options.debug).parse
unless options.no_stdlib
stdlib_grammar = Lrama::Parser.new(File.read(STDLILB_FILE_PATH), STDLILB_FILE_PATH, options.debug).parse
stdlib_grammar = Lrama::Parser.new(File.read(STDLIB_FILE_PATH), STDLIB_FILE_PATH, options.debug).parse
grammar.insert_before_parameterizing_rules(stdlib_grammar.parameterizing_rules)
end
grammar.prepare
Expand Down

0 comments on commit 20aa05d

Please sign in to comment.