Skip to content

Commit

Permalink
Merge pull request #70 from walter-weinmann/wwe
Browse files Browse the repository at this point in the history
Removing unit-productions.
  • Loading branch information
walter-weinmann authored Apr 20, 2017
2 parents b1bb539 + bc7adab commit 65cf94c
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 416 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ code_templates
erl_crash.dump
rebar.lock
rebar3.crashdump
src/oclexer.dot
src/oclexer.erl
src/ocparse.erl
test/*.beam
test/reliability_*.tst
test/reliability_*_SUITE.erl
test/wwe.*
7 changes: 3 additions & 4 deletions src/oclexer.xrl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Rules.
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% symbolic names
(`([^`]*)*`) : {token, {'ESCAPED_SYMBOLIC_NAME', TokenLine, TokenChars}}.
([A-Za-z_@#][A-Za-z0-9_@#]*) : match_any(TokenChars, TokenLen, TokenLine, ?TokenPatterns).
([A-Za-z_@#][A-Za-z0-9_@#]*) : match_any(TokenChars, TokenLen, TokenLine, ?TOKEN_PATTERNS).

%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% string literals
Expand Down Expand Up @@ -90,8 +90,7 @@ Erlang code.
-export([reserved_keywords/0]).
-define(TokenPatterns, [
-define(TOKEN_PATTERNS, [
{"^(?i)(ALL)$", 'ALL'},
{"^(?i)(ALLSHORTESTPATHS)$", 'ALLSHORTESTPATHS'},
{"^(?i)(AND)$", 'AND'},
Expand Down Expand Up @@ -176,7 +175,7 @@ Erlang code.
-define(Dbg(F,A), ok).
-endif.
reserved_keywords() -> [T || {_, T} <- ?TokenPatterns].
reserved_keywords() -> [T || {_, T} <- ?TOKEN_PATTERNS].
match_any(TokenChars, TokenLen, _TokenLine, []) ->
{token, {'UNESCAPED_SYMBOLIC_NAME', TokenLen, TokenChars}};
Expand Down
Loading

0 comments on commit 65cf94c

Please sign in to comment.