org.eclipse.emf.importer.rose.parser
Class RoseParser
java.lang.Object
org.eclipse.emf.importer.rose.parser.RoseParser
public class RoseParser
- extends java.lang.Object
A parser for Rose files.
This parser uses the following contex-free grammar:
E -> ( O ) | ( L ) | ( V ) | S' ;expression
S' -> S | "|" S' ;sequence of strings
S" -> EPS | S' S" ;sequence of strings inside list
O -> object S P' ;object
V -> value S S' ;value
P' -> EPS | P P' ;sequence of pairs
P -> K E ;pair
L -> list S O' | list S S" ;list
O' -> EPS | ( O ) O' ;sequence of objects
Here are the terminals:
K is a key token (always one word)
S is a string token (can have multiple words)
object is an object token
list is a list token
"|" is a vertical bar token
EPS is an empty string token
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lexer
protected RoseLexer lexer
versionTree
protected RoseNode versionTree
modelTree
protected RoseNode modelTree
baseId
protected java.lang.String baseId
idStack
protected java.util.Stack<java.lang.Integer> idStack
isTreeOnly
protected boolean isTreeOnly
isAllowed
protected boolean isAllowed
isRoot
protected boolean isRoot
isListMapping
protected boolean isListMapping
noLogicalPresentation
protected boolean noLogicalPresentation
mapProperties
protected boolean mapProperties
RoseParser
public RoseParser(RoseLexer lexer)
RoseParser
public RoseParser(RoseLexer lexer,
boolean isTreeOnly)
RoseParser
public RoseParser(RoseLexer lexer,
boolean isTreeOnly,
boolean noPresentation)
getVersionTree
public RoseNode getVersionTree()
getModelTree
public RoseNode getModelTree()
parse
public void parse()
traverseTree
public void traverseTree(java.util.List<java.lang.Integer> path)