class DelegatedLexer extends Lexer
{
	//
	// Lexer
	//

	@Override
	public Iterable<Token> getTokensUnprocessed( String text )
	{<FILL_FUNCTION_BODY>}

	// //////////////////////////////////////////////////////////////////////////
	// Protected

	@Override
	protected void addJson( Map<String, Object> json ) throws ResolutionException
	{
		super.addJson( json );
		rootLexer = Lexer.getByName( (String) json.get( "root_lexer" ) );
		languageLexer = Lexer.getByName( (String) json.get( "language_lexer" ) );
	}

	// //////////////////////////////////////////////////////////////////////////
	// Private

	private Lexer rootLexer;

	private Lexer languageLexer;

	private static class Insertion
	{
		public int index;

		public List<Token> lngBuffer;

		public Insertion( int index, List<Token> lngBuffer )
		{
			super();
			this.index = index;
			this.lngBuffer = lngBuffer;
		}
	}

	private Iterable<Token> doInsertions( List<Insertion> insertions, Iterable<Token> tokens )
	{
		ListIterator<Insertion> li = insertions.listIterator();
		Insertion next_ins = li.hasNext() ? (Insertion) li.next() : null;
		int len = 0;
		LinkedList<Token> rc = new LinkedList<Token>();

		for( Token t : tokens )
		{
			len += t.getValue().length();
			String s = t.getValue();
			int pos = 0;
			while( next_ins != null && next_ins.index <= len )
			{
				rc.add( new Token( t.getPos(), t.getType(), s.substring( pos, s.length() + ( next_ins.index - len ) ) ) );
				pos = s.length() + ( next_ins.index - len );
				for( Token tt : next_ins.lngBuffer )
					rc.add( tt );
				next_ins = li.hasNext() ? li.next() : null;
			}
			if( pos < s.length() )
				rc.add( new Token( t.getPos(), t.getType(), s.substring( pos ) ) );
		}

		// Do remaining tokens
		while( li.hasNext() )
			for( Token tt : ( (Insertion) li.next() ).lngBuffer )
				rc.add( tt );

		return rc;
	}
}

		StringBuilder buffered = new StringBuilder();
		List<Token> lngBuffer = new LinkedList<Token>();
		List<Insertion> insertions = new LinkedList<Insertion>();

		Iterable<Token> tokens = languageLexer.getTokensUnprocessed( text );

		for( Token t : tokens )
		{
			if( t.getType().getName().equals( "Other" ) )
			{
				if( !lngBuffer.isEmpty() )
				{
					insertions.add( new Insertion( buffered.length(), lngBuffer ) );
					lngBuffer = new LinkedList<Token>();
				}
				buffered.append( t.getValue() );
			}
			else
				lngBuffer.add( t );
		}

		if( !lngBuffer.isEmpty() )
			insertions.add( new Insertion( buffered.length(), lngBuffer ) );

		return doInsertions( insertions, rootLexer.getTokensUnprocessed( buffered.toString() ) );
	
<methods>public void <init>() ,public void <init>(boolean, boolean, int, java.lang.String) ,public void addFilter(org.sikuli.support.ide.syntaxhighlight.Filter) ,public float analyzeText(java.lang.String) ,public static org.sikuli.support.ide.syntaxhighlight.grammar.Lexer getByFullName(java.lang.String) throws org.sikuli.support.ide.syntaxhighlight.ResolutionException,public static org.sikuli.support.ide.syntaxhighlight.grammar.Lexer getByFullName(java.lang.String, java.lang.String, java.lang.String) throws org.sikuli.support.ide.syntaxhighlight.ResolutionException,public static org.sikuli.support.ide.syntaxhighlight.grammar.Lexer getByName(java.lang.String) throws org.sikuli.support.ide.syntaxhighlight.ResolutionException,public List<org.sikuli.support.ide.syntaxhighlight.Filter> getFilters() ,public static org.sikuli.support.ide.syntaxhighlight.grammar.Lexer getForFileName(java.lang.String) throws org.sikuli.support.ide.syntaxhighlight.ResolutionException,public int getTabSize() ,public Iterable<org.sikuli.support.ide.syntaxhighlight.grammar.Token> getTokens(java.lang.String) ,public Iterable<org.sikuli.support.ide.syntaxhighlight.grammar.Token> getTokens(java.lang.String, boolean) ,public Iterable<org.sikuli.support.ide.syntaxhighlight.grammar.Token> getTokensUnprocessed(java.lang.String) ,public boolean isStripAll() ,public boolean isStripNewLines() ,public void setStripAll(boolean) ,public void setStripNewLines(boolean) ,public void setTabSize(int) <variables>private final List<java.lang.String> aliases,private static java.lang.ClassLoader cl,private final List<java.lang.String> filenames,private final List<org.sikuli.support.ide.syntaxhighlight.Filter> filters,private static final ConcurrentMap<java.lang.String,org.sikuli.support.ide.syntaxhighlight.grammar.Lexer> lexerMap,private static final ConcurrentMap<java.lang.String,org.sikuli.support.ide.syntaxhighlight.grammar.Lexer> lexers,private final List<java.lang.String> mimeTypes,private boolean stripAll,private boolean stripNewLines,private int tabSize