summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKian-Meng, Ang <kianmeng@cpan.org>2021-12-25 13:19:12 +0800
committerKian-Meng, Ang <kianmeng@cpan.org>2021-12-25 13:19:12 +0800
commitd5cf3381fc17de0b1b66891e7c925cd9e5470d35 (patch)
tree9614cb6f1bb611405782d45a4259e6a53d56ef28
parent58838fa1b2a9325003e67b54630a64d75c390284 (diff)
downloaderlang-d5cf3381fc17de0b1b66891e7c925cd9e5470d35.tar.gz
Fix typos in lib/parsetools
-rw-r--r--lib/parsetools/doc/src/leex.xml4
-rw-r--r--lib/parsetools/doc/src/notes.xml2
-rw-r--r--lib/parsetools/include/leexinc.hrl2
-rw-r--r--lib/parsetools/src/leex.erl6
-rw-r--r--lib/parsetools/src/yecc.erl10
-rw-r--r--lib/parsetools/test/yecc_SUITE.erl2
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/parsetools/doc/src/leex.xml b/lib/parsetools/doc/src/leex.xml
index 153374e16a..aef1544743 100644
--- a/lib/parsetools/doc/src/leex.xml
+++ b/lib/parsetools/doc/src/leex.xml
@@ -222,13 +222,13 @@ io:request(InFile, {get_until,unicode,Prompt,Module,token,[Line]})
<c>[]</c>.</p>
<p>This functions differs from <c>token</c> in that it will
- continue to scan tokens upto and including an
+ continue to scan tokens up to and including an
<c>{end_token,Token}</c> has been scanned (see next
section). It will then return all the tokens. This is
typically used for scanning grammars like Erlang where there
is an explicit end token, <c>'.'</c>. If no end token is
found then the whole file will be scanned and returned. If
- an error occurs then all tokens upto and including the next
+ an error occurs then all tokens up to and including the next
end token will be skipped.</p>
<p>It is not designed to be called directly by an application
diff --git a/lib/parsetools/doc/src/notes.xml b/lib/parsetools/doc/src/notes.xml
index 32a95f51a8..d90ff5acf2 100644
--- a/lib/parsetools/doc/src/notes.xml
+++ b/lib/parsetools/doc/src/notes.xml
@@ -456,7 +456,7 @@
<section><title>Improvements and New Features</title>
<list>
<item>
- <p> The formating of Yecc's error messages has been
+ <p> The formatting of Yecc's error messages has been
improved. (Thanks to Joe Armstrong.) </p>
<p>
Own Id: OTP-8919</p>
diff --git a/lib/parsetools/include/leexinc.hrl b/lib/parsetools/include/leexinc.hrl
index 2a74c252ff..8dfc42f479 100644
--- a/lib/parsetools/include/leexinc.hrl
+++ b/lib/parsetools/include/leexinc.hrl
@@ -32,7 +32,7 @@ string(Ics0, L0, Tcs, Ts) ->
case yystate(yystate(), Ics0, L0, 0, reject, 0) of
{A,Alen,Ics1,L1} -> % Accepting end state
string_cont(Ics1, L1, yyaction(A, Alen, Tcs, L0), Ts);
- {A,Alen,Ics1,L1,_S1} -> % Accepting transistion state
+ {A,Alen,Ics1,L1,_S1} -> % Accepting transition state
string_cont(Ics1, L1, yyaction(A, Alen, Tcs, L0), Ts);
{reject,_Alen,Tlen,_Ics1,L1,_S1} -> % After a non-accepting state
{error,{L0,?MODULE,{illegal,yypre(Tcs, Tlen+1)}},L1};
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl
index 37f3fb7114..15803b3b82 100644
--- a/lib/parsetools/src/leex.erl
+++ b/lib/parsetools/src/leex.erl
@@ -575,7 +575,7 @@ collect_action(Ifile, Chars, L0, Cont0) ->
%% parse_rule(RegExpString, RegExpLine, ActionTokens, Macros, Counter, State) ->
%% {ok,{RE,Action},ActionData,State}.
-%% Parse one regexp after performing macro substition.
+%% Parse one regexp after performing macro substitution.
parse_rule(S, Line, [{dot,_}], Ms, N, St) ->
case parse_rule_regexp(S, Ms, St) of
@@ -1126,7 +1126,7 @@ comp_crs([], Last) -> [{Last,maxchar}].
%% build_dfa(NFA, NfaFirstState) -> {DFA,DfaFirstState}.
%% Build a DFA from an NFA using "subset construction". The major
%% difference from the book is that we keep the marked and unmarked
-%% DFA states in seperate lists. New DFA states are added to the
+%% DFA states in separate lists. New DFA states are added to the
%% unmarked list and states are marked by moving them to the marked
%% list. We assume that the NFA accepting state numbers are in
%% ascending order for the rules and use ordsets to keep this order.
@@ -1264,7 +1264,7 @@ accept([], _) -> noaccept.
%% minimise_dfa(DFA, DfaFirst) -> {DFA,DfaFirst}.
%% Minimise the DFA by removing equivalent states. We consider a
%% state if both the transitions and the their accept state is the
-%% same. First repeatedly run throught the DFA state list removing
+%% same. First repeatedly run through the DFA state list removing
%% equivalent states and updating remaining transitions with
%% remaining equivalent state numbers. When no more reductions are
%% possible then pack the remaining state numbers to get consecutive
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl
index 00b1a935b9..5b2a9efe4d 100644
--- a/lib/parsetools/src/yecc.erl
+++ b/lib/parsetools/src/yecc.erl
@@ -117,7 +117,7 @@
%% when debugging).
%% Non-terminals are also given integer codes, starting with -1. The
-%% absolut value of the code is used for indexing a tuple of lists of
+%% absolute value of the code is used for indexing a tuple of lists of
%% rules.
-define(SYMBOLS_AS_CODES, true).
@@ -1317,7 +1317,7 @@ compute_state(Seed, Tables) ->
Closure = keysort(1, erase()),
state_items(Closure, [], [], Tables#tabs.rp_rhs).
-%% Collects a uniqe id for the state (all rule pointers).
+%% Collects a unique id for the state (all rule pointers).
state_items([{RP, LA} | L], Is, Id, RpRhs) ->
I = #item{rule_pointer = RP, look_ahead = LA, rhs = element(RP, RpRhs)},
state_items(L, [I | Is], [RP | Id], RpRhs);
@@ -1911,13 +1911,13 @@ report_conflict(Conflict, St, ActionName, How) ->
if
St#yecc.verbose ->
io:fwrite(<<"~s\n">>, [format_conflict(Conflict)]),
- Formated = format_symbol(ActionName),
+ Formatted = format_symbol(ActionName),
case How of
prec ->
- io:fwrite(<<"Resolved in favor of ~ts.\n\n">>, [Formated]);
+ io:fwrite(<<"Resolved in favor of ~ts.\n\n">>, [Formatted]);
default ->
io:fwrite(<<"Conflict resolved in favor of ~ts.\n\n">>,
- [Formated])
+ [Formatted])
end;
true ->
ok
diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl
index e61423d064..b594d231ca 100644
--- a/lib/parsetools/test/yecc_SUITE.erl
+++ b/lib/parsetools/test/yecc_SUITE.erl
@@ -1851,7 +1851,7 @@ otp_7969(Config) when is_list(Config) ->
ok.
otp_8919(doc) ->
- "OTP-8919. Improve formating of Yecc error messages.";
+ "OTP-8919. Improve formatting of Yecc error messages.";
otp_8919(suite) -> [];
otp_8919(Config) when is_list(Config) ->
A1 = erl_anno:new(1),