X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Ftib%2FTib.java;h=2398c5cf2fd72ff221e08c0ff5f7bb9ececc7bf4;hp=93f2ce1fb34ce67b6053163bedddc48c368672f1;hb=3ee451bce342d4bb61ad6235ba57bdf817bfdd1a;hpb=e74711e9cb411d80137ebd1f8d9b3bc9a0886f60 diff --git a/src/edu/berkeley/sbp/tib/Tib.java b/src/edu/berkeley/sbp/tib/Tib.java index 93f2ce1..2398c5c 100644 --- a/src/edu/berkeley/sbp/tib/Tib.java +++ b/src/edu/berkeley/sbp/tib/Tib.java @@ -1,6 +1,4 @@ -// Copyright 2005 the Contributors, as shown in the revision logs. -// Licensed under the Apache Public Source License 2.0 ("the License"). -// You may not use this file except in compliance with the License. +// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license package edu.berkeley.sbp.tib; import edu.berkeley.sbp.*; @@ -42,11 +40,11 @@ public class Tib implements Input { int _row = 1; int _col = 0; - public Input.Location getLocation() { return new CartesianLocation(_row, _col); } + public Input.Location getLocation() { return new Cartesian.Location(_col, _row); } private BufferedReader br; - char left = CharRange.left; - char right = CharRange.right; + char left = CharAtom.left; + char right = CharAtom.right; boolean waiting = false; char waitingChar = ' '; @@ -135,6 +133,7 @@ public class Tib implements Input { // Grammar ////////////////////////////////////////////////////////////////////////////// + /* public static class Grammar extends ReflectiveGrammar { private int anon = 0; private final Element ws = Sequence.maximal0(getNonTerminal("w")); @@ -148,11 +147,11 @@ public class Tib implements Input { u2.add(Sequence.singleton(new Element[] { u }, 0)); return anonymousNonTerminal(new Sequence[][] { new Sequence[] { - Sequence.singleton(new Element[] { CharRange.leftBrace, + Sequence.singleton(new Element[] { CharAtom.leftBrace, ws, u2, ws, - CharRange.rightBrace + CharAtom.rightBrace }, 2) } }); @@ -160,6 +159,7 @@ public class Tib implements Input { return super.walk(tree); } } + */ /* public class Braces extends Union {