Class: ABNF::Compiler::Grammar::Rulename

Inherits:
Object
  • Object
show all
Includes:
Compiler
Defined in:
lib/abnf/compiler/grammar/rulename.rb

Constant Summary collapse

PATTERN =
%r{\A(?<string>[[:alpha:]][-[:alpha:][:digit:]]*)}n

Instance Attribute Summary

Attributes included from Compiler

#match_data, #stream

Instance Method Summary collapse

Methods included from Compiler

included, #initialize

Instance Method Details

#callObject



9
10
11
# File 'lib/abnf/compiler/grammar/rulename.rb', line 9

def call
  ABNF::Compiler::Rule::Reference.new match_data['string']
end