Module: LD::Patch::Terminals
- Included in:
- Parser
- Defined in:
- lib/ld/patch/terminals.rb
Constant Summary collapse
- U_CHARS1 =
Unicode regular expressions for Ruby 1.9+ with the Oniguruma engine.
Regexp.compile(<<-EOS.gsub(/\s+/, '')) [\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]| [\\u0370-\\u037D]|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]| [\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]| [\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]|[\\u{10000}-\\u{EFFFF}] EOS
- U_CHARS2 =
Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]").freeze
- IRI_RANGE =
Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]").freeze
- UCHAR =
26
EBNF::LL1::Lexer::UCHAR
- ECHAR =
159s
/\\[tbnrf\\"']/.freeze
- IRIREF =
18
/<(?:#{IRI_RANGE}|#{UCHAR})*>/.freeze
- LANGTAG =
144s
/@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/.freeze
- EXPONENT =
154s
/[eE][+-]?[0-9]+/
- INTEGER =
19
/[+-]?[0-9]+/.freeze
- DECIMAL =
20
/[+-]?(?:[0-9]*\.[0-9]+)/.freeze
- DOUBLE =
21
/[+-]?(?:[0-9]+\.[0-9]*#{EXPONENT}|\.?[0-9]+#{EXPONENT})/.freeze
- STRING_LITERAL_QUOTE =
22
/"([^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/.freeze
- STRING_LITERAL_SINGLE_QUOTE =
23
/'([^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/.freeze
- STRING_LITERAL_LONG_SINGLE_QUOTE =
24
/'''((?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/m.freeze
- STRING_LITERAL_LONG_QUOTE =
25
/"""((?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/m.freeze
- WS =
161s
/(?:\s|(?:#[^\n\r]*))+/m.freeze
- ANON =
162s
/\[#{WS}*\]/m.freeze
- PERCENT =
170s
/%[0-9A-Fa-f]{2}/.freeze
- PN_LOCAL_ESC =
172s
/\\[_~\.\-\!$\&'\(\)\*\+,;=:\/\?\#@%]/.freeze
- PN_CHARS_BASE =
163s
/[A-Z]|[a-z]|#{U_CHARS1}/.freeze
- PN_CHARS_U =
164s
/_|#{PN_CHARS_BASE}/.freeze
- PN_CHARS =
166s
/-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}/.freeze
- PLX =
169s
/#{PERCENT}|#{PN_LOCAL_ESC}/.freeze
- BLANK_NODE_LABEL =
141s
/_:(?:[0-9]|#{PN_CHARS_U})((#{PN_CHARS}|\.)*#{PN_CHARS})?/.freeze
- VARNAME =
166s
/(?:[0-9]|#{PN_CHARS_U}) (?:[0-9]|#{PN_CHARS_U}|#{U_CHARS2})*/x.freeze
- VAR1 =
143s
/\?#{VARNAME}/.freeze
- PN_CHARS_BODY =
167s
/(?:(?:\.|#{PN_CHARS})*#{PN_CHARS})?/.freeze
- PN_PREFIX =
/#{PN_CHARS_BASE}#{PN_CHARS_BODY}/.freeze
- PN_LOCAL_BODY =
168s
/(?:(?:\.|:|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|:|#{PLX}))?/.freeze
- PN_LOCAL =
/(?:[0-9]|:|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}/.freeze
- PNAME_NS =
139s
/#{PN_PREFIX}?:/.freeze
- PNAME_LN =
1402
/(?:#{PNAME_NS})(?:#{PN_LOCAL})/.freeze
- STR_EXPR =
String terminals, case sensitive
%r(AddNew|AN|Add |Bind |Cut |DeleteExisting|Delete|DE |UpdateList|UL |@prefix |true|false |\^\^|\.\. |[\(\),.;\[\]\{\}\=!^\/aABCD] )x.freeze