lib/antelope/grammar/token/epsilon.rb in antelope-0.3.2 vs lib/antelope/grammar/token/epsilon.rb in antelope-0.4.0

- old
+ new

@@ -1,23 +1,23 @@ -# encoding: utf-8 - -module Antelope - class Grammar - class Token - # Defines an epsilon token. An epsilon token represents - # nothing. This is used to say that a nonterminal can - # reduce to nothing. - class Epsilon < Token - # Initialize. Technically takes no arguments. Sets - # the name of the token to be `:$empty`. - def initialize(*) - super :"$empty" - end - - # (see Token#epsilon?) - def epsilon? - true - end - end - end - end -end +# encoding: utf-8 + +module Antelope + class Grammar + class Token + # Defines an epsilon token. An epsilon token represents + # nothing. This is used to say that a nonterminal can + # reduce to nothing. + class Epsilon < Token + # Initialize. Technically takes no arguments. Sets + # the name of the token to be `:$empty`. + def initialize(*) + super :"$empty" + end + + # (see Token#epsilon?) + def epsilon? + true + end + end + end + end +end