Beispiel #1
0
ParserBase::ParserBase(Scanner &scanner, const char *fileName)
    : m_scanner(scanner), m_fileName(fileName) {
  if (m_fileName == nullptr) m_fileName = "";

  // global scope
  m_labelInfos.reserve(3);
  m_labelInfos.resize(1);
  pushLabelScope();
}
Beispiel #2
0
ParserBase::ParserBase(Scanner &scanner, const char *fileName)
    : m_scanner(scanner), m_fileName(fileName), m_nsState(SeenNothing) {
    if (m_fileName == NULL) m_fileName = "";

    // global scope
    m_labelInfos.reserve(3);
    m_labelInfos.resize(1);
    pushLabelScope();
}
Beispiel #3
0
void ParserBase::pushLabelInfo() {
  m_labelInfos.resize(m_labelInfos.size() + 1);
  pushLabelScope();
}