Exemplo n.º 1
0
 public Transition OnSpaceChar(bool returnCharAfterTransition = false)
 {
     var t = new Transition(m_source, m_target, ch => ch == ' ' || ch == '\t', returnCharAfterTransition);
     m_source.Transitions.Add(t);
     return t;
 }
Exemplo n.º 2
0
 public Transition OnFNSSChar(char c, bool returnCharAfterTransition = false)
 {
     var t = new Transition(m_source, m_target, ch => ch == c && m_context.IsFNSSChar, returnCharAfterTransition);
     m_source.Transitions.Add(t);
     return t;
 }
Exemplo n.º 3
0
 public Transition OnEOL()
 {
     var t = new Transition(m_source, m_target, ch => ch == '\n' && m_context.IsEOL);
     m_source.Transitions.Add(t);
     return t;
 }
Exemplo n.º 4
0
 public Transition OnChars(params char[] chs)
 {
     var t = new Transition(m_source, m_target, ch =>
     {
         foreach (var c in chs) { if (ch == c) return true; }
         return false;
     });
     m_source.Transitions.Add(t);
     return t;
 }
Exemplo n.º 5
0
 public Transition OnAnyFNSSChar(bool returnCharAfterTransition = false)
 {
     var t = new Transition(m_source, m_target, ch => m_context.IsFNSSChar && !m_context.IsEOL, returnCharAfterTransition);
     m_source.Transitions.Add(t);
     return t;
 }
Exemplo n.º 6
0
 public Transition On(Transition.Condition condition, bool returnCharAfterTransition = false)
 {
     var t = new Transition(m_source, m_target, condition, returnCharAfterTransition);
     m_source.Transitions.Add(t);
     return t;
 }