mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			254 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			254 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
module Analyze
 | 
						|
 | 
						|
import Syntax;
 | 
						|
 | 
						|
set[Id] unreachable(Machine m) {
 | 
						|
  r = { <q1,q2> | (State)`state <Id q1> <Trans* ts>` <- m.states, 
 | 
						|
				  (Trans)`<Id _>: <Id q2>` <- ts }+;
 | 
						|
  qs = [ q.name | /State q := m ];
 | 
						|
  return { q | q <- qs, q notin r[qs[0]] };
 | 
						|
}
 |