ruleStack) {
17 | super(reason, text, index, ruleStack);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=01a32171
2 | build.xml.script.CRC32=96c51a1a
3 | build.xml.stylesheet.CRC32=8064a381@1.74.2.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=01a32171
7 | nbproject/build-impl.xml.script.CRC32=a15d16e3
8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
9 | nbproject/profiler-build-impl.xml.data.CRC32=968bd6b9
10 | nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
11 | nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
12 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/InformationBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.Information;
9 | import org.murillo.abnf.Rule$information_field;
10 | /**
11 | *
12 | * @author Sergio
13 | */
14 | class InformationBuilder extends Builder {
15 |
16 |
17 | @Override
18 | public Object visit(Rule$information_field rule) {
19 | //Create new session name
20 | Information info = new Information();
21 | //visit it
22 | String text = rule.rules.get(2).toString();
23 | //Set it
24 | info.setText(text);
25 | //Return it
26 | return info;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/SessionNameBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.SessionName;
9 | import org.murillo.abnf.Rule$session_name_field;
10 |
11 | /**
12 | *
13 | * @author Sergio
14 | */
15 | class SessionNameBuilder extends Builder {
16 |
17 | @Override
18 | public Object visit(Rule$session_name_field rule) {
19 | //Create object
20 | SessionName sessionName = new SessionName();
21 | //Get value
22 | String value = rule.rules.get(2).toString();
23 | //Set value
24 | sessionName.setName(value);
25 | //Return it
26 | return sessionName;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Information.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Information {
13 |
14 | private String text;
15 |
16 | public Information() {
17 | }
18 |
19 | public Information(String text) {
20 | this.text = text;
21 | }
22 |
23 | @Override
24 | public Information clone() {
25 | return new Information(text);
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "i=" + text + "\r\n";
31 | }
32 |
33 | public String getText() {
34 | return text;
35 | }
36 |
37 | public void setText(String text) {
38 | this.text = text;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/SessionName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class SessionName {
13 |
14 | private String name;
15 |
16 | public SessionName() {
17 | }
18 |
19 | public SessionName(String name) {
20 | this.name = name;
21 | }
22 |
23 | @Override
24 | public SessionName clone() {
25 | return new SessionName(name);
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "s=" + name + "\r\n";
31 | }
32 |
33 | public String getName() {
34 | return name;
35 | }
36 |
37 | public void setName(String name) {
38 | this.name = name;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/MidAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.MidAttribute;
9 | import org.murillo.abnf.Rule$mid_attr;
10 | import org.murillo.abnf.Rule$identification_tag;
11 | /**
12 | *
13 | * @author Sergio
14 | */
15 | class MidAttributeBuilder extends Builder {
16 | private MidAttribute mid;
17 |
18 | @Override
19 | public Object visit(Rule$mid_attr rule) {
20 | //New attr
21 | mid = new MidAttribute();
22 | //Generate it
23 | super.visit(rule);
24 | //Return it
25 | return mid;
26 | }
27 |
28 | @Override
29 | public Object visit(Rule$identification_tag rule) {
30 | //Get type
31 | String tag = rule.toString();
32 | //Set type
33 | mid.setIdentificationTag(tag);
34 | //Return it
35 | return tag;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/CNameAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.CNameAttribute;
9 | import org.murillo.abnf.Rule$cname;
10 | import org.murillo.abnf.Rule$cname_attr;
11 |
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | class CNameAttributeBuilder extends Builder {
17 |
18 | private CNameAttribute attr;
19 |
20 | @Override
21 | public Object visit(Rule$cname_attr rule) {
22 | //New attr
23 | attr = new CNameAttribute();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return attr;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$cname rule) {
32 | //Get value
33 | String cname = rule.toString();
34 | //Set value
35 | attr.setCName(cname);
36 | //Return it
37 | return cname;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Bandwitdh.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Bandwitdh {
13 |
14 | private String type;
15 | private String bandwidth;
16 |
17 | public Bandwitdh() {
18 | }
19 |
20 | @Override
21 | public String toString() {
22 | return "b=" + type + ":" + bandwidth + "\r\n";
23 | }
24 |
25 | public Bandwitdh(String type, String bandwidth) {
26 | this.type = type;
27 | this.bandwidth = bandwidth;
28 | }
29 |
30 | public String getBandwidth() {
31 | return bandwidth;
32 | }
33 |
34 | public void setBandwidth(String bandwidth) {
35 | this.bandwidth = bandwidth;
36 | }
37 |
38 | public String getType() {
39 | return type;
40 | }
41 |
42 | public void setType(String type) {
43 | this.type = type;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Key.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Key {
13 |
14 | private String type;
15 | private String key;
16 | public Key() {
17 | }
18 |
19 | public Key(String type, String key) {
20 | this.type = type;
21 | this.key = key;
22 | }
23 |
24 | @Override
25 | public Key clone() {
26 | return new Key(type, key);
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | return "k=" + (key!=null? key + " " : "" ) + type + "\r\n";
32 | }
33 |
34 | public String getKey() {
35 | return key;
36 | }
37 |
38 | public void setKey(String key) {
39 | this.key = key;
40 | }
41 |
42 | public String getType() {
43 | return type;
44 | }
45 |
46 | public void setType(String type) {
47 | this.type = type;
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/PreviousSSRCAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.PreviousSSRCAttribute;
9 | import org.murillo.abnf.Rule$previous_ssrc_attr;
10 | import org.murillo.abnf.Rule$ssrc_id;
11 |
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | class PreviousSSRCAttributeBuilder extends Builder {
17 |
18 | private PreviousSSRCAttribute previous;
19 |
20 | @Override
21 | public Object visit(Rule$previous_ssrc_attr rule) {
22 | //New attr
23 | previous = new PreviousSSRCAttribute();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return previous;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$ssrc_id rule) {
32 | //Get value
33 | String ssrc = rule.toString();
34 | //Set value
35 | previous.addSSRC(ssrc);
36 | //Return it
37 | return ssrc;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Time.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Time {
13 |
14 | private Integer start;
15 | private Integer stop;
16 |
17 | public Time() {
18 |
19 | }
20 |
21 | public Time(Integer start, Integer stop) {
22 | this.start = start;
23 | this.stop = stop;
24 | }
25 |
26 | @Override
27 | public Time clone() {
28 | return new Time(start,stop);
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | return "t=" + start.toString() + " " + stop.toString() + "\r\n";
34 | }
35 |
36 | public Integer getStart() {
37 | return start;
38 | }
39 |
40 | public void setStart(Integer start) {
41 | this.start = start;
42 | }
43 |
44 | public Integer getStop() {
45 | return stop;
46 | }
47 |
48 | public void setStop(Integer stop) {
49 | this.stop = stop;
50 | }
51 |
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/CNameAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class CNameAttribute implements Attribute {
13 |
14 | private String cname;
15 |
16 | public CNameAttribute() {
17 | }
18 |
19 | public CNameAttribute(String cname) {
20 | this.cname = cname;
21 | }
22 |
23 | @Override
24 | public CNameAttribute clone() {
25 | return new CNameAttribute(cname);
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | //Get value
31 | String value = getValue();
32 | //Generic attr
33 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
34 | }
35 |
36 | @Override
37 | public String getField() {
38 | return "cname";
39 | }
40 |
41 | @Override
42 | public String getValue() {
43 | return cname;
44 | }
45 |
46 | public String getCName() {
47 | return cname;
48 | }
49 |
50 | public void setCName(String CName) {
51 | this.cname = CName;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/BaseAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.BaseAttribute;
9 | import org.murillo.abnf.Rule$attribute;
10 | import org.murillo.abnf.Rule$att_field;
11 | import org.murillo.abnf.Rule$att_value;
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | class BaseAttributeBuilder extends Builder {
17 |
18 | private BaseAttribute attr;
19 |
20 | @Override
21 | public Object visit(Rule$attribute rule) {
22 | //New attr
23 | attr = new BaseAttribute();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return attr;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$att_field rule) {
32 | //Get type
33 | String field = rule.toString();
34 | //Set type
35 | attr.setField(field);
36 | //Return it
37 | return field;
38 | }
39 |
40 | @Override
41 | public Object visit(Rule$att_value rule) {
42 | //Get type
43 | String value = rule.toString();
44 | //Set type
45 | attr.setValue(value);
46 | //Return it
47 | return value;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/BandwitdhBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 | import org.murillo.sdp.Bandwidth;
8 | import org.murillo.abnf.Rule$bandwidth;
9 | import org.murillo.abnf.Rule$bandwidth_field;
10 | import org.murillo.abnf.Rule$bwtype;
11 |
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | class BandwitdhBuilder extends Builder {
17 |
18 | private Bandwidth bandwidth;
19 |
20 | @Override
21 | public Object visit(Rule$bandwidth_field rule) {
22 | //Create object
23 | bandwidth = new Bandwidth();
24 | //Generate
25 | visitRules(rule.rules);
26 | //Return it
27 | return bandwidth;
28 | }
29 |
30 |
31 | @Override
32 | public Object visit(Rule$bandwidth rule) {
33 | //Generate
34 | String b = rule.toString();
35 | //Set it
36 | bandwidth.setBandwidth(b);
37 | //Return it
38 | return b;
39 | }
40 |
41 | @Override
42 | public Object visit(Rule$bwtype rule) {
43 | //Generate
44 | String type = rule.toString();
45 | //Set
46 | bandwidth.setType(type);;
47 | //Return it
48 | return type;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/TimeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.Time;
9 | import org.murillo.abnf.Rule$time_repeat_field;
10 | import org.murillo.abnf.Rule$start_time;
11 | import org.murillo.abnf.Rule$stop_time;
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | public class TimeBuilder extends Builder{
17 |
18 | private Time time;
19 |
20 | @Override
21 | public Object visit(Rule$time_repeat_field rule) {
22 | //Create object
23 | time = new Time();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return time;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$start_time rule) {
32 | //Get start
33 | Integer start = Integer.parseInt(rule.toString());
34 | //Set start
35 | time.setStart(start);
36 | //Return it
37 | return start;
38 | }
39 |
40 | @Override
41 | public Object visit(Rule$stop_time rule) {
42 | //Get stop
43 | Integer stop = Integer.parseInt(rule.toString());
44 | //Set start
45 | time.setStop(stop);
46 | //Return it
47 | return stop;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Bandwidth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Bandwidth {
13 |
14 | private String type;
15 | private String bandwidth;
16 |
17 | public Bandwidth() {
18 | }
19 |
20 | @Override
21 | public String toString() {
22 | return "b=" + type + ":" + bandwidth + "\r\n";
23 | }
24 |
25 | public Bandwidth(String type, String bandwidth) {
26 | this.type = type;
27 | this.bandwidth = bandwidth;
28 | }
29 |
30 | public Bandwidth(String type, Integer bandwidth) {
31 | this.type = type;
32 | this.bandwidth = bandwidth.toString();
33 | }
34 |
35 | @Override
36 | public Bandwidth clone() {
37 | //Return cloned one
38 | return new Bandwidth(type, bandwidth);
39 | }
40 |
41 |
42 | public String getBandwidth() {
43 | return bandwidth;
44 | }
45 |
46 | public void setBandwidth(String bandwidth) {
47 | this.bandwidth = bandwidth;
48 | }
49 |
50 | public String getType() {
51 | return type;
52 | }
53 |
54 | public void setType(String type) {
55 | this.type = type;
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/FormatAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.FormatAttribute;
9 | import org.murillo.abnf.Rule$fmtp_attr;
10 | import org.murillo.abnf.Rule$fmt;
11 | import org.murillo.abnf.Rule$param_list;
12 |
13 | /**
14 | *
15 | * @author Sergio
16 | */
17 | public class FormatAttributeBuilder extends Builder {
18 | private FormatAttribute attr;
19 |
20 | @Override
21 | public Object visit(Rule$fmtp_attr rule) {
22 | //New attr
23 | attr = new FormatAttribute();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return attr;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$fmt rule) {
32 | //Get value
33 | Integer fmt = Integer.parseInt(rule.toString());
34 | //Set it
35 | attr.setFmt(fmt);
36 | //Return it
37 | return fmt;
38 | }
39 |
40 | @Override
41 | public Object visit(Rule$param_list rule) {
42 | //Get value
43 | String parameters = rule.toString();
44 | //Set it
45 | attr.setParameters(parameters);
46 | //Return it
47 | return parameters;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/GroupAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 | import org.murillo.abnf.Rule$group_attr;
8 | import org.murillo.abnf.Rule$identification_tag;
9 | import org.murillo.abnf.Rule$group_semantics;
10 | import org.murillo.sdp.GroupAttribute;
11 | /**
12 | *
13 | * @author Sergio
14 | */
15 | class GroupAttributeBuilder extends Builder {
16 |
17 | private GroupAttribute group;
18 |
19 | @Override
20 | public Object visit(Rule$group_attr rule) {
21 | //New attr
22 | group = new GroupAttribute();
23 | //Generate it
24 | super.visit(rule);
25 | //Return it
26 | return group;
27 | }
28 |
29 | @Override
30 | public Object visit(Rule$identification_tag rule) {
31 | //Get type
32 | String tag = rule.toString();
33 | //Set type
34 | group.addTag(tag);
35 | //Return it
36 | return tag;
37 | }
38 | @Override
39 | public Object visit(Rule$group_semantics rule) {
40 | //Get type
41 | String semantics = rule.toString();
42 | //Set type
43 | group.setSemantics(semantics);
44 | //Return it
45 | return semantics;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/MidAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class MidAttribute implements Attribute {
13 |
14 | private String identificationTag;
15 |
16 | public MidAttribute() {
17 | }
18 |
19 | public MidAttribute(String identificationTag) {
20 | this.identificationTag = identificationTag;
21 | }
22 |
23 | @Override
24 | public MidAttribute clone() {
25 | return new MidAttribute(identificationTag);
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | //Get value
31 | String value = getValue();
32 | //Generic attr
33 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
34 | }
35 |
36 | @Override
37 | public String getField() {
38 | return "mid";
39 | }
40 |
41 | @Override
42 | public String getValue() {
43 | return identificationTag;
44 | }
45 |
46 | public String getIdentificationTag() {
47 | return identificationTag;
48 | }
49 |
50 | public void setIdentificationTag(String identificationTag) {
51 | this.identificationTag = identificationTag;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/SSRCGroupAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 | import org.murillo.abnf.Rule$ssrc_group_attr;
8 | import org.murillo.abnf.Rule$ssrc_id;
9 | import org.murillo.abnf.Rule$ssrc_group_semantics;
10 | import org.murillo.sdp.SSRCGroupAttribute;
11 |
12 |
13 | /**
14 | *
15 | * @author Sergio
16 | */
17 | class SSRCGroupAttributeBuilder extends Builder {
18 |
19 | private SSRCGroupAttribute group;
20 |
21 | @Override
22 | public Object visit(Rule$ssrc_group_attr rule) {
23 | //New attr
24 | group = new SSRCGroupAttribute();
25 | //Generate it
26 | super.visit(rule);
27 | //Return it
28 | return group;
29 | }
30 |
31 | @Override
32 | public Object visit(Rule$ssrc_id rule) {
33 | //Get type
34 | Long ssrcId = Long.parseLong(rule.toString());
35 | //Set type
36 | group.addSSRCId(ssrcId);
37 | //Return it
38 | return ssrcId;
39 | }
40 | @Override
41 | public Object visit(Rule$ssrc_group_semantics rule) {
42 | //Get type
43 | String semantics = rule.toString();
44 | //Set type
45 | group.setSemantics(semantics);
46 | //Return it
47 | return semantics;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/docs/overview-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Overview List (SDP parser library)
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ABNF Java SDP library
2 | This java library allows strict [ABNF](https://raw.githubusercontent.com/medooze/sdp/master/src/org/murillo/abnf/sdp.abnf) SDP parsing and serialization
3 |
4 | # Build
5 | ```
6 | ant
7 | ```
8 |
9 | # Javadoc
10 |
11 | https://medooze.github.io/sdp/
12 |
13 | # Example
14 | ``` java
15 | SessionDescription sdp = new SessionDescription();
16 | Origin origin = new Origin("-", 0L, 0L, "IN", "IP4", "127.0.0.1");
17 | sdp.setOrigin(origin);
18 | sdp.setSessionName("test");
19 | sdp.addMedia(new MediaDescription("aduio", 0, "UDP/AVP"));
20 |
21 | SessionDescription cloned = sdp.clone();
22 | System.out.println(sdp.toString());
23 | System.out.println(cloned.toString());
24 |
25 | origin.setSessId(1);
26 | System.out.println(sdp.toString());
27 | System.out.println(cloned.toString());
28 | ```
29 |
30 | ``` java
31 | SessionDescription sdp = SessionDescription.Parse("v=0\r\n" +
32 | "o=- 3803220250780278427 2 IN IP4 127.0.0.1\r\n" +
33 | "s=-\r\n" +
34 | "t=0 0\r\n" +
35 | "a=msid-semantic: WMS\r\n" +
36 | "m=application 50895 DTLS/SCTP 5000\r\n" +
37 | "a=sctpmap:5000 webrtc-datachannel 1024\r\n");
38 |
39 | MediaDescription datachannel = sdp.getMedias().get(0);
40 | SCTPMapAttribute sctpmap = (SCTPMapAttribute)datachannel.getAttributes("sctpmap").get(0);
41 | System.out.println(sctpmap.toString());
42 | ```
43 | # License
44 |
45 | MIT :)
46 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/FingerprintAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.abnf.Rule$fingerprint_attribute;
9 | import org.murillo.abnf.Rule$hash_func;
10 | import org.murillo.abnf.Rule$fingerprint;
11 | import org.murillo.sdp.FingerprintAttribute;
12 | /**
13 | *
14 | * @author Sergio
15 | */
16 | class FingerprintAttributeBuilder extends Builder {
17 |
18 | private FingerprintAttribute fingerprint;
19 |
20 | @Override
21 | public Object visit(Rule$fingerprint_attribute rule) {
22 | //New attr
23 | fingerprint = new FingerprintAttribute();
24 | //Generate it
25 | super.visit(rule);
26 | //Return it
27 | return fingerprint;
28 | }
29 |
30 | @Override
31 | public Object visit(Rule$hash_func rule) {
32 | //Get hash func
33 | String value = rule.toString();
34 | //Set type
35 | fingerprint.setHashFunc(value);
36 | //Return it
37 | return value;
38 | }
39 |
40 | @Override
41 | public Object visit(Rule$fingerprint rule) {
42 | //Get fingerprint
43 | String value = rule.toString();
44 | //Set type
45 | fingerprint.setFingerprint(value);
46 | //Return it
47 | return value;
48 | }
49 |
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/Connection.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class Connection {
13 |
14 | private String netType;
15 | private String addrType;
16 | private String address;
17 |
18 | public Connection() {
19 | }
20 |
21 | public Connection(String netType, String addrType, String address) {
22 | this.netType = netType;
23 | this.addrType = addrType;
24 | this.address = address;
25 | }
26 |
27 | @Override
28 | public Connection clone() {
29 | return new Connection(netType, addrType, address);
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | return "c=" + netType + " " + addrType + " " + address + "\r\n";
35 | }
36 |
37 | public String getAddrType() {
38 | return addrType;
39 | }
40 |
41 | public void setAddrType(String addrType) {
42 | this.addrType = addrType;
43 | }
44 |
45 | public String getAddress() {
46 | return address;
47 | }
48 |
49 | public void setAddress(String address) {
50 | this.address = address;
51 | }
52 |
53 | public String getNetType() {
54 | return netType;
55 | }
56 |
57 | public void setNetType(String netType) {
58 | this.netType = netType;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | public abstract class Rule
16 | {
17 | public final String spelling;
18 | public final ArrayList rules;
19 |
20 | protected Rule(String spelling, ArrayList rules)
21 | {
22 | this.spelling = spelling;
23 | this.rules = rules;
24 | }
25 |
26 | public String toString()
27 | {
28 | return spelling;
29 | }
30 |
31 | public boolean equals(Object object)
32 | {
33 | return object instanceof Rule && spelling.equals(((Rule)object).spelling);
34 | }
35 |
36 | public int hashCode()
37 | {
38 | return spelling.hashCode();
39 | }
40 |
41 | public int compareTo(Rule rule)
42 | {
43 | return spelling.compareTo(rule.spelling);
44 | }
45 |
46 | public abstract Object accept(Visitor visitor);
47 | }
48 |
49 | /* -----------------------------------------------------------------------------
50 | * eof
51 | * -----------------------------------------------------------------------------
52 | */
53 |
--------------------------------------------------------------------------------
/docs/org/murillo/abnf/precomp/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | org.murillo.abnf.precomp (SDP parser library)
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | org.murillo.abnf.precomp
21 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/SCTPMapAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.abnf.Rule$app;
9 | import org.murillo.abnf.Rule$sctpmap_attr;
10 | import org.murillo.abnf.Rule$sctpmap_number;
11 | import org.murillo.abnf.Rule$streams;
12 | import org.murillo.sdp.SCTPMapAttribute;
13 | /**
14 | *
15 | * @author Sergio
16 | */
17 | class SCTPMapAttributeBuilder extends Builder {
18 |
19 | private SCTPMapAttribute sctpmap;
20 |
21 | @Override
22 | public Object visit(Rule$sctpmap_attr rule) {
23 | //New attr
24 | sctpmap = new SCTPMapAttribute();
25 | //Generate it
26 | super.visit(rule);
27 | //Return it
28 | return sctpmap;
29 | }
30 |
31 | @Override
32 | public Object visit(Rule$sctpmap_number rule) {
33 | //Get number
34 | Integer value = Integer.parseInt(rule.toString());
35 | //Set type
36 | sctpmap.setNumber(value);
37 | //Return it
38 | return value;
39 | }
40 |
41 | @Override
42 | public Object visit(Rule$app rule) {
43 | //Get app
44 | String value = rule.toString();
45 | //Set type
46 | sctpmap.setApp(value);
47 | //Return it
48 | return value;
49 | }
50 |
51 |
52 | @Override
53 | public Object visit(Rule$streams rule) {
54 | //Get number
55 | Integer value = Integer.parseInt(rule.toString());
56 | //Set type
57 | sctpmap.setStreams(value);
58 | //Return it
59 | return value;
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/docs/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Javadoc style sheet */
2 |
3 | /* Define colors, fonts and other style attributes here to override the defaults */
4 |
5 | /* Page background color */
6 | body { background-color: #FFFFFF; color:#000000 }
7 |
8 | /* Headings */
9 | h1 { font-size: 145% }
10 |
11 | /* Table colors */
12 | .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
13 | .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
14 | .TableRowColor { background: #FFFFFF; color:#000000 } /* White */
15 |
16 | /* Font used in left-hand frame lists */
17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
20 |
21 | /* Navigation bar fonts and colors */
22 | .NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
23 | .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
26 |
27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
29 |
30 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/BaseAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class BaseAttribute implements Attribute {
13 | private String field;
14 | private String value;
15 |
16 | public BaseAttribute() {
17 |
18 | }
19 |
20 | public BaseAttribute(String field) {
21 | this.field = field;
22 | }
23 |
24 | public BaseAttribute(String field, String value) {
25 | this.field = field;
26 | this.value = value;
27 | }
28 |
29 | public BaseAttribute(String field, Integer value) {
30 | this.field = field;
31 | this.value = value.toString();
32 | }
33 |
34 | @Override
35 | public BaseAttribute clone() {
36 | return new BaseAttribute(field, value);
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | //Get value
42 | String value = getValue();
43 | //Generic attr
44 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
45 | }
46 |
47 | @Override
48 | public String getField() {
49 | return field;
50 | }
51 |
52 | public void setField(String field) {
53 | this.field = field;
54 | }
55 |
56 | @Override
57 | public String getValue() {
58 | return value;
59 | }
60 |
61 | public void setValue(String value) {
62 | this.value = value;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/precomp/CRLF.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CRLF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Aug 16 23:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 | package org.murillo.abnf.precomp;
11 |
12 | import java.util.ArrayList;
13 | import org.murillo.abnf.ParserContext;
14 | import org.murillo.abnf.Rule;
15 | import org.murillo.abnf.Visitor;
16 |
17 | final public class CRLF extends Rule {
18 |
19 | private CRLF(String spelling, ArrayList rules) {
20 | super(spelling, rules);
21 | }
22 |
23 | public static Rule parse(ParserContext context) {
24 | context.push("CRLF");
25 |
26 | boolean parsed = true;
27 |
28 | CRLF stringValue = null;
29 | try {
30 | String value =
31 | context.text.substring(
32 | context.index,
33 | context.index + 2);
34 |
35 | if ((parsed = value.equalsIgnoreCase("\r\n"))) {
36 | context.index += 2;
37 | stringValue = new CRLF(value, null);
38 | }
39 | } catch (IndexOutOfBoundsException e) {
40 | parsed = false;
41 | }
42 |
43 | context.pop("CRLF", parsed);
44 |
45 | return stringValue;
46 | }
47 |
48 | public Object accept(Visitor visitor) {
49 | return visitor.visit(this);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/SSRCAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.SSRCAttribute;
9 | import org.murillo.abnf.Rule$ssrc_attr;
10 | import org.murillo.abnf.Rule$ssrc_id;
11 | import org.murillo.abnf.Rule$att_field;
12 | import org.murillo.abnf.Rule$att_value;
13 | /**
14 | *
15 | * @author Sergio
16 | */
17 | class SSRCAttributeBuilder extends Builder {
18 |
19 | private SSRCAttribute ssrc;
20 |
21 | @Override
22 | public Object visit(Rule$ssrc_attr rule) {
23 | //New attr
24 | ssrc = new SSRCAttribute();
25 | //Generate it
26 | super.visit(rule);
27 | //Return it
28 | return ssrc;
29 | }
30 |
31 | @Override
32 | public Object visit(Rule$ssrc_id rule) {
33 | //Get type
34 | Long ssrcId = Long.parseLong(rule.toString());
35 | //Set type
36 | ssrc.setSSRC(ssrcId);
37 | //Return it
38 | return ssrcId;
39 | }
40 |
41 | @Override
42 | public Object visit(Rule$att_field rule) {
43 | //Get type
44 | String field = rule.toString();
45 | //Set type
46 | ssrc.setAttrField(field);
47 | //Return it
48 | return field;
49 | }
50 |
51 | @Override
52 | public Object visit(Rule$att_value rule) {
53 | //Get type
54 | String value = rule.toString();
55 | //Set type
56 | ssrc.setAttrValue(value);
57 | //Return it
58 | return value;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/ConnectionBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.Connection;
9 | import org.murillo.abnf.Rule$connection_field;
10 | import org.murillo.abnf.Rule$addrtype;
11 | import org.murillo.abnf.Rule$nettype;
12 | import org.murillo.abnf.Rule$connection_address;
13 | /**
14 | *
15 | * @author Sergio
16 | */
17 | class ConnectionBuilder extends Builder {
18 |
19 | private Connection conn;
20 |
21 | @Override
22 | public Object visit(Rule$connection_field rule) {
23 | //Create object
24 | conn = new Connection();
25 | //Generate
26 | visitRules(rule.rules);
27 | //Return it
28 | return conn;
29 | }
30 |
31 |
32 | @Override
33 | public Object visit(Rule$nettype rule) {
34 | //Generate
35 | String nettype = rule.toString();
36 | //Set it
37 | conn.setNetType(nettype);
38 | //Return it
39 | return nettype;
40 | }
41 |
42 | @Override
43 | public Object visit(Rule$addrtype rule) {
44 | //Generate
45 | String addrtype = rule.toString();
46 | //Set
47 | conn.setAddrType(addrtype);
48 | //Return it
49 | return addrtype;
50 | }
51 |
52 | @Override
53 | public Object visit(Rule$connection_address rule) {
54 | //Generate
55 | String address = rule.toString();
56 | //Set it
57 | conn.setAddress(address);
58 | //Return it
59 | return address;
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/FingerprintAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | import java.util.ArrayList;
9 |
10 | /**
11 | *
12 | * @author Sergio
13 | */
14 | public class FingerprintAttribute implements Attribute {
15 |
16 |
17 |
18 | private String hashFunc;
19 | private String fingerprint;
20 |
21 |
22 | public FingerprintAttribute() {
23 | }
24 |
25 | public FingerprintAttribute(String hashFunc, String fingerprint) {
26 | this.hashFunc = hashFunc;
27 | this.fingerprint = fingerprint;
28 | }
29 |
30 | @Override
31 | public FingerprintAttribute clone() {
32 | return new FingerprintAttribute(hashFunc, fingerprint);
33 | }
34 |
35 |
36 | @Override
37 | public String getField() {
38 | return "fingerprint";
39 | }
40 |
41 | @Override
42 | public String getValue() {
43 |
44 | return hashFunc+" "+fingerprint;
45 | }
46 |
47 | @Override
48 | public String toString() {
49 | //Get value
50 | String value = getValue();
51 | //Generic attr
52 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
53 | }
54 |
55 | public String getFingerprint() {
56 | return fingerprint;
57 | }
58 |
59 | public void setFingerprint(String fingerprint) {
60 | this.fingerprint = fingerprint;
61 | }
62 |
63 | public String getHashFunc() {
64 | return hashFunc;
65 | }
66 |
67 | public void setHashFunc(String hashFunc) {
68 | this.hashFunc = hashFunc;
69 | }
70 |
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/precomp/ALPHA.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CRLF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Aug 16 23:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 | package org.murillo.abnf.precomp;
11 |
12 | import org.murillo.abnf.ParserContext;
13 | import org.murillo.abnf.Rule;
14 | import org.murillo.abnf.Visitor;
15 |
16 | final public class ALPHA extends Rule {
17 |
18 | private ALPHA(String value) {
19 | super(value, null);
20 | }
21 |
22 | public static Rule parse(ParserContext context) {
23 |
24 | context.push("ALPHA");
25 |
26 | ALPHA alpha = null;
27 | boolean parsed = false;
28 |
29 | try
30 | {
31 | //Get char
32 | char c = context.text.charAt(context.index);
33 | //ALPHA = %x41-5A / %x61-7A
34 | if ((c>=0x41 && c<=0x5A) || (c>=0x61 && c<=0x7A))
35 | {
36 | //Parserd
37 | parsed = true;
38 | //Create token
39 | alpha = new ALPHA(Character.toString(c));
40 | //Increase index
41 | context.index++;
42 | }
43 | } catch (IndexOutOfBoundsException e) {
44 | }
45 | context.pop("ALPHA", parsed);
46 |
47 | return alpha;
48 | }
49 |
50 | @Override
51 | public Object accept(Visitor visitor) {
52 | return visitor.visit(this);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/SCTPMapAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package org.murillo.sdp;
6 | /**
7 | *
8 | * @author Sergio
9 | *
10 | */
11 | public class SCTPMapAttribute implements Attribute {
12 |
13 | private Integer number;
14 | private String app;
15 | private Integer streams;
16 |
17 | public SCTPMapAttribute() {
18 |
19 | }
20 |
21 | public SCTPMapAttribute(Integer number, String app, Integer streams) {
22 | this.number = number;
23 | this.app = app;
24 | this.streams = streams;
25 | }
26 |
27 | @Override
28 | public SCTPMapAttribute clone() {
29 | return new SCTPMapAttribute(number, app, streams);
30 | }
31 |
32 | @Override
33 | public String getField() {
34 | return "sctpmap";
35 | }
36 |
37 | @Override
38 | public String getValue() {
39 |
40 | String value = number + " " + app;
41 |
42 | if (streams!=null)
43 | value += " " + streams;
44 |
45 | return value;
46 | }
47 |
48 | @Override
49 | public String toString() {
50 | //Get value
51 | String value = getValue();
52 | //Generic attr
53 | return "a=" + getField() + (value != null ? ":" + value : "") + "\r\n";
54 | }
55 |
56 | public Integer getNumber() {
57 | return number;
58 | }
59 |
60 | public void setNumber(Integer number) {
61 | this.number = number;
62 | }
63 |
64 | public String getApp() {
65 | return app;
66 | }
67 |
68 | public void setApp(String app) {
69 | this.app = app;
70 | }
71 |
72 | public Integer getStreams() {
73 | return streams;
74 | }
75 |
76 | public void setStreams(Integer streams) {
77 | this.streams = streams;
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/docs/org/murillo/sdp/impl/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | org.murillo.sdp.impl (SDP parser library)
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | org.murillo.sdp.impl
21 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/PreviousSSRCAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | import java.util.ArrayList;
9 |
10 | /**
11 | *
12 | * @author Sergio
13 | */
14 | public class PreviousSSRCAttribute implements Attribute {
15 |
16 | private ArrayList SSRCs;
17 |
18 | public PreviousSSRCAttribute() {
19 | SSRCs = new ArrayList();
20 | }
21 |
22 | @Override
23 | public PreviousSSRCAttribute clone() {
24 | //Clone
25 | PreviousSSRCAttribute cloned = new PreviousSSRCAttribute();
26 | //For each ssrc
27 | for(String ssrc : SSRCs)
28 | //Add it
29 | cloned.addSSRC(ssrc);
30 | //REturn cloned
31 | return cloned;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | //Get value
37 | String value = getValue();
38 | //Generic attr
39 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
40 | }
41 |
42 | @Override
43 | public String getField() {
44 | return "previous-ssrc";
45 | }
46 |
47 | @Override
48 | public String getValue() {
49 | String value = null;
50 | for (String SSRC : SSRCs)
51 | if (value==null)
52 | value = SSRC;
53 | else
54 | value += " " + SSRC;
55 | return value;
56 | }
57 |
58 | public void addSSRC(String SSRC) {
59 | SSRCs.add(SSRC);
60 | }
61 |
62 | public ArrayList getSSRCs() {
63 | return SSRCs;
64 | }
65 |
66 | public void setSSRCs(ArrayList SSRCs) {
67 | this.SSRCs = SSRCs;
68 | }
69 |
70 | }
--------------------------------------------------------------------------------
/src/org/murillo/sdp/GroupAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | import java.util.ArrayList;
9 |
10 | /**
11 | *
12 | * @author Sergio
13 | */
14 | public class GroupAttribute implements Attribute {
15 |
16 | private String semantics;
17 | private ArrayList tags;
18 |
19 | public GroupAttribute(){
20 | tags = new ArrayList();
21 | }
22 |
23 | public GroupAttribute(String semantics){
24 | this.semantics = semantics;
25 | tags = new ArrayList();
26 | }
27 |
28 | @Override
29 | public GroupAttribute clone() {
30 | //Clone
31 | GroupAttribute cloned = new GroupAttribute(semantics);
32 | //Clone data
33 | for(String tag: tags)
34 | //Add tag
35 | cloned.addTag(tag);
36 | //Return it
37 | return cloned;
38 | }
39 |
40 | @Override
41 | public String getField() {
42 | return "group";
43 | }
44 |
45 | @Override
46 | public String getValue() {
47 | String value = semantics;
48 | for (String tag : tags)
49 | value += " " + tag;
50 | return value;
51 | }
52 |
53 | @Override
54 | public String toString() {
55 | //Get value
56 | String value = getValue();
57 | //Generic attr
58 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
59 | }
60 |
61 |
62 | public String getSemantics() {
63 | return semantics;
64 | }
65 |
66 | public void setSemantics(String semantics) {
67 | this.semantics = semantics;
68 | }
69 |
70 | public void addTag(String tag) {
71 | tags.add(tag);
72 | }
73 |
74 | }
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Terminal$StringValue.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Terminal$StringValue.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | public class Terminal$StringValue extends Rule
16 | {
17 | private Terminal$StringValue(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public static Terminal$StringValue parse(
23 | ParserContext context,
24 | String regex)
25 | {
26 | context.push("StringValue", regex);
27 |
28 | boolean parsed = true;
29 |
30 | Terminal$StringValue stringValue = null;
31 | try
32 | {
33 | String value =
34 | context.text.substring(
35 | context.index,
36 | context.index + regex.length());
37 |
38 | if ((parsed = value.equalsIgnoreCase(regex)))
39 | {
40 | context.index += regex.length();
41 | stringValue = new Terminal$StringValue(value, null);
42 | }
43 | }
44 | catch (IndexOutOfBoundsException e) {parsed = false;}
45 |
46 | context.pop("StringValue", parsed);
47 |
48 | return stringValue;
49 | }
50 |
51 | public Object accept(Visitor visitor)
52 | {
53 | return visitor.visit(this);
54 | }
55 | }
56 | /* -----------------------------------------------------------------------------
57 | * eof
58 | * -----------------------------------------------------------------------------
59 | */
60 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/SSRCAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class SSRCAttribute implements Attribute {
13 |
14 | private Long SSRC;
15 | private String attrField;
16 | private String attrValue;
17 |
18 | public SSRCAttribute() {
19 | }
20 |
21 | public SSRCAttribute(Long SSRC, String attrField, String attrValue) {
22 | this.SSRC = SSRC;
23 | this.attrField = attrField;
24 | this.attrValue = attrValue;
25 | }
26 |
27 | @Override
28 | public SSRCAttribute clone() {
29 | return new SSRCAttribute(SSRC, attrField, attrValue);
30 | }
31 |
32 |
33 | @Override
34 | public String toString() {
35 | //Get value
36 | String value = getValue();
37 | //Generic attr
38 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
39 | }
40 |
41 | @Override
42 | public String getField() {
43 | return "ssrc";
44 | }
45 |
46 | @Override
47 | public String getValue() {
48 | return SSRC + " " + attrField + (attrValue!=null ? ":" + attrValue: "");
49 | }
50 |
51 | public Long getSSRC() {
52 | return SSRC;
53 | }
54 |
55 | public void setSSRC(Long SSRC) {
56 | this.SSRC = SSRC;
57 | }
58 |
59 | public String getAttrField() {
60 | return attrField;
61 | }
62 |
63 | public void setAttrField(String attrField) {
64 | this.attrField = attrField;
65 | }
66 |
67 | public String getAttrValue() {
68 | return attrValue;
69 | }
70 |
71 | public void setAttrValue(String attrValue) {
72 | this.attrValue = attrValue;
73 | }
74 |
75 |
76 |
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/Terminal$NumericValue.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Terminal$NumericValue.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Fri Aug 17 11:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 | import java.util.regex.Pattern;
15 |
16 | public class Terminal$NumericValue extends Rule
17 | {
18 | private Terminal$NumericValue(String spelling, ArrayList rules)
19 | {
20 | super(spelling, rules);
21 | }
22 |
23 | public static Terminal$NumericValue parse(
24 | ParserContext context,
25 | String spelling,
26 | String regex,
27 | int length)
28 | {
29 | context.push("NumericValue", spelling + "," + regex);
30 |
31 | boolean parsed = true;
32 |
33 | Terminal$NumericValue numericValue = null;
34 | try
35 | {
36 | String value =
37 | context.text.substring(
38 | context.index,
39 | context.index + length);
40 |
41 | if ((parsed = Pattern.matches(regex, value)))
42 | {
43 | context.index += length;
44 | numericValue = new Terminal$NumericValue(value, null);
45 | }
46 | }
47 | catch (IndexOutOfBoundsException e) {parsed = false;}
48 |
49 | context.pop("NumericValue", parsed);
50 |
51 | return numericValue;
52 | }
53 |
54 | public Object accept(Visitor visitor)
55 | {
56 | return visitor.visit(this);
57 | }
58 | }
59 | /* -----------------------------------------------------------------------------
60 | * eof
61 | * -----------------------------------------------------------------------------
62 | */
63 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Terminal$NumericValue.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Terminal$NumericValue.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Fri Aug 17 11:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 | import java.util.regex.Pattern;
15 |
16 | public class Terminal$NumericValue extends Rule
17 | {
18 | private Terminal$NumericValue(String spelling, ArrayList rules)
19 | {
20 | super(spelling, rules);
21 | }
22 |
23 | public static Terminal$NumericValue parse(
24 | ParserContext context,
25 | String spelling,
26 | String regex,
27 | int length)
28 | {
29 | context.push("NumericValue", spelling + "," + regex);
30 |
31 | boolean parsed = true;
32 |
33 | Terminal$NumericValue numericValue = null;
34 | try
35 | {
36 | String value =
37 | context.text.substring(
38 | context.index,
39 | context.index + length);
40 |
41 | if ((parsed = Pattern.matches(regex, value)))
42 | {
43 | context.index += length;
44 | numericValue = new Terminal$NumericValue(value, null);
45 | }
46 | }
47 | catch (IndexOutOfBoundsException e) {parsed = false;}
48 |
49 | context.pop("NumericValue", parsed);
50 |
51 | return numericValue;
52 | }
53 |
54 | public Object accept(Visitor visitor)
55 | {
56 | return visitor.visit(this);
57 | }
58 | }
59 | /* -----------------------------------------------------------------------------
60 | * eof
61 | * -----------------------------------------------------------------------------
62 | */
63 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/RTPMapAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.abnf.Rule$rtpmap_attr;
9 | import org.murillo.abnf.Rule$fmt;
10 | import org.murillo.abnf.Rule$name;
11 | import org.murillo.abnf.Rule$rate;
12 | import org.murillo.abnf.Rule$parameters;
13 | import org.murillo.sdp.RTPMapAttribute;
14 |
15 | /**
16 | *
17 | * @author Sergio
18 | */
19 | public class RTPMapAttributeBuilder extends Builder {
20 | private RTPMapAttribute attr;
21 |
22 | @Override
23 | public Object visit(Rule$rtpmap_attr rule) {
24 | //New attr
25 | attr = new RTPMapAttribute();
26 | //Generate it
27 | super.visit(rule);
28 | //Return it
29 | return attr;
30 | }
31 |
32 | @Override
33 | public Object visit(Rule$fmt rule) {
34 | //Get type
35 | Integer fmt = Integer.parseInt(rule.toString());
36 | //Set type
37 | attr.setFormat(fmt);
38 | //Return it
39 | return fmt;
40 | }
41 |
42 | @Override
43 | public Object visit(Rule$name rule) {
44 | //Get type
45 | String name = rule.toString();
46 | //Set type
47 | attr.setName(name);
48 | //Return it
49 | return name;
50 | }
51 |
52 | @Override
53 | public Object visit(Rule$rate rule) {
54 | //Get type
55 | Integer rate = Integer.parseInt(rule.toString());
56 | //Set type
57 | attr.setRate(rate);
58 | //Return it
59 | return rate;
60 | }
61 |
62 | @Override
63 | public Object visit(Rule$parameters rule) {
64 | //Get type
65 | String parameters = rule.toString();
66 | //Set type
67 | attr.setParameters(parameters);
68 | //Return it
69 | return parameters;
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/precomp/ByteString.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CRLF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Aug 16 23:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 | package org.murillo.abnf.precomp;
11 |
12 | import org.murillo.abnf.ParserContext;
13 | import org.murillo.abnf.Rule;
14 | import org.murillo.abnf.Visitor;
15 |
16 | final public class ByteString extends Rule {
17 |
18 | private ByteString(String token) {
19 | super(token, null);
20 | }
21 |
22 | public static Rule parse(ParserContext context) {
23 |
24 | context.push("Token");
25 |
26 | ByteString token = null;
27 | boolean parsed = false;
28 |
29 | //Get data
30 | int len = context.text.length();
31 | int i = context.index;
32 |
33 | //Check
34 | while(i=0x01 && c<=0x09) || (c>=0x0B && c<=0x0C) || (c>=0x0E && c<=0xFF))
40 | //Next
41 | i++;
42 | else
43 | break;
44 | }
45 |
46 | //Check
47 | if (i>context.index)
48 | {
49 | //Parserd
50 | parsed = true;
51 | //Create token
52 | token = new ByteString(context.text.substring(context.index, i));
53 | //Increase index
54 | context.index = i;
55 | }
56 |
57 | context.pop("Token", parsed);
58 |
59 | return token;
60 | }
61 |
62 | @Override
63 | public Object accept(Visitor visitor) {
64 | return visitor.visit(this);
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/ExtMapAttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.ExtMapAttribute;
9 | import org.murillo.abnf.Rule$extmap_attribute;
10 | import org.murillo.abnf.Rule$direction;
11 | import org.murillo.abnf.Rule$extension_identifier;
12 | import org.murillo.abnf.Rule$extension_name;
13 | import org.murillo.abnf.Rule$extension_attributes;
14 |
15 | /**
16 | *
17 | * @author Sergio
18 | */
19 | public class ExtMapAttributeBuilder extends Builder {
20 |
21 | ExtMapAttribute extmap;
22 |
23 | @Override
24 | public Object visit(Rule$extmap_attribute rule) {
25 | //New attr
26 | extmap = new ExtMapAttribute();
27 | //Generate it
28 | super.visit(rule);
29 | //Return it
30 | return extmap;
31 | }
32 |
33 | @Override
34 | public Object visit(Rule$direction rule) {
35 | //Get value
36 | String value = rule.toString();
37 | //Set type
38 | extmap.setDirection(value);
39 | //Return it
40 | return value;
41 | }
42 |
43 | @Override
44 | public Object visit(Rule$extension_identifier rule) {
45 | //Get type
46 | Integer value = Integer.parseInt(rule.toString());
47 | //Set type
48 | extmap.setId(value);
49 | //Return it
50 | return value;
51 | }
52 |
53 | @Override
54 | public Object visit(Rule$extension_name rule) {
55 | //Get value
56 | String value = rule.toString();
57 | //Set type
58 | extmap.setName(value);
59 | //Return it
60 | return value;
61 | }
62 |
63 | @Override
64 | public Object visit(Rule$extension_attributes rule) {
65 | //Get value
66 | String value = rule.toString();
67 | //Set type
68 | extmap.setAttributes(value);
69 | //Return it
70 | return value;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/SSRCGroupAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * @author Sergio
14 | */
15 | public class SSRCGroupAttribute implements Attribute {
16 |
17 | private String semantics;
18 | private ArrayList SSRCIds;
19 |
20 | public SSRCGroupAttribute() {
21 | SSRCIds = new ArrayList();
22 | }
23 |
24 | public SSRCGroupAttribute(String semantics) {
25 | this.semantics = semantics;
26 | SSRCIds = new ArrayList();
27 | }
28 |
29 | public SSRCGroupAttribute(String semantics, List ssrcs) {
30 | this.semantics = semantics;
31 | this.SSRCIds = new ArrayList(ssrcs);
32 | }
33 |
34 | @Override
35 | public SSRCGroupAttribute clone() {
36 | return new SSRCGroupAttribute(semantics, SSRCIds);
37 | }
38 |
39 |
40 | @Override
41 | public String toString() {
42 | //Get value
43 | String value = getValue();
44 | //Generic attr
45 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
46 | }
47 |
48 | @Override
49 | public String getField() {
50 | return "ssrc-group";
51 | }
52 |
53 | @Override
54 | public String getValue() {
55 | String value = semantics;
56 | for (Long id : SSRCIds)
57 | value += " " + id;
58 | return value;
59 | }
60 |
61 | public ArrayList getSSRCIds() {
62 | return SSRCIds;
63 | }
64 |
65 | public void setSSRCIds(ArrayList SSRCIds) {
66 | this.SSRCIds = SSRCIds;
67 | }
68 |
69 | public void addSSRCId(Long ssrcId) {
70 | SSRCIds.add(ssrcId);
71 | }
72 |
73 | public String getSemantics() {
74 | return semantics;
75 | }
76 |
77 | public void setSemantics(String semantics) {
78 | this.semantics = semantics;
79 | }
80 |
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/precomp/Token.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CRLF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Aug 16 23:27:55 CEST 2012
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 | package org.murillo.abnf.precomp;
11 |
12 | import java.util.ArrayList;
13 | import org.murillo.abnf.ParserContext;
14 | import org.murillo.abnf.Rule;
15 | import org.murillo.abnf.Visitor;
16 |
17 | final public class Token extends Rule {
18 |
19 | private Token(String token) {
20 | super(token, null);
21 | }
22 |
23 | public static Rule parse(ParserContext context) {
24 |
25 | context.push("Token");
26 |
27 | Token token = null;
28 | boolean parsed = false;
29 |
30 | //Get data
31 | int len = context.text.length();
32 | int i = context.index;
33 |
34 | //Check
35 | while(i=0x23 && c<=0x27) || (c>=0x2A && c<=0x2B) || (c>=0x2D && c<=0x2E) || (c>=0x30 && c<=0x39) || (c>=0x41 && c<=0x5A) || (c>=0x5E && c<=0x7E))
41 | //Next
42 | i++;
43 | else
44 | break;
45 | }
46 |
47 | //Check
48 | if (i>context.index)
49 | {
50 | //Parserd
51 | parsed = true;
52 | //Create token
53 | token = new Token(context.text.substring(context.index, i));
54 | //Increase index
55 | context.index = i;
56 | }
57 |
58 | context.pop("Token", parsed);
59 |
60 | return token;
61 | }
62 |
63 | @Override
64 | public Object accept(Visitor visitor) {
65 | return visitor.visit(this);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/ExtMapAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class ExtMapAttribute implements Attribute {
13 | Integer id;
14 | String direction;
15 | String name;
16 | String attributes;
17 |
18 | public ExtMapAttribute() {
19 | }
20 |
21 | public ExtMapAttribute(Integer id, String name) {
22 | this.id = id;
23 | this.name = name;
24 | }
25 |
26 | public ExtMapAttribute(Integer id, String direction, String name, String attributes) {
27 | this.id = id;
28 | this.direction = direction;
29 | this.name = name;
30 | this.attributes = attributes;
31 | }
32 |
33 | @Override
34 | public ExtMapAttribute clone() {
35 | return new ExtMapAttribute(id, direction, name, attributes);
36 | }
37 |
38 |
39 | @Override
40 | public String getField() {
41 | return "extmap";
42 | }
43 |
44 | @Override
45 | public String getValue() {
46 | return id + (direction!=null ? "/" + direction : "") + " " + name + (attributes!=null ? " " + attributes : "");
47 | }
48 |
49 | @Override
50 | public String toString() {
51 | //Get value
52 | String value = getValue();
53 | //Generic attr
54 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
55 | }
56 |
57 | public String getDirection() {
58 | return direction;
59 | }
60 |
61 | public void setDirection(String direction) {
62 | this.direction = direction;
63 | }
64 |
65 | public Integer getId() {
66 | return id;
67 | }
68 |
69 | public void setId(Integer id) {
70 | this.id = id;
71 | }
72 |
73 | public String getName() {
74 | return name;
75 | }
76 |
77 | public void setName(String name) {
78 | this.name = name;
79 | }
80 |
81 | public String getAttributes() {
82 | return attributes;
83 | }
84 |
85 | public void setAttributes(String attributes) {
86 | this.attributes = attributes;
87 | }
88 |
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$app.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$app.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$app extends Rule
16 | {
17 | private Rule$app(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$app parse(ParserContext context)
28 | {
29 | context.push("app");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$app(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("app", parsed);
72 |
73 | return (Rule$app)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$fmt.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$fmt.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$fmt extends Rule
16 | {
17 | private Rule$fmt(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$fmt parse(ParserContext context)
28 | {
29 | context.push("fmt");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$fmt(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("fmt", parsed);
72 |
73 | return (Rule$fmt)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$name.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$name.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$name extends Rule
16 | {
17 | private Rule$name(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$name parse(ParserContext context)
28 | {
29 | context.push("name");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$name(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("name", parsed);
72 |
73 | return (Rule$name)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$rate.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$rate.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$rate extends Rule
16 | {
17 | private Rule$rate(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$rate parse(ParserContext context)
28 | {
29 | context.push("rate");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$integer.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$rate(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("rate", parsed);
72 |
73 | return (Rule$rate)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$media.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$media.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$media extends Rule
16 | {
17 | private Rule$media(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$media parse(ParserContext context)
28 | {
29 | context.push("media");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$media(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("media", parsed);
72 |
73 | return (Rule$media)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$text.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$text.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$text extends Rule
16 | {
17 | private Rule$text(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$text parse(ParserContext context)
28 | {
29 | context.push("text");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$byte_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$text(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("text", parsed);
72 |
73 | return (Rule$text)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/impl/KeyBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp.impl;
7 |
8 | import org.murillo.sdp.Key;
9 | import org.murillo.abnf.Rule$key_field;
10 | import org.murillo.abnf.Rule$clear_key_type;
11 | import org.murillo.abnf.Rule$prompt_key_type;
12 | import org.murillo.abnf.Rule$base64_key_type;
13 | import org.murillo.abnf.Rule$uri_key_type;
14 | /**
15 | *
16 | * @author Sergio
17 | */
18 | class KeyBuilder extends Builder {
19 |
20 | private Key key;
21 |
22 | @Override
23 | public Object visit(Rule$key_field rule) {
24 | //New kwy
25 | key = new Key();
26 | //Generate it
27 | super.visit(rule);
28 | //Return it
29 | return key;
30 | }
31 |
32 | @Override
33 | public Object visit(Rule$prompt_key_type rule) {
34 | //Get type
35 | String type = rule.toString();
36 | //Set type
37 | key.setType(type);
38 | //Return it
39 | return type;
40 | }
41 |
42 | @Override
43 | public Object visit(Rule$clear_key_type rule) {
44 | //Get type and key
45 | String type = rule.rules.get(0).toString();
46 | String k = rule.rules.get(2).toString();
47 | //Set type
48 | key.setType(type);
49 | //Set type
50 | key.setKey(k);
51 | //Return it
52 | return rule.toString();
53 | }
54 |
55 | @Override
56 | public Object visit(Rule$base64_key_type rule) {
57 | //Get type and key
58 | String type = rule.rules.get(0).toString();
59 | String k = rule.rules.get(2).toString();
60 | //Set type
61 | key.setType(type);
62 | //Set type
63 | key.setKey(k);
64 | //Return it
65 | return rule.toString();
66 | }
67 |
68 | @Override
69 | public Object visit(Rule$uri_key_type rule) {
70 | //Get type and key
71 | String type = rule.rules.get(0).toString();
72 | String k = rule.rules.get(2).toString();
73 | //Set type
74 | key.setType(type);
75 | //Set type
76 | key.setKey(k);
77 | //Return it
78 | return rule.toString();
79 | }
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$CR.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CR.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$CR extends Rule
16 | {
17 | private Rule$CR(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$CR parse(ParserContext context)
28 | {
29 | context.push("CR");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x0D", "[\\x0D]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$CR(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("CR", parsed);
72 |
73 | return (Rule$CR)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$LF.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$LF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$LF extends Rule
16 | {
17 | private Rule$LF(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$LF parse(ParserContext context)
28 | {
29 | context.push("LF");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x0A", "[\\x0A]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$LF(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("LF", parsed);
72 |
73 | return (Rule$LF)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$SP.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$SP.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$SP extends Rule
16 | {
17 | private Rule$SP(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$SP parse(ParserContext context)
28 | {
29 | context.push("SP");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x20", "[\\x20]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$SP(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("SP", parsed);
72 |
73 | return (Rule$SP)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$cname.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$cname.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$cname extends Rule
16 | {
17 | private Rule$cname(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$cname parse(ParserContext context)
28 | {
29 | context.push("cname");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$byte_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$cname(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("cname", parsed);
72 |
73 | return (Rule$cname)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$segment.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$segment.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$segment extends Rule
16 | {
17 | private Rule$segment(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$segment parse(ParserContext context)
28 | {
29 | context.push("segment");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; f1; i1++)
48 | {
49 | rule = Rule$pchar.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = true;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$segment(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("segment", parsed);
72 |
73 | return (Rule$segment)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/sdp/RTPMapAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 |
6 | package org.murillo.sdp;
7 |
8 | /**
9 | *
10 | * @author Sergio
11 | */
12 | public class RTPMapAttribute implements Attribute {
13 |
14 | private Integer format;
15 | private String name;
16 | private Integer rate;
17 | private String parameters;
18 |
19 | public RTPMapAttribute() {
20 | }
21 |
22 | public RTPMapAttribute(Integer format, String name, Integer rate, String parameters) {
23 | this.format = format;
24 | this.name = name;
25 | this.rate = rate;
26 | this.parameters = parameters;
27 | }
28 |
29 | public RTPMapAttribute(Integer format, String name, Integer rate) {
30 | this.format = format;
31 | this.name = name;
32 | this.rate = rate;
33 | }
34 |
35 | @Override
36 | public RTPMapAttribute clone() {
37 | return new RTPMapAttribute(format, name, rate, parameters);
38 | }
39 |
40 | @Override
41 | public String getField() {
42 | return "rtpmap";
43 | }
44 |
45 | @Override
46 | public String getValue() {
47 | return format.toString() + " " + name + "/" + rate + (parameters!=null ? "/" + parameters : "" );
48 | }
49 |
50 | @Override
51 | public String toString() {
52 | //Get value
53 | String value = getValue();
54 | //Generic attr
55 | return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
56 | }
57 |
58 | public Integer getFormat() {
59 | return format;
60 | }
61 |
62 | public void setFormat(Integer format) {
63 | this.format = format;
64 | }
65 |
66 | public String getName() {
67 | return name;
68 | }
69 |
70 | public void setName(String name) {
71 | this.name = name;
72 | }
73 |
74 | public String getParameters() {
75 | return parameters;
76 | }
77 |
78 | public void setParameters(String parameters) {
79 | this.parameters = parameters;
80 | }
81 |
82 | public Integer getRate() {
83 | return rate;
84 | }
85 |
86 | public void setRate(Integer rate) {
87 | this.rate = rate;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$CRLF.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CRLF.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$CRLF extends Rule
16 | {
17 | private Rule$CRLF(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$CRLF parse(ParserContext context)
28 | {
29 | context.push("CRLF");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = org.murillo.abnf.precomp.CRLF.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$CRLF(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("CRLF", parsed);
72 |
73 | return (Rule$CRLF)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$bwtype.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$bwtype.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$bwtype extends Rule
16 | {
17 | private Rule$bwtype(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$bwtype parse(ParserContext context)
28 | {
29 | context.push("bwtype");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$bwtype(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("bwtype", parsed);
72 |
73 | return (Rule$bwtype)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$ALPHA.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$ALPHA.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$ALPHA extends Rule
16 | {
17 | private Rule$ALPHA(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$ALPHA parse(ParserContext context)
28 | {
29 | context.push("ALPHA");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = org.murillo.abnf.precomp.ALPHA.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$ALPHA(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("ALPHA", parsed);
72 |
73 | return (Rule$ALPHA)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$nettype.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$nettype.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$nettype extends Rule
16 | {
17 | private Rule$nettype(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$nettype parse(ParserContext context)
28 | {
29 | context.push("nettype");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$nettype(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("nettype", parsed);
72 |
73 | return (Rule$nettype)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$ssrc_id.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$ssrc_id.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$ssrc_id extends Rule
16 | {
17 | private Rule$ssrc_id(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$ssrc_id parse(ParserContext context)
28 | {
29 | context.push("ssrc-id");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$integer.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$ssrc_id(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("ssrc-id", parsed);
72 |
73 | return (Rule$ssrc_id)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$token.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$token.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$token extends Rule
16 | {
17 | private Rule$token(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$token parse(ParserContext context)
28 | {
29 | context.push("token");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = org.murillo.abnf.precomp.Token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$token(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("token", parsed);
72 |
73 | return (Rule$token)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$EQUALS.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$EQUALS.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$EQUALS extends Rule
16 | {
17 | private Rule$EQUALS(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$EQUALS parse(ParserContext context)
28 | {
29 | context.push("EQUALS");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$StringValue.parse(context, "=");
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$EQUALS(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("EQUALS", parsed);
72 |
73 | return (Rule$EQUALS)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$HTAB.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$HTAB.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$HTAB extends Rule
16 | {
17 | private Rule$HTAB(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$HTAB parse(ParserContext context)
28 | {
29 | context.push("HTAB");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x09", "[\\x09]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$HTAB(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("HTAB", parsed);
72 |
73 | return (Rule$HTAB)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$rel_port.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$rel_port.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$rel_port extends Rule
16 | {
17 | private Rule$rel_port(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$rel_port parse(ParserContext context)
28 | {
29 | context.push("rel-port");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$port.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$rel_port(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("rel-port", parsed);
72 |
73 | return (Rule$rel_port)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$addrtype.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$addrtype.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$addrtype extends Rule
16 | {
17 | private Rule$addrtype(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$addrtype parse(ParserContext context)
28 | {
29 | context.push("addrtype");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$addrtype(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("addrtype", parsed);
72 |
73 | return (Rule$addrtype)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$CHAR.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$CHAR.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$CHAR extends Rule
16 | {
17 | private Rule$CHAR(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$CHAR parse(ParserContext context)
28 | {
29 | context.push("CHAR");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x01-7F", "[\\x01-\\x7F]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$CHAR(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("CHAR", parsed);
72 |
73 | return (Rule$CHAR)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$att_field.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$att_field.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$att_field extends Rule
16 | {
17 | private Rule$att_field(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$att_field parse(ParserContext context)
28 | {
29 | context.push("att-field");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$att_field(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("att-field", parsed);
72 |
73 | return (Rule$att_field)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$path_empty.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$path_empty.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$path_empty extends Rule
16 | {
17 | private Rule$path_empty(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$path_empty parse(ParserContext context)
28 | {
29 | context.push("path-empty");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; f1; i1++)
48 | {
49 | rule = Rule$pchar.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = true;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$path_empty(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("path-empty", parsed);
72 |
73 | return (Rule$path_empty)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$username.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$username.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$username extends Rule
16 | {
17 | private Rule$username(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$username parse(ParserContext context)
28 | {
29 | context.push("username");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$non_ws_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$username(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("username", parsed);
72 |
73 | return (Rule$username)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$rel_addr.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$rel_addr.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$rel_addr extends Rule
16 | {
17 | private Rule$rel_addr(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$rel_addr parse(ParserContext context)
28 | {
29 | context.push("rel-addr");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$connection_address.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$rel_addr(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("rel-addr", parsed);
72 |
73 | return (Rule$rel_addr)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$DIGIT.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$DIGIT.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$DIGIT extends Rule
16 | {
17 | private Rule$DIGIT(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$DIGIT parse(ParserContext context)
28 | {
29 | context.push("DIGIT");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x30-39", "[\\x30-\\x39]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$DIGIT(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("DIGIT", parsed);
72 |
73 | return (Rule$DIGIT)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$DQUOTE.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$DQUOTE.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$DQUOTE extends Rule
16 | {
17 | private Rule$DQUOTE(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$DQUOTE parse(ParserContext context)
28 | {
29 | context.push("DQUOTE");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x22", "[\\x22]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$DQUOTE(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("DQUOTE", parsed);
72 |
73 | return (Rule$DQUOTE)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$OCTET.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$OCTET.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$OCTET extends Rule
16 | {
17 | private Rule$OCTET(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$OCTET parse(ParserContext context)
28 | {
29 | context.push("OCTET");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x00-FF", "[\\x00-\\xFF]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$OCTET(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("OCTET", parsed);
72 |
73 | return (Rule$OCTET)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$VCHAR.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$VCHAR.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$VCHAR extends Rule
16 | {
17 | private Rule$VCHAR(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$VCHAR parse(ParserContext context)
28 | {
29 | context.push("VCHAR");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x21-7E", "[\\x21-\\x7E]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$VCHAR(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("VCHAR", parsed);
72 |
73 | return (Rule$VCHAR)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$att_value.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$att_value.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$att_value extends Rule
16 | {
17 | private Rule$att_value(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$att_value parse(ParserContext context)
28 | {
29 | context.push("att-value");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$byte_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$att_value(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("att-value", parsed);
72 |
73 | return (Rule$att_value)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$extn_addr.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$extn_addr.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$extn_addr extends Rule
16 | {
17 | private Rule$extn_addr(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$extn_addr parse(ParserContext context)
28 | {
29 | context.push("extn-addr");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$non_ws_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$extn_addr(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("extn-addr", parsed);
72 |
73 | return (Rule$extn_addr)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$parameters.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$parameters.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$parameters extends Rule
16 | {
17 | private Rule$parameters(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$parameters parse(ParserContext context)
28 | {
29 | context.push("parameters");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$parameters(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("parameters", parsed);
72 |
73 | return (Rule$parameters)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$param_list.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$param_list.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$param_list extends Rule
16 | {
17 | private Rule$param_list(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$param_list parse(ParserContext context)
28 | {
29 | context.push("param-list");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$byte_string.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$param_list(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("param-list", parsed);
72 |
73 | return (Rule$param_list)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$base64_unit.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$base64_unit.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$base64_unit extends Rule
16 | {
17 | private Rule$base64_unit(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$base64_unit parse(ParserContext context)
28 | {
29 | context.push("base64-unit");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 4 && f1; i1++)
48 | {
49 | rule = Rule$base64_char.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 4;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$base64_unit(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("base64-unit", parsed);
72 |
73 | return (Rule$base64_unit)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$POS_DIGIT.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$POS_DIGIT.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$POS_DIGIT extends Rule
16 | {
17 | private Rule$POS_DIGIT(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$POS_DIGIT parse(ParserContext context)
28 | {
29 | context.push("POS-DIGIT");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$NumericValue.parse(context, "%x31-39", "[\\x31-\\x39]", 1);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$POS_DIGIT(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("POS-DIGIT", parsed);
72 |
73 | return (Rule$POS_DIGIT)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$byte_string.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$byte_string.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$byte_string extends Rule
16 | {
17 | private Rule$byte_string(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$byte_string parse(ParserContext context)
28 | {
29 | context.push("byte-string");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = org.murillo.abnf.precomp.ByteString.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$byte_string(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("byte-string", parsed);
72 |
73 | return (Rule$byte_string)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$extension_name.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$extension_name.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$extension_name extends Rule
16 | {
17 | private Rule$extension_name(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$extension_name parse(ParserContext context)
28 | {
29 | context.push("extension-name");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$URI.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$extension_name(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("extension-name", parsed);
72 |
73 | return (Rule$extension_name)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$group_semantics.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$group_semantics.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$group_semantics extends Rule
16 | {
17 | private Rule$group_semantics(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$group_semantics parse(ParserContext context)
28 | {
29 | context.push("group-semantics");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$group_semantics(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("group-semantics", parsed);
72 |
73 | return (Rule$group_semantics)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$number_of_ports.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$number_of_ports.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$number_of_ports extends Rule
16 | {
17 | private Rule$number_of_ports(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$number_of_ports parse(ParserContext context)
28 | {
29 | context.push("number-of-ports");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$integer.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$number_of_ports(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("number-of-ports", parsed);
72 |
73 | return (Rule$number_of_ports)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$prompt_key_type.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$prompt_key_type.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$prompt_key_type extends Rule
16 | {
17 | private Rule$prompt_key_type(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$prompt_key_type parse(ParserContext context)
28 | {
29 | context.push("prompt-key-type");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Terminal$StringValue.parse(context, "prompt");
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$prompt_key_type(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("prompt-key-type", parsed);
72 |
73 | return (Rule$prompt_key_type)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$extension_att_name.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$extension_att_name.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$extension_att_name extends Rule
16 | {
17 | private Rule$extension_att_name(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$extension_att_name parse(ParserContext context)
28 | {
29 | context.push("extension-att-name");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$extension_att_name(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("extension-att-name", parsed);
72 |
73 | return (Rule$extension_att_name)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$identification_tag.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$identification_tag.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$identification_tag extends Rule
16 | {
17 | private Rule$identification_tag(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$identification_tag parse(ParserContext context)
28 | {
29 | context.push("identification-tag");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$identification_tag(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("identification-tag", parsed);
72 |
73 | return (Rule$identification_tag)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$extension_att_value.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$extension_att_value.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$extension_att_value extends Rule
16 | {
17 | private Rule$extension_att_value(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$extension_att_value parse(ParserContext context)
28 | {
29 | context.push("extension-att-value");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$extension_att_value(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("extension-att-value", parsed);
72 |
73 | return (Rule$extension_att_value)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$transport_extension.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$transport_extension.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$transport_extension extends Rule
16 | {
17 | private Rule$transport_extension(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$transport_extension parse(ParserContext context)
28 | {
29 | context.push("transport-extension");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$transport_extension(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("transport-extension", parsed);
72 |
73 | return (Rule$transport_extension)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$ssrc_group_semantics.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$ssrc_group_semantics.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$ssrc_group_semantics extends Rule
16 | {
17 | private Rule$ssrc_group_semantics(String spelling, ArrayList rules)
18 | {
19 | super(spelling, rules);
20 | }
21 |
22 | public Object accept(Visitor visitor)
23 | {
24 | return visitor.visit(this);
25 | }
26 |
27 | public static Rule$ssrc_group_semantics parse(ParserContext context)
28 | {
29 | context.push("ssrc-group-semantics");
30 |
31 | boolean parsed = true;
32 | int s0 = context.index;
33 | ArrayList e0 = new ArrayList();
34 | Rule rule;
35 |
36 | parsed = false;
37 | if (!parsed)
38 | {
39 | {
40 | ArrayList e1 = new ArrayList();
41 | int s1 = context.index;
42 | parsed = true;
43 | if (parsed)
44 | {
45 | boolean f1 = true;
46 | int c1 = 0;
47 | for (int i1 = 0; i1 < 1 && f1; i1++)
48 | {
49 | rule = Rule$token.parse(context);
50 | if ((f1 = rule != null))
51 | {
52 | e1.add(rule);
53 | c1++;
54 | }
55 | }
56 | parsed = c1 == 1;
57 | }
58 | if (parsed)
59 | e0.addAll(e1);
60 | else
61 | context.index = s1;
62 | }
63 | }
64 |
65 | rule = null;
66 | if (parsed)
67 | rule = new Rule$ssrc_group_semantics(context.text.substring(s0, context.index), e0);
68 | else
69 | context.index = s0;
70 |
71 | context.pop("ssrc-group-semantics", parsed);
72 |
73 | return (Rule$ssrc_group_semantics)rule;
74 | }
75 | }
76 |
77 | /* -----------------------------------------------------------------------------
78 | * eof
79 | * -----------------------------------------------------------------------------
80 | */
81 |
--------------------------------------------------------------------------------
/src/org/murillo/abnf/Rule$extension_attributes.java:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------------
2 | * Rule$extension_attributes.java
3 | * -----------------------------------------------------------------------------
4 | *
5 | * Producer : com.parse2.aparse.Parser 2.2
6 | * Produced : Thu Jan 05 18:57:59 CET 2017
7 | *
8 | * -----------------------------------------------------------------------------
9 | */
10 |
11 | package org.murillo.abnf;
12 |
13 | import java.util.ArrayList;
14 |
15 | final public class Rule$extension_attributes extends Rule
16 | {
17 | private Rule$extension_attributes(String spelling, ArrayList