lib/hilbert/lexer/main_lexer.rb in hilbert-0.0.2700100 vs lib/hilbert/lexer/main_lexer.rb in hilbert-0.0.2700110

- old
+ new

@@ -1,23 +1,25 @@ module Hilbert module Lexer class MainLexer < Base # TODO: So far so good, but... rule(/postulate zfc_analysis/) { :POST_ZFC } - rule(/#{EVALOGIC}/) { :EVALOGIC } - rule(/#{DEFLOGIC}/) { :DEFLOGIC } + rule(/paradox\?/) { :P_PARAD } + rule(/\A.*[A-RT-Z].*\?.*\z/m) { :EVALOGIC } + rule(/\A.*[A-RT-Z].*\z/m) { :DEFLOGIC } rule(/[ \t\f]/) rule(/(\r|\n)+/) { :NULL } rule(/[^\(\)\{\}(\n\n)]+/) { :CONT } class << self include Tokens def zfc_analysis! clear! rule(/postulate zfc_analysis/) { :POST_ZFC } - rule(/#{EVALOGIC}/) { :EVALOGIC } - rule(/#{DEFLOGIC}/) { :DEFLOGIC } + rule(/paradox\?/) { :P_PARAD } + rule(/\A.*[A-RT-Z].*\?.*\z/m) { :EVALOGIC } + rule(/\A.*[A-RT-Z].*\z/m) { :DEFLOGIC } rule(/(#{FUNCCV})#{ANYSP}#{EQL}#{ANYSP}(#{FORMULA})/) { :DEF_FUNC } rule(/#{INTE_SYM}#{ANYSP}#{LPRN}(#{ANYSTR})#{RPRN}#{LBRCT}(#{ANYSTR})#{RBRCT}/) { :INTEGRAL } rule(/#{DIFF_SYM}(#{VAR}) (#{FORMULA})/) { :DIFFERENTIAL } rule(/#{LIM_SYM}#{LBRCT}(#{VAR})#{RSARW}(#{VARNUM})#{RBRCT} (#{FORMULA})/) { :LIMIT } rule(/#{SGM_SYM}#{LBRCT}(#{VAR})#{EQL}(#{INT})#{CMA}#{ANYSP}(#{INT})#{RBRCT} (#{FORMULA})/) { :SIGMA }