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
Alexandru Dura
SPPF Earley Parser
Commits
dfa18a96
Commit
dfa18a96
authored
Jan 30, 2020
by
Alexandru Dura
Browse files
Add acessors for a node's start and end positons
parent
64498cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/se/lth/sep/NodeLabel.java
View file @
dfa18a96
package
se.lth.sep
;
public
abstract
class
NodeLabel
{
int
start
,
end
;
// this node covers the symbols [start, end) in the token array, where
// the array is indexed from 0.
final
int
start
,
end
;
protected
NodeLabel
(
int
start
,
int
end
)
{
this
.
start
=
start
;
this
.
end
=
end
;
...
...
@@ -19,4 +21,12 @@ public abstract class NodeLabel {
}
public
abstract
String
prettyPrint
(
Grammar
info
);
public
int
getStart
()
{
return
start
;
}
public
int
getEnd
()
{
return
end
;
}
}
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