# Generated from oedipus_lex-2.6.2.gem by gem2rpm -*- rpm-spec -*- %global gem_name oedipus_lex Name: rubygem-%{gem_name} Version: 2.6.2 Release: 1%{?dist} Summary: Oedipus Lex is a lexer generator in the same family as Rexical and Rex License: MIT URL: http://github.com/seattlerb/oedipus_lex Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.7 BuildRequires: ruby < 4.0 # BuildRequires: rubygem(hoe) >= 4.0 # BuildRequires: rubygem(hoe) < 5 BuildArch: noarch %description Oedipus Lex is a lexer generator in the same family as Rexical and Rex. Oedipus Lex is my independent lexer fork of Rexical. Rexical was in turn a fork of Rex. We've been unable to contact the author of rex in order to take it over, fix it up, extend it, and relicense it to MIT. So, Oedipus was written clean-room in order to bypass licensing constraints (and because bootstrapping is fun). Oedipus brings a lot of extras to the table and at this point is only historically related to rexical. The syntax has changed enough that any rexical lexer will have to be tweaked to work inside of oedipus. At the very least, you need to add slashes to all your regexps. Oedipus, like rexical, is based primarily on generating code much like you would a hand-written lexer. It is _not_ a table or hash driven lexer. It uses StrScanner within a multi-level case statement. As such, Oedipus matches on the _first_ match, not the longest (like lex and its ilk). This documentation is not meant to bypass any prerequisite knowledge on lexing or parsing. If you'd like to study the subject in further detail, please try [TIN321] or the [LLVM Tutorial] or some other good resource for CS learning. Books... books are good. I like books. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} # Run the test suite. popd %files %dir %{gem_instdir} %{gem_instdir}/.autotest %{gem_instdir}/Manifest.txt %{gem_libdir} %{gem_instdir}/rex-mode.el %{gem_instdir}/sample %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/History.rdoc %doc %{gem_instdir}/README.rdoc %{gem_instdir}/Rakefile %{gem_instdir}/test %changelog * Thu Aug 03 2023 mockbuilder - 2.6.2-1 - Initial package