Top Description Fields Constructors Methods
org.antlr.analysis

public Class NFA

extends Object
Class Inheritance
Imports
org.antlr.tool.Grammar, .NFAFactory

An NFA (collection of NFAStates) constructed from a grammar. This NFA is one big machine for entire grammar. Decision points are recorded by the Grammar object so we can, for example, convert to DFA or simulate the NFA (interpret a decision).

Field Summary

Modifier and TypeField and Description
public boolean
protected NFAFactory
factory

Which factory created this NFA?

public Grammar
grammar

This NFA represents which grammar?

public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public NFAFactory
public int
public NFAState
getState(int s)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

completeback to summary
public boolean complete
factoryback to summary
protected NFAFactory factory

Which factory created this NFA?

grammarback to summary
public Grammar grammar

This NFA represents which grammar?

INVALID_ALT_NUMBERback to summary
public static final int INVALID_ALT_NUMBER

Constructor Detail

NFAback to summary
public NFA(Grammar g)

Method Detail

addStateback to summary
public void addState(NFAState state)
getFactoryback to summary
public NFAFactory getFactory()
getNewNFAStateNumberback to summary
public int getNewNFAStateNumber()
getStateback to summary
public NFAState getState(int s)
setFactoryback to summary
public void setFactory(NFAFactory factory)