Skip to content

Commit

Permalink
Better way to link html docs inside the git repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenrbrandt committed Sep 16, 2016
1 parent 476bfe4 commit 1d86e77
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The Reference link below provides a detailed description of the pattern elements
Quick Start describes how to use the API. See the Calculator and CSscript examples to
get a more detailed idea on how to write programs with Piraha.

[Reference](https://www.cct.lsu.edu/~sbrandt/piraha-peg/doc/ref.html)
[Reference](https://cdn.rawgit.com/stevenrbrandt/piraha-peg/master/doc/ref.html)

[Quick Start](https://www.cct.lsu.edu/~sbrandt/piraha-peg/doc/QuickStart.html)
[Quick Start](https://cdn.rawgit.com/stevenrbrandt/piraha-peg/master/doc/QuickStart.html)

[Calculator](https://www.cct.lsu.edu/~sbrandt/piraha-peg/doc/Calculator.html)
[Calculator](https://cdn.rawgit.com/stevenrbrandt/piraha-peg/master/doc/Calculator.html)

[CScript](https://www.cct.lsu.edu/~sbrandt/piraha-peg/doc/CScript.html)
[CScript](https://cdn.rawgit.com/stevenrbrandt/piraha-peg/master/doc/CScript.html)

[Citing Piraha](http://ieeexplore.ieee.org/document/5698011/) This is a link to the
Piraha Paper.
5 changes: 3 additions & 2 deletions src/edu/lsu/cct/piraha/BackRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ public BackRef(int num,boolean ignCase) {
@Override
public boolean match(Matcher m) {
//System.out.println("num="+num+" mc="+m.matchCount());
if(num >= m.groupCount())
if(num >= m.groupCount()) {
return false;
}
Group backRef = m.group(num);
int begin = backRef.getBegin();
int end = backRef.getEnd();
int n = end-begin;
int pos = m.getTextPos();
if(pos + n > m.text.length())
if((pos + n) > m.text.length())
return false;
if (ignCase) {
for (int i = 0; i < n; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/edu/lsu/cct/piraha/ExtraVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Map;

class ExtraVisitor extends Visitor {
public class ExtraVisitor extends Visitor {
final Map<String, Boolean> visited;

ExtraVisitor(Map<String, Boolean> visited) {
Expand All @@ -17,4 +17,4 @@ public void finishVisit(Pattern p) {
visited.put(name,Boolean.FALSE);
}
}
}
}
4 changes: 2 additions & 2 deletions src/edu/lsu/cct/piraha/Mapping.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edu.lsu.cct.piraha;

class Mapping {
public class Mapping {
int from, delta;
Mapping(int from,int delta) {
this.from = from;
Expand All @@ -9,4 +9,4 @@ class Mapping {
public String toString() {
return "["+from+" += "+delta+"]";
}
}
}
4 changes: 2 additions & 2 deletions src/edu/lsu/cct/piraha/PackRat.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) {
}
}
*/
class PackRat {
public class PackRat {
final String name;
final int pos;
final int hc;
Expand Down Expand Up @@ -50,4 +50,4 @@ public String toString() {
}
return "PackRat("+name+","+pos+","+matched+","+after+","+n+")";
}
}
}
4 changes: 2 additions & 2 deletions src/edu/lsu/cct/piraha/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Set;

class Range extends Pattern {
public class Range extends Pattern {
char lo,hi;
Range(int lo,int hi) {
this.lo = (char) lo;
Expand Down Expand Up @@ -39,4 +39,4 @@ public Range overlap(Range rr) {
public String toString() {
return lo+"-"+hi;
}
}
}
2 changes: 1 addition & 1 deletion src/edu/lsu/cct/piraha/examples/Generic.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ else if(args[n].equals("--check-only"))

if(olderThanPeg && olderThanSource) {
System.out.println(" ---> Up to date");
System.exit(0);
continue;
}
}
if(outputFile.equals(args[n])) throw new IOException("won't over-write input file "+args[n]);
Expand Down

0 comments on commit 1d86e77

Please sign in to comment.