Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
d45c02db
Commit
d45c02db
authored
Mar 22, 2017
by
POTTIER Francois
Browse files
Remove a couple TEMPORARYs.
parent
f5c64bea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/partialGrammar.ml
View file @
d45c02db
...
...
@@ -267,14 +267,6 @@ let rename nonterminal filename =
else
(
use_name
name
;
name
)
(* ------------------------------------------------------------------------- *)
(* A nonterminal is considered public if it is declared using %public
or %start. *)
(* TEMPORARY why unused?
let is_public grammar prule =
prule.pr_public_flag || StringMap.mem prule.pr_nt grammar.p_start_symbols
*)
(* ------------------------------------------------------------------------- *)
type
symbol_kind
=
...
...
@@ -412,19 +404,6 @@ let is_private_symbol t x =
with
Not_found
->
false
(* TEMPORARY why unused?
let is_public_symbol t x =
try
match Hashtbl.find t x with
| PublicNonTerminal _ ->
true
| _ ->
false
with Not_found ->
false
*)
let
fold_on_private_symbols
f
init
t
=
Hashtbl
.
fold
(
fun
k
->
function
PrivateNonTerminal
_
->
(
fun
acu
->
f
acu
k
)
...
...
@@ -468,6 +447,8 @@ let symbols_of grammar (pgrammar : Syntax.partial_grammar) =
)
symbols
prule
.
pr_branches
in
(* Store the symbol declaration. *)
(* A nonterminal symbol is considered public if it is declared using
%public or %start. *)
if
prule
.
pr_public_flag
||
StringMap
.
mem
prule
.
pr_nt
grammar
.
p_start_symbols
then
store_public_nonterminal
tokens
symbols
prule
.
pr_nt
prule
.
pr_positions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment