From 5af4c9b45eebf2287dfc78603b61b3480aa62754 Mon Sep 17 00:00:00 2001 From: batxo Date: Wed, 22 Dec 2010 05:01:36 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A2=E3=82=A6=E3=83=88=E3=83=A9=E3=82=A4?= =?utf8?q?=E3=83=B3=E8=A7=A3=E6=9E=90=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/coboled/editors/CobolParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coboled/editors/CobolParser.java b/src/coboled/editors/CobolParser.java index 9e1180f..6a9d6a9 100644 --- a/src/coboled/editors/CobolParser.java +++ b/src/coboled/editors/CobolParser.java @@ -8,13 +8,13 @@ public class CobolParser { public CobolElement parse(String source) { CobolElement root = new CobolElement("root", CobolElementType.ROOT); CobolElement work = root; - Pattern outline = Pattern.compile("^.{6} ( {0,3})([^ ]+.*)", Pattern.MULTILINE); + Pattern outline = Pattern.compile("^.{6} ( {0,3})([^ ]+?.*)", Pattern.MULTILINE); Matcher matcher = outline.matcher(source); while (matcher.find()) { String group = matcher.group(2); if(group != null) { String[] strings = group.split(" +"); - if(strings.length >= 2) { + if(strings.length >= 2 && strings[0].indexOf("EXIT") == -1) { CobolElementType type = null; if(strings[1].startsWith("DIVISION")) { type = CobolElementType.DIVISION; -- 2.11.0