mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Added Example Rascal files
This commit is contained in:
10
samples/Rascal/Analyze.rsc
Normal file
10
samples/Rascal/Analyze.rsc
Normal file
@@ -0,0 +1,10 @@
|
||||
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]] };
|
||||
}
|
||||
Reference in New Issue
Block a user